BIT_STRING.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*-
  2. * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  3. * Redistribution and modifications are permitted subject to BSD license.
  4. */
  5. #ifndef _BIT_STRING_H_
  6. #define _BIT_STRING_H_
  7. #include <OCTET_STRING.h> /* Some help from OCTET STRING */
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. typedef struct BIT_STRING_s {
  12. uint8_t *buf; /* BIT STRING body */
  13. size_t size; /* Size of the above buffer */
  14. int bits_unused;/* Unused trailing bits in the last octet (0..7) */
  15. asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */
  16. } BIT_STRING_t;
  17. extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING;
  18. extern asn_TYPE_operation_t asn_OP_BIT_STRING;
  19. extern asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs;
  20. asn_struct_print_f BIT_STRING_print; /* Human-readable output */
  21. asn_struct_compare_f BIT_STRING_compare;
  22. asn_constr_check_f BIT_STRING_constraint;
  23. xer_type_encoder_f BIT_STRING_encode_xer;
  24. oer_type_decoder_f BIT_STRING_decode_oer;
  25. oer_type_encoder_f BIT_STRING_encode_oer;
  26. per_type_decoder_f BIT_STRING_decode_uper;
  27. per_type_encoder_f BIT_STRING_encode_uper;
  28. asn_random_fill_f BIT_STRING_random_fill;
  29. #define BIT_STRING_free OCTET_STRING_free
  30. #define BIT_STRING_decode_ber OCTET_STRING_decode_ber
  31. #define BIT_STRING_encode_der OCTET_STRING_encode_der
  32. #define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif /* _BIT_STRING_H_ */