Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.8 KiB

  1. /*
  2. * lber-proto.h
  3. * function prototypes for lber library
  4. */
  5. #ifdef LDAP_DEBUG
  6. extern int lber_debug;
  7. #endif
  8. #ifndef LDAPFUNCDECL
  9. #ifdef _WIN32
  10. #define LDAPFUNCDECL __declspec( dllexport )
  11. #else /* _WIN32 */
  12. #define LDAPFUNCDECL
  13. #endif /* _WIN32 */
  14. #endif /* LDAPFUNCDECL */
  15. /*
  16. * in bprint.c:
  17. */
  18. LDAPFUNCDECL void lber_bprint( char *data, int len );
  19. /*
  20. * in decode.c:
  21. */
  22. LDAPFUNCDECL unsigned long ber_get_tag( BerElement *ber );
  23. LDAPFUNCDECL unsigned long ber_skip_tag( BerElement *ber, unsigned long *len );
  24. LDAPFUNCDECL unsigned long ber_peek_tag( BerElement *ber, unsigned long *len );
  25. LDAPFUNCDECL unsigned long ber_get_int( BerElement *ber, long *num );
  26. LDAPFUNCDECL unsigned long ber_get_stringb( BerElement *ber, char *buf,
  27. unsigned long *len );
  28. LDAPFUNCDECL unsigned long ber_get_stringa( BerElement *ber, char **buf );
  29. LDAPFUNCDECL unsigned long ber_get_stringal( BerElement *ber, struct berval **bv );
  30. LDAPFUNCDECL unsigned long ber_get_bitstringa( BerElement *ber, char **buf,
  31. unsigned long *len );
  32. LDAPFUNCDECL unsigned long ber_get_null( BerElement *ber );
  33. LDAPFUNCDECL unsigned long ber_get_boolean( BerElement *ber, int *boolval );
  34. LDAPFUNCDECL unsigned long ber_first_element( BerElement *ber, unsigned long *len,
  35. char **last );
  36. LDAPFUNCDECL unsigned long ber_next_element( BerElement *ber, unsigned long *len,
  37. char *last );
  38. #if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 )
  39. LDAPFUNCDECL unsigned long ber_scanf( BerElement *ber, char *fmt, ... );
  40. #else
  41. LDAPFUNCDECL unsigned long ber_scanf();
  42. #endif
  43. LDAPFUNCDECL void ber_bvfree( struct berval *bv );
  44. LDAPFUNCDECL void ber_bvecfree( struct berval **bv );
  45. LDAPFUNCDECL struct berval *ber_bvdup( struct berval *bv );
  46. #ifdef STR_TRANSLATION
  47. LDAPFUNCDECL void ber_set_string_translators( BerElement *ber,
  48. BERTranslateProc encode_proc, BERTranslateProc decode_proc );
  49. #endif /* STR_TRANSLATION */
  50. /*
  51. * in encode.c
  52. */
  53. LDAPFUNCDECL int ber_put_enum( BerElement *ber, long num, unsigned long tag );
  54. LDAPFUNCDECL int ber_put_int( BerElement *ber, long num, unsigned long tag );
  55. LDAPFUNCDECL int ber_put_ostring( BerElement *ber, char *str, unsigned long len,
  56. unsigned long tag );
  57. LDAPFUNCDECL int ber_put_string( BerElement *ber, char *str, unsigned long tag );
  58. LDAPFUNCDECL int ber_put_bitstring( BerElement *ber, char *str,
  59. unsigned long bitlen, unsigned long tag );
  60. LDAPFUNCDECL int ber_put_null( BerElement *ber, unsigned long tag );
  61. LDAPFUNCDECL int ber_put_boolean( BerElement *ber, int boolval,
  62. unsigned long tag );
  63. LDAPFUNCDECL int ber_start_seq( BerElement *ber, unsigned long tag );
  64. LDAPFUNCDECL int ber_start_set( BerElement *ber, unsigned long tag );
  65. LDAPFUNCDECL int ber_put_seq( BerElement *ber );
  66. LDAPFUNCDECL int ber_put_set( BerElement *ber );
  67. #if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 )
  68. LDAPFUNCDECL int ber_printf( BerElement *ber, char *fmt, ... );
  69. #else
  70. LDAPFUNCDECL int ber_printf();
  71. #endif
  72. /*
  73. * in io.c:
  74. */
  75. LDAPFUNCDECL long ber_read( BerElement *ber, char *buf, unsigned long len );
  76. LDAPFUNCDECL long ber_write( BerElement *ber, char *buf, unsigned long len,
  77. int nosos );
  78. LDAPFUNCDECL void ber_free( BerElement *ber, int freebuf );
  79. LDAPFUNCDECL int ber_flush( Sockbuf *sb, BerElement *ber, int freeit );
  80. LDAPFUNCDECL BerElement *ber_alloc( void );
  81. LDAPFUNCDECL BerElement *der_alloc( void );
  82. LDAPFUNCDECL BerElement *ber_alloc_t( int options );
  83. LDAPFUNCDECL BerElement *ber_dup( BerElement *ber );
  84. LDAPFUNCDECL void ber_dump( BerElement *ber, int inout );
  85. LDAPFUNCDECL void ber_sos_dump( Seqorset *sos );
  86. LDAPFUNCDECL unsigned long ber_get_next( Sockbuf *sb, unsigned long *len,
  87. BerElement *ber );
  88. LDAPFUNCDECL void ber_init( BerElement *ber, int options );
  89. LDAPFUNCDECL void ber_reset( BerElement *ber, int was_writing );
  90. #ifdef NEEDGETOPT
  91. /*
  92. * in getopt.c
  93. */
  94. int getopt( int nargc, char **nargv, char *ostr );
  95. #endif /* NEEDGETOPT */