Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/usr/include
File: ldif.h
/* $OpenLDAP$ */
[0] Fix | Delete
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
[1] Fix | Delete
*
[2] Fix | Delete
* Copyright 1998-2018 The OpenLDAP Foundation.
[3] Fix | Delete
* All rights reserved.
[4] Fix | Delete
*
[5] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[6] Fix | Delete
* modification, are permitted only as authorized by the OpenLDAP
[7] Fix | Delete
* Public License.
[8] Fix | Delete
*
[9] Fix | Delete
* A copy of this license is available in file LICENSE in the
[10] Fix | Delete
* top-level directory of the distribution or, alternatively, at
[11] Fix | Delete
* <http://www.OpenLDAP.org/license.html>.
[12] Fix | Delete
*/
[13] Fix | Delete
/* Portions Copyright (c) 1996 Regents of the University of Michigan.
[14] Fix | Delete
* All rights reserved.
[15] Fix | Delete
*
[16] Fix | Delete
* Redistribution and use in source and binary forms are permitted
[17] Fix | Delete
* provided that this notice is preserved and that due credit is given
[18] Fix | Delete
* to the University of Michigan at Ann Arbor. The name of the University
[19] Fix | Delete
* may not be used to endorse or promote products derived from this
[20] Fix | Delete
* software without specific prior written permission. This software
[21] Fix | Delete
* is provided ``as is'' without express or implied warranty.
[22] Fix | Delete
*/
[23] Fix | Delete
[24] Fix | Delete
#ifndef _LDIF_H
[25] Fix | Delete
#define _LDIF_H
[26] Fix | Delete
[27] Fix | Delete
#include <ldap_cdefs.h>
[28] Fix | Delete
[29] Fix | Delete
LDAP_BEGIN_DECL
[30] Fix | Delete
[31] Fix | Delete
/* This is NOT a bogus extern declaration (unlike ldap_debug) */
[32] Fix | Delete
LDAP_LDIF_V (int) ldif_debug;
[33] Fix | Delete
[34] Fix | Delete
#define LDIF_LINE_WIDTH 76 /* default maximum length of LDIF lines */
[35] Fix | Delete
#define LDIF_LINE_WIDTH_MAX ((ber_len_t)-1) /* maximum length of LDIF lines */
[36] Fix | Delete
#define LDIF_LINE_WIDTH_WRAP(wrap) ((wrap) == 0 ? LDIF_LINE_WIDTH : (wrap))
[37] Fix | Delete
[38] Fix | Delete
/*
[39] Fix | Delete
* Macro to calculate maximum number of bytes that the base64 equivalent
[40] Fix | Delete
* of an item that is "len" bytes long will take up. Base64 encoding
[41] Fix | Delete
* uses one byte for every six bits in the value plus up to two pad bytes.
[42] Fix | Delete
*/
[43] Fix | Delete
#define LDIF_BASE64_LEN(len) (((len) * 4 / 3 ) + 3)
[44] Fix | Delete
[45] Fix | Delete
/*
[46] Fix | Delete
* Macro to calculate maximum size that an LDIF-encoded type (length
[47] Fix | Delete
* tlen) and value (length vlen) will take up: room for type + ":: " +
[48] Fix | Delete
* first newline + base64 value + continued lines. Each continued line
[49] Fix | Delete
* needs room for a newline and a leading space character.
[50] Fix | Delete
*/
[51] Fix | Delete
#define LDIF_SIZE_NEEDED(nlen,vlen) \
[52] Fix | Delete
((nlen) + 4 + LDIF_BASE64_LEN(vlen) \
[53] Fix | Delete
+ ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (LDIF_LINE_WIDTH-1) * 2 ))
[54] Fix | Delete
[55] Fix | Delete
#define LDIF_SIZE_NEEDED_WRAP(nlen,vlen,wrap) \
[56] Fix | Delete
((nlen) + 4 + LDIF_BASE64_LEN(vlen) \
[57] Fix | Delete
+ ((wrap) == 0 ? ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / ( LDIF_LINE_WIDTH-1 ) * 2 ) : \
[58] Fix | Delete
((wrap) == LDIF_LINE_WIDTH_MAX ? 0 : ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (wrap-1) * 2 ))))
[59] Fix | Delete
[60] Fix | Delete
LDAP_LDIF_F( int )
[61] Fix | Delete
ldif_parse_line LDAP_P((
[62] Fix | Delete
LDAP_CONST char *line,
[63] Fix | Delete
char **name,
[64] Fix | Delete
char **value,
[65] Fix | Delete
ber_len_t *vlen ));
[66] Fix | Delete
[67] Fix | Delete
LDAP_LDIF_F( int )
[68] Fix | Delete
ldif_parse_line2 LDAP_P((
[69] Fix | Delete
char *line,
[70] Fix | Delete
struct berval *type,
[71] Fix | Delete
struct berval *value,
[72] Fix | Delete
int *freeval ));
[73] Fix | Delete
[74] Fix | Delete
LDAP_LDIF_F( FILE * )
[75] Fix | Delete
ldif_open_url LDAP_P(( LDAP_CONST char *urlstr ));
[76] Fix | Delete
[77] Fix | Delete
LDAP_LDIF_F( int )
[78] Fix | Delete
ldif_fetch_url LDAP_P((
[79] Fix | Delete
LDAP_CONST char *line,
[80] Fix | Delete
char **value,
[81] Fix | Delete
ber_len_t *vlen ));
[82] Fix | Delete
[83] Fix | Delete
LDAP_LDIF_F( char * )
[84] Fix | Delete
ldif_getline LDAP_P(( char **next ));
[85] Fix | Delete
[86] Fix | Delete
LDAP_LDIF_F( int )
[87] Fix | Delete
ldif_countlines LDAP_P(( LDAP_CONST char *line ));
[88] Fix | Delete
[89] Fix | Delete
/* ldif_ropen, rclose, read_record - just for reading LDIF files,
[90] Fix | Delete
* no special open/close needed to write LDIF files.
[91] Fix | Delete
*/
[92] Fix | Delete
typedef struct LDIFFP {
[93] Fix | Delete
FILE *fp;
[94] Fix | Delete
struct LDIFFP *prev;
[95] Fix | Delete
} LDIFFP;
[96] Fix | Delete
[97] Fix | Delete
LDAP_LDIF_F( LDIFFP * )
[98] Fix | Delete
ldif_open LDAP_P(( LDAP_CONST char *file, LDAP_CONST char *mode ));
[99] Fix | Delete
[100] Fix | Delete
LDAP_LDIF_F( void )
[101] Fix | Delete
ldif_close LDAP_P(( LDIFFP * ));
[102] Fix | Delete
[103] Fix | Delete
LDAP_LDIF_F( int )
[104] Fix | Delete
ldif_read_record LDAP_P((
[105] Fix | Delete
LDIFFP *fp,
[106] Fix | Delete
unsigned long *lineno,
[107] Fix | Delete
char **bufp,
[108] Fix | Delete
int *buflen ));
[109] Fix | Delete
[110] Fix | Delete
LDAP_LDIF_F( int )
[111] Fix | Delete
ldif_must_b64_encode_register LDAP_P((
[112] Fix | Delete
LDAP_CONST char *name,
[113] Fix | Delete
LDAP_CONST char *oid ));
[114] Fix | Delete
[115] Fix | Delete
LDAP_LDIF_F( void )
[116] Fix | Delete
ldif_must_b64_encode_release LDAP_P(( void ));
[117] Fix | Delete
[118] Fix | Delete
#define LDIF_PUT_NOVALUE 0x0000 /* no value */
[119] Fix | Delete
#define LDIF_PUT_VALUE 0x0001 /* value w/ auto detection */
[120] Fix | Delete
#define LDIF_PUT_TEXT 0x0002 /* assume text */
[121] Fix | Delete
#define LDIF_PUT_BINARY 0x0004 /* assume binary (convert to base64) */
[122] Fix | Delete
#define LDIF_PUT_B64 0x0008 /* pre-converted base64 value */
[123] Fix | Delete
[124] Fix | Delete
#define LDIF_PUT_COMMENT 0x0010 /* comment */
[125] Fix | Delete
#define LDIF_PUT_URL 0x0020 /* url */
[126] Fix | Delete
#define LDIF_PUT_SEP 0x0040 /* separator */
[127] Fix | Delete
[128] Fix | Delete
LDAP_LDIF_F( void )
[129] Fix | Delete
ldif_sput LDAP_P((
[130] Fix | Delete
char **out,
[131] Fix | Delete
int type,
[132] Fix | Delete
LDAP_CONST char *name,
[133] Fix | Delete
LDAP_CONST char *val,
[134] Fix | Delete
ber_len_t vlen ));
[135] Fix | Delete
[136] Fix | Delete
LDAP_LDIF_F( void )
[137] Fix | Delete
ldif_sput_wrap LDAP_P((
[138] Fix | Delete
char **out,
[139] Fix | Delete
int type,
[140] Fix | Delete
LDAP_CONST char *name,
[141] Fix | Delete
LDAP_CONST char *val,
[142] Fix | Delete
ber_len_t vlen,
[143] Fix | Delete
ber_len_t wrap ));
[144] Fix | Delete
[145] Fix | Delete
LDAP_LDIF_F( char * )
[146] Fix | Delete
ldif_put LDAP_P((
[147] Fix | Delete
int type,
[148] Fix | Delete
LDAP_CONST char *name,
[149] Fix | Delete
LDAP_CONST char *val,
[150] Fix | Delete
ber_len_t vlen ));
[151] Fix | Delete
[152] Fix | Delete
LDAP_LDIF_F( char * )
[153] Fix | Delete
ldif_put_wrap LDAP_P((
[154] Fix | Delete
int type,
[155] Fix | Delete
LDAP_CONST char *name,
[156] Fix | Delete
LDAP_CONST char *val,
[157] Fix | Delete
ber_len_t vlen,
[158] Fix | Delete
ber_len_t wrap ));
[159] Fix | Delete
[160] Fix | Delete
LDAP_LDIF_F( int )
[161] Fix | Delete
ldif_is_not_printable LDAP_P((
[162] Fix | Delete
LDAP_CONST char *val,
[163] Fix | Delete
ber_len_t vlen ));
[164] Fix | Delete
[165] Fix | Delete
LDAP_END_DECL
[166] Fix | Delete
[167] Fix | Delete
#endif /* _LDIF_H */
[168] Fix | Delete
[169] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function