]> git.sur5r.net Git - openldap/blob - include/lber_pvt.h
Don't copy and leak user; it's an env var so just use it directly.
[openldap] / include / lber_pvt.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted only as authorized by the OpenLDAP
8  * Public License.  A copy of this license is available at
9  * http://www.OpenLDAP.org/license.html or in file LICENSE in the
10  * top-level directory of the distribution.
11  */
12 /*
13  * lber_pvt.h - Header for ber_pvt_ functions. These are meant to be used
14  *              by the OpenLDAP distribution only.
15  */
16
17 #ifndef _LBER_PVT_H
18 #define _LBER_PVT_H 1
19
20 #include <lber.h>
21
22 LDAP_BEGIN_DECL
23
24 typedef struct sockbuf_buf {
25         ber_len_t               buf_size;
26         ber_len_t               buf_ptr;
27         ber_len_t               buf_end;
28         char                    *buf_base;
29 } Sockbuf_Buf;
30
31 /*
32  * bprint.c
33  */
34 LBER_V( BER_LOG_PRINT_FN ) ber_pvt_log_print;
35
36 LBER_F( int )
37 ber_pvt_log_printf LDAP_P((
38         int errlvl,
39         int loglvl,
40         const char *fmt,
41         ... )) LDAP_GCCATTR((format(printf, 3, 4)));
42
43 /*
44  * sockbuf.c
45  */
46 LBER_F( ber_slen_t )
47 ber_pvt_sb_do_write LDAP_P(( Sockbuf_IO_Desc *sbiod, Sockbuf_Buf *buf_out ));
48
49 LBER_F( void )
50 ber_pvt_sb_buf_init LDAP_P(( Sockbuf_Buf *buf ));
51
52 LBER_F( void )
53 ber_pvt_sb_buf_destroy LDAP_P(( Sockbuf_Buf *buf ));
54
55 LBER_F( int )
56 ber_pvt_sb_grow_buffer LDAP_P(( Sockbuf_Buf *buf, ber_len_t minsize ));
57
58 LBER_F( ber_len_t )
59 ber_pvt_sb_copy_out LDAP_P(( Sockbuf_Buf *sbb, char *buf, ber_len_t len ));
60
61 LBER_F( int )
62 ber_pvt_socket_set_nonblock LDAP_P(( ber_socket_t sd, int nb ));
63
64 LDAP_END_DECL
65
66 #endif
67