Diff for /libraries/liblber/lber-int.h between versions 1.68.2.8 and 1.69

version 1.68.2.8, 2011/01/04 23:49:59 version 1.69, 2007/01/02 19:00:57
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/libraries/liblber/lber-int.h,v 1.68.2.7 2010/04/13 20:22:54 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/libraries/liblber/lber-int.h,v 1.68 2006/01/03 22:12:07 kurt Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 1998-2011 The OpenLDAP Foundation.   * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
Line 47  LBER_V (BER_ERRNO_FN) ber_int_errno_fn; Line 47  LBER_V (BER_ERRNO_FN) ber_int_errno_fn;
 #ifdef LDAP_MEMORY_DEBUG  #ifdef LDAP_MEMORY_DEBUG
 LBER_V (long)   ber_int_meminuse;  LBER_V (long)   ber_int_meminuse;
 #endif  #endif
 #if defined(LDAP_MEMORY_DEBUG) && ((LDAP_MEMORY_DEBUG +0) & 2)  
 # define LDAP_MEMORY_DEBUG_ASSERT assert  
 #else  
 # define LDAP_MEMORY_DEBUG_ASSERT(expr) ((void) 0)  
 #endif  
   
 struct lber_options {  struct lber_options {
         short lbo_valid;          short lbo_valid;
Line 72  LBER_F( int ) ber_pvt_log_output( Line 67  LBER_F( int ) ber_pvt_log_output(
 LBER_V (struct lber_options) ber_int_options;  LBER_V (struct lber_options) ber_int_options;
 #define ber_int_debug ber_int_options.lbo_debug  #define ber_int_debug ber_int_options.lbo_debug
   
 /* Data encoded in ASN.1 BER format */  
 struct berelement {  struct berelement {
         struct          lber_options ber_opts;          struct          lber_options ber_opts;
 #define ber_valid               ber_opts.lbo_valid  #define ber_valid               ber_opts.lbo_valid
 #define ber_options             ber_opts.lbo_options  #define ber_options             ber_opts.lbo_options
 #define ber_debug               ber_opts.lbo_debug  #define ber_debug               ber_opts.lbo_debug
   
         /*  
          * The members below, when not NULL/LBER_DEFAULT/etc, are:  
          *   ber_buf       Data buffer.  Other pointers normally point into it.  
          *   ber_rwptr     Read/write cursor for Sockbuf I/O.  
          *   ber_memctx    Context passed to ber_memalloc() & co.  
          * When decoding data (reading it from the BerElement):  
          *   ber_end       End of BER data.  
          *   ber_ptr       Read cursor, except for 1st octet of tags.  
          *   ber_tag       1st octet of next tag, saved from *ber_ptr when  
          *                 ber_ptr may be pointing at a tag and is >ber_buf.  
          *                 The octet *ber_ptr itself may get overwritten with  
          *                 a \0, to terminate the preceding element.  
          * When encoding data (writing it to the BerElement):  
          *   ber_end       End of allocated buffer - 1 (allowing a final \0).  
          *   ber_ptr       Last complete BER element (normally write cursor).  
          *   ber_sos_ptr   NULL or write cursor for incomplete sequence or set.  
          *   ber_sos_inner offset(seq/set length octets) if ber_sos_ptr!=NULL.  
          *   ber_tag       Default tag for next ber_printf() element.  
          *   ber_usertag   Boolean set by ber_printf "!" if it sets ber_tag.  
          *   ber_len       Reused for ber_sos_inner.  
          * When output to a Sockbuf:  
          *   ber_ptr       End of encoded data to write.  
          * When input from a Sockbuf:  
          *   See ber_get_next().  
          */  
   
         /* Do not change the order of these 3 fields! see ber_get_next */          /* Do not change the order of these 3 fields! see ber_get_next */
         ber_tag_t       ber_tag;          ber_tag_t       ber_tag;
         ber_len_t       ber_len;          ber_len_t       ber_len;
Line 114  struct berelement { Line 82  struct berelement {
         char            *ber_ptr;          char            *ber_ptr;
         char            *ber_end;          char            *ber_end;
   
         char            *ber_sos_ptr;          struct seqorset *ber_sos;
 #       define          ber_sos_inner   ber_len /* reused for binary compat */  
   
         char            *ber_rwptr;          char            *ber_rwptr;
         void            *ber_memctx;          void            *ber_memctx;
 };  };
Line 133  struct sockbuf { Line 99  struct sockbuf {
 #define sb_options              sb_opts.lbo_options  #define sb_options              sb_opts.lbo_options
 #define sb_debug                sb_opts.lbo_debug  #define sb_debug                sb_opts.lbo_debug
         ber_socket_t            sb_fd;          ber_socket_t            sb_fd;
         ber_len_t                       sb_max_incoming;  
         unsigned int            sb_trans_needs_read:1;          unsigned int            sb_trans_needs_read:1;
         unsigned int            sb_trans_needs_write:1;          unsigned int            sb_trans_needs_write:1;
 #ifdef LDAP_PF_LOCAL_SENDMSG          ber_len_t                       sb_max_incoming;
         char                            sb_ungetlen;  
         char                            sb_ungetbuf[8];  
 #endif  
 };  };
   
 #define SOCKBUF_VALID( sb )     ( (sb)->sb_valid == LBER_VALID_SOCKBUF )  #define SOCKBUF_VALID( sb )     ( (sb)->sb_valid == LBER_VALID_SOCKBUF )
   
   struct seqorset {
 /*          BerElement      *sos_ber;
  * decode.c, encode.c          ber_len_t       sos_clen;
  */          ber_tag_t       sos_tag;
           char            *sos_first;
 /* Simplest OID max-DER-component to implement in both decode and encode */          char            *sos_ptr;
 #define LBER_OID_COMPONENT_MAX ((unsigned long)-1 - 128)          struct seqorset *sos_next;
   };
   
   
 /*  /*
Line 185  ber_log_dump LDAP_P(( Line 148  ber_log_dump LDAP_P((
         BerElement *ber,          BerElement *ber,
         int inout ));          int inout ));
   
   LBER_F( int )
   ber_log_sos_dump LDAP_P((
           int errlvl,
           int loglvl,
           Seqorset *sos ));
   
 LBER_V (BER_LOG_FN) ber_int_log_proc;  LBER_V (BER_LOG_FN) ber_int_log_proc;
 LBER_V (FILE *) ber_pvt_err_file;  LBER_V (FILE *) ber_pvt_err_file;
   

Removed from v.1.68.2.8  
changed lines
  Added in v.1.69


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org