12 #ifndef __PACKET_BER_H__ 13 #define __PACKET_BER_H__ 16 #include <epan/to_str.h> 17 #include <epan/asn1.h> 18 #include "ws_symbol_export.h" 29 #define BER_CLASS_UNI 0 30 #define BER_CLASS_APP 1 31 #define BER_CLASS_CON 2 32 #define BER_CLASS_PRI 3 33 #define BER_CLASS_ANY 99 35 #define BER_UNI_TAG_EOC 0 36 #define BER_UNI_TAG_BOOLEAN 1 37 #define BER_UNI_TAG_INTEGER 2 38 #define BER_UNI_TAG_BITSTRING 3 39 #define BER_UNI_TAG_OCTETSTRING 4 40 #define BER_UNI_TAG_NULL 5 41 #define BER_UNI_TAG_OID 6 42 #define BER_UNI_TAG_ObjectDescriptor 7 43 #define BER_UNI_TAG_EXTERNAL 8 44 #define BER_UNI_TAG_REAL 9 45 #define BER_UNI_TAG_ENUMERATED 10 46 #define BER_UNI_TAG_EMBEDDED_PDV 11 47 #define BER_UNI_TAG_UTF8String 12 48 #define BER_UNI_TAG_RELATIVE_OID 13 53 #define BER_UNI_TAG_SEQUENCE 16 54 #define BER_UNI_TAG_SET 17 56 #define BER_UNI_TAG_NumericString 18 57 #define BER_UNI_TAG_PrintableString 19 58 #define BER_UNI_TAG_TeletexString 20 59 #define BER_UNI_TAG_VideotexString 21 60 #define BER_UNI_TAG_IA5String 22 62 #define BER_UNI_TAG_UTCTime 23 63 #define BER_UNI_TAG_GeneralizedTime 24 65 #define BER_UNI_TAG_GraphicString 25 66 #define BER_UNI_TAG_VisibleString 26 67 #define BER_UNI_TAG_GeneralString 27 68 #define BER_UNI_TAG_UniversalString 28 69 #define BER_UNI_TAG_CHARACTERSTRING 29 70 #define BER_UNI_TAG_BMPString 30 79 WS_DLL_PUBLIC
int get_ber_identifier(
tvbuff_t *tvb,
int offset, gint8 *ber_class, gboolean *pc, gint32 *tag);
80 WS_DLL_PUBLIC
int dissect_ber_identifier(
packet_info *pinfo,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint8 *ber_class, gboolean *pc, gint32 *tag);
85 WS_DLL_PUBLIC
int get_ber_length(
tvbuff_t *tvb,
int offset, guint32 *length, gboolean *ind);
88 WS_DLL_PUBLIC
int dissect_ber_tagged_type(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id, gint8 tag_cls, gint32 tag_tag, gboolean tag_impl, ber_type_fn type);
90 extern int dissect_ber_constrained_octet_string(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint32 min_len, gint32 max_len, gint hf_id,
tvbuff_t **out_tvb);
92 extern int dissect_ber_octet_string_wcb(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id, ber_callback func);
94 WS_DLL_PUBLIC
int dissect_ber_integer64(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id, gint64 *value);
95 extern int dissect_ber_constrained_integer64(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint64 min_len, gint64 max_len, gint hf_id, gint64 *value);
97 WS_DLL_PUBLIC
int dissect_ber_integer(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id, guint32 *value);
98 extern int dissect_ber_constrained_integer(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint32 min_len, gint32 max_len, gint hf_id, guint32 *value);
102 WS_DLL_PUBLIC
int dissect_ber_boolean(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id, gboolean *value);
103 WS_DLL_PUBLIC
int dissect_ber_real(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id,
double *value);
105 extern int dissect_ber_external_type(gboolean implicit_tag,
proto_tree *parent_tree,
tvbuff_t *tvb,
int offset,
asn1_ctx_t *actx, gint hf_id, ber_callback func);
106 WS_DLL_PUBLIC
int dissect_ber_EmbeddedPDV_Type(gboolean implicit_tag,
proto_tree *parent_tree,
tvbuff_t *tvb,
int offset,
asn1_ctx_t *actx, gint hf_id, ber_callback func);
108 #define BER_FLAGS_OPTIONAL 0x00000001 109 #define BER_FLAGS_IMPLTAG 0x00000002 110 #define BER_FLAGS_NOOWNTAG 0x00000004 111 #define BER_FLAGS_NOTCHKTAG 0x00000008 144 extern int dissect_ber_constrained_restricted_string(gboolean implicit_tag, gint32 type,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint32 min_len, gint32 max_len, gint hf_id,
tvbuff_t **out_tvb);
145 WS_DLL_PUBLIC
int dissect_ber_restricted_string(gboolean implicit_tag, gint32 type,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id,
tvbuff_t **out_tvb);
146 extern int dissect_ber_GeneralString(
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id,
char *name_string, guint name_len);
152 WS_DLL_PUBLIC
int dissect_ber_object_identifier_str(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id,
const char **value_stringx);
157 WS_DLL_PUBLIC
int dissect_ber_relative_oid_str(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id,
const char **value_stringx);
161 extern int dissect_ber_constrained_sequence_of(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *parent_tree,
tvbuff_t *tvb,
int offset, gint32 min_len, gint32 max_len,
const ber_sequence_t *seq, gint hf_id, gint ett_id);
164 extern int dissect_ber_constrained_set_of(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *parent_tree,
tvbuff_t *tvb,
int offset, gint32 min_len, gint32 max_len,
const ber_sequence_t *seq, gint hf_id, gint ett_id);
167 WS_DLL_PUBLIC
int dissect_ber_GeneralizedTime(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id);
169 WS_DLL_PUBLIC
int dissect_ber_UTCTime(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *tree,
tvbuff_t *tvb,
int offset, gint hf_id);
181 extern int dissect_ber_constrained_bitstring(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *parent_tree,
tvbuff_t *tvb,
int offset, gint32 min_len, gint32 max_len,
const asn_namedbit *named_bits, gint hf_id, gint ett_id,
tvbuff_t **out_tvb);
183 extern int dissect_ber_bitstring32(gboolean implicit_tag,
asn1_ctx_t *actx,
proto_tree *parent_tree,
tvbuff_t *tvb,
int offset,
int **bit_fields, gint hf_id, gint ett_id,
tvbuff_t **out_tvb);
188 void register_ber_oid_dissector_handle(
const char *oid,
dissector_handle_t dissector,
int proto,
const char *name);
190 void register_ber_oid_dissector(
const char *oid, dissector_t dissector,
int proto,
const char *name);
192 void register_ber_syntax_dissector(
const char *syntax,
int proto, dissector_t dissector);
193 void register_ber_oid_name(
const char *oid,
const char *name);
195 void register_ber_oid_syntax(
const char *oid,
const char *name,
const char *syntax);
199 void ber_decode_as_foreach(GHFunc func, gpointer user_data);
201 void ber_decode_as(
const gchar *syntax);
203 void ber_set_filename(gchar *filename);
206 gboolean oid_has_dissector(
const char *oid);
Definition: packet-ber.h:171
Definition: packet-ber.h:112
Definition: packet_info.h:44
Definition: packet-ber.h:126
Definition: tvbuff-int.h:35