long lbo_meminuse;
};
+#ifdef NEW_LOGGING
+# ifdef LDAP_DEBUG
+# ifdef LDAP_LOG
+# undef LDAP_LOG
+# endif
+# define LDAP_LOG(a) ber_pvt_log_output a
+# define BER_DUMP(a) ber_output_dump a
+# else
+# define LDAP_LOG(a)
+# define BER_DUMP(a)
+# endif
+#endif
+
#define LBER_UNINITIALIZED 0x0
#define LBER_INITIALIZED 0x1
#define LBER_VALID_BERELEMENT 0x2
};
#define BER_VALID(ber) ((ber)->ber_valid==LBER_VALID_BERELEMENT)
-#define ber_pvt_ber_bytes(ber) ((ber)->ber_ptr - (ber)->ber_buf)
#define ber_pvt_ber_remaining(ber) ((ber)->ber_end - (ber)->ber_ptr)
+#define ber_pvt_ber_total(ber) ((ber)->ber_end - (ber)->ber_buf)
+#define ber_pvt_ber_write(ber) ((ber)->ber_ptr - (ber)->ber_buf)
struct sockbuf {
struct lber_options sb_opts;
#define sb_options sb_opts.lbo_options
#define sb_debug sb_opts.lbo_debug
ber_socket_t sb_fd;
- int sb_trans_needs_read:1;
- int sb_trans_needs_write:1;
+ unsigned int sb_trans_needs_read:1;
+ unsigned int sb_trans_needs_write:1;
};
#define SOCKBUF_VALID( sb ) ( (sb)->sb_valid == LBER_VALID_SOCKBUF )
*/
#define ber_log_printf ber_pvt_log_printf
+#ifdef NEW_LOGGING
+LBER_F( int )
+ber_output_dump LDAP_P((
+ char *subsys,
+ int level,
+ BerElement *ber,
+ int inout ));
+#endif
+
LBER_F( int )
ber_log_bprint LDAP_P((
int errlvl,