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.

81 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. //
  4. // File: ber.h
  5. //
  6. // Contents:
  7. //
  8. // Classes:
  9. //
  10. // Functions:
  11. //
  12. // History: 8-10-95 RichardW Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #ifndef __BER_H__
  16. #define __BER_H__
  17. #if DBG
  18. #define BER_UNIVERSAL 0x00
  19. #define BER_APPLICATION 0x40
  20. #define BER_CONTEXT_SPECIFIC 0x80
  21. #define BER_PRIVATE 0xC0
  22. #define BER_PRIMITIVE 0x00
  23. #define BER_CONSTRUCTED 0x20
  24. #define BER_BOOL 1
  25. #define BER_INTEGER 2
  26. #define BER_BIT_STRING 3
  27. #define BER_OCTET_STRING 4
  28. #define BER_NULL 5
  29. #define BER_OBJECT_ID 6
  30. #define BER_OBJECT_DESC 7
  31. #define BER_EXTERNAL 8
  32. #define BER_REAL 9
  33. #define BER_ENUMERATED 10
  34. #define BER_SEQUENCE 16
  35. #define BER_SET 17
  36. #define BER_NUMERIC_STRING 0x12
  37. #define BER_PRINTABLE_STRING 0x13
  38. #define BER_TELETEX_STRING 0x14
  39. #define BER_VIDEOTEX_STRING 0x15
  40. #define BER_GRAPHIC_STRING 0x19
  41. #define BER_VISIBLE_STRING 0x1A
  42. #define BER_GENERAL_STRING 0x1B
  43. #define BER_UTC_TIME 23
  44. typedef VOID (* OutputFn)(char *, ...);
  45. typedef BOOL (* StopFn)(void);
  46. #ifndef EXTERN_C
  47. #ifdef __cplusplus
  48. #define EXTERN_C extern "C"
  49. #else
  50. #define EXTERN_C
  51. #endif
  52. #endif
  53. EXTERN_C
  54. int
  55. ber_decode(
  56. OutputFn Out,
  57. StopFn Stop,
  58. LPBYTE pBuffer,
  59. DWORD Flags,
  60. int Indent,
  61. int Offset,
  62. int TotalLength,
  63. int BarDepth);
  64. #define DECODE_NEST_OCTET_STRINGS 0x00000001
  65. #define DECODE_VERBOSE_OIDS 0x00000002
  66. #endif
  67. #endif