~jelmer/wireshark/daily-ppa

« back to all changes in this revision

Viewing changes to epan/dissectors/packet-ber.h

  • Committer: Bazaar Package Importer
  • Author(s): Balint Reczey
  • Date: 2010-11-20 18:41:41 UTC
  • mfrom: (1.1.28 upstream) (42.1.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20101120184141-19e4sxq2kfsdnc9i
Tags: 1.4.2-1
* New upstream release 1.4.2
  - release notes:
    http://www.wireshark.org/docs/relnotes/wireshark-1.4.2.html
  - security fixes
     - Nephi Johnson of BreakingPoint discovered that the LDSS dissector
       could overflow a buffer. (No assigned CVE number.)
     - The ZigBee ZCL dissector could go into an infinite loop.
       (No assigned CVE number.)
* drop 05_fix-display-filter-update-when-changing-profile.patch
  patch since it has been integrated upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Helpers for ASN.1/BER dissection
3
3
 * Ronnie Sahlberg (C) 2004
4
4
 *
5
 
 * $Id: packet-ber.h 26658 2008-10-31 18:42:53Z stig $
 
5
 * $Id: packet-ber.h 31447 2010-01-05 11:38:33Z stig $
6
6
 *
7
7
 * Wireshark - Network traffic analyzer
8
8
 * By Gerald Combs <gerald@wireshark.org>
38
38
} \
39
39
tvb_get_guint8(tvb, 9999);
40
40
 
 
41
/* value for value and size constraints */
 
42
#ifndef NO_BOUND
 
43
#define NO_BOUND -1
 
44
#endif
 
45
 
41
46
typedef int (*ber_callback)(gboolean imp_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
42
47
typedef int (*ber_type_fn)(gboolean, tvbuff_t*, int, asn1_ctx_t *actx, proto_tree*, int);
43
48
/* To be removed when the transition to the "New" type is complete */
107
112
 
108
113
extern 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);
109
114
 
 
115
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);
110
116
extern int dissect_ber_octet_string(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, tvbuff_t **out_tvb);
111
117
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);
112
118
extern int dissect_ber_old_octet_string_wcb(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, ber_old_callback func);
113
119
 
114
120
extern int dissect_ber_integer64(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, gint64 *value);
 
121
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);
115
122
 
116
123
extern int dissect_ber_integer(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, guint32 *value);
 
124
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);
117
125
 
118
126
extern int dissect_ber_null(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id);
119
127
 
178
186
/* 
179
187
 * This function dissects a BER strings
180
188
 */
 
189
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);
181
190
extern 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);
182
191
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);
183
192
 
189
198
 
190
199
/* this function dissects a BER sequence of
191
200
 */
 
201
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);
192
202
extern int dissect_ber_sequence_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id);
193
203
 
 
204
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);
194
205
extern int dissect_ber_set_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id);
195
206
 
196
207
/* To be removed when the transition to the "New" type is complete */
212
223
} asn_namedbit;
213
224
/* this function dissects a BER BIT-STRING
214
225
 */
 
226
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);
215
227
extern int dissect_ber_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const asn_namedbit *named_bits, gint hf_id, gint ett_id, tvbuff_t **out_tvb);
216
228
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);
217
229