Make the "strings" pointer in a "header_field_info" structure a const
[obnox/wireshark/wip.git] / epan / proto.h
1 /* proto.h
2  * Definitions for protocol display
3  *
4  * $Id: proto.h,v 1.37 2002/11/28 01:46:12 guy Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __PROTO_H__
26 #define __PROTO_H__
27
28 #ifdef HAVE_STDARG_H
29 # include <stdarg.h>
30 #else
31 # include <varargs.h>
32 #endif
33
34 #include <glib.h>
35
36 #include "ipv4.h"
37 #include "nstime.h"
38 #include "tvbuff.h"
39 #include "ftypes/ftypes.h"
40
41 struct _value_string;
42
43 #define ITEM_LABEL_LENGTH       240
44
45 /* In order to make a const value_string[] look like a value_string*, I
46  * need this macro */
47 #define VALS(x) (const struct _value_string*)(x)
48
49 /* ... and similarly, */
50 #define TFS(x)  (const struct true_false_string*)(x)
51
52 /* check protocol activation */
53 #define CHECK_DISPLAY_AS_X(x_handle,index, tvb, pinfo, tree) {  \
54         if (!proto_is_protocol_enabled(index)) {                \
55                 call_dissector(x_handle,tvb, pinfo, tree);      \
56                 return;                                         \
57         }                                                       \
58   }
59
60 enum {
61         BASE_NONE,
62         BASE_DEC,
63         BASE_HEX,
64         BASE_OCT,
65         BASE_BIN
66 };
67
68 typedef struct _header_field_info header_field_info;
69
70 /* information describing a header field */
71 struct _header_field_info {
72         /* ---------- set by dissector --------- */
73         char                            *name;
74         char                            *abbrev;
75         enum ftenum                     type;
76         int                             display;        /* for integers only, so far. Base */
77         const void                      *strings;       /* val_string or true_false_string */
78         guint32                         bitmask;
79         char                            *blurb;         /* Brief description of field. */
80
81         /* ---------- set by proto routines --------- */
82         int                             id;             /* Field ID */
83         int                             parent;         /* parent protocol */
84         int                             bitshift;       /* bits to shift */
85         header_field_info               *same_name_next; /* Link to next hfinfo with same abbrev*/
86         header_field_info               *same_name_prev; /* Link to previous hfinfo with same abbrev*/
87 };
88
89 /*
90  * HFILL initializes all the "set by proto routines" fields in a
91  * "header_field_info"; if new fields are added or removed, it should
92  * be changed as necessary.
93  */
94 #define HFILL 0, 0, 0, NULL, NULL
95
96 /* Used when registering many fields at once */
97 typedef struct hf_register_info {
98         int                     *p_id;  /* pointer to int; written to by register() function */
99         header_field_info       hfinfo;
100 } hf_register_info;
101
102
103 /* Contains the field information for the proto_item. */
104 typedef struct field_info {
105         header_field_info               *hfinfo;
106         gint                            start;
107         gint                            length;
108         gint                            tree_type; /* ETT_* */
109         char                            *representation; /* for GUI tree */
110         int                             visible;
111         fvalue_t                        *value;
112         tvbuff_t                        *ds_tvb;  /* data source tvbuff */
113 } field_info;
114
115 /* One of these exists for the entire protocol tree. Each proto_node
116  * in the protocol tree points to the same copy. */
117 typedef struct {
118     GHashTable  *interesting_hfids;
119     gboolean    visible;
120 } tree_data_t;
121
122 /* Each GNode (proto_tree, proto_item) points to one of
123  * these. */
124 typedef struct {
125     field_info  *finfo;
126     tree_data_t *tree_data;
127 } proto_node;
128
129 typedef GNode proto_tree;
130 typedef GNode proto_item;
131
132 /* Retrieve the proto_node from a GNode. */
133 #define GNODE_PNODE(t)  ((proto_node*)((GNode*)(t))->data)
134
135 /* Retrieve the field_info from a proto_item */
136 #define PITEM_FINFO(t)  (GNODE_PNODE(t)->finfo)
137
138 /* Retrieve the tree_data_t from a proto_tree */
139 #define PTREE_DATA(t)   (GNODE_PNODE(t)->tree_data)
140
141 /* Sets up memory used by proto routines. Called at program startup */
142 extern void proto_init(const char *plugin_dir,
143     void (register_all_protocols)(void), void (register_all_handoffs)(void));
144
145 /* Frees memory used by proto routines. Called at program shutdown */
146 extern void proto_cleanup(void);
147
148 /* Set text of proto_item after having already been created. */
149 #if __GNUC__ >= 2
150 extern void proto_item_set_text(proto_item *ti, const char *format, ...)
151         __attribute__((format (printf, 2, 3)));
152 #else
153 extern void proto_item_set_text(proto_item *ti, const char *format, ...);
154 #endif
155
156 /* Append to text of proto_item after having already been created. */
157 #if __GNUC__ >= 2
158 extern void proto_item_append_text(proto_item *ti, const char *format, ...)
159         __attribute__((format (printf, 2, 3)));
160 #else
161 extern void proto_item_append_text(proto_item *ti, const char *format, ...);
162 #endif
163
164 /* Set length of proto_item after having already been created. */
165 extern void proto_item_set_len(proto_item *ti, gint length);
166
167 /* Get length of proto_item. Useful after using proto_tree_add_item()
168  * to add a variable-length field (e.g., FT_NSTRING_UINT8) */
169 extern int proto_item_get_len(proto_item *ti);
170
171 /* Creates new proto_tree root */
172 extern proto_tree* proto_tree_create_root(void);
173
174 /* Mark a field/protocol ID as "interesting". */
175 extern void
176 proto_tree_prime_hfid(proto_tree *tree, int hfid);
177
178 /* Clear memory for entry proto_tree. Clears proto_tree struct also. */
179 extern void proto_tree_free(proto_tree *tree);
180
181 /* Create a subtree under an existing item; returns tree pointer */
182 extern proto_tree* proto_item_add_subtree(proto_item *ti, gint idx);
183
184 extern int
185 proto_register_field(char *name, char *abbrev, enum ftenum type, int parent,
186         struct _value_string* vals);
187
188 extern int
189 proto_register_protocol(char *name, char *short_name, char *filter_name);
190
191 extern void
192 proto_register_field_array(int parent, hf_register_info *hf, int num_records);
193
194 extern void
195 proto_register_subtree_array(gint **indices, int num_indices);
196
197 /* Add an item to a proto_tree, using the text label registered to that item;
198    the item is extracted from the tvbuff handed to it. */
199 extern proto_item *
200 proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
201     gint start, gint length, gboolean little_endian);
202
203 extern proto_item *
204 proto_tree_add_item_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb,
205     gint start, gint length, gboolean little_endian);
206
207 /* Add a FT_NONE to a proto_tree */
208 #if __GNUC__ >= 2
209 extern proto_item *
210 proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
211         gint length, const char *format, ...)
212         __attribute__((format (printf, 6, 7)));
213 #else
214 extern proto_item *
215 proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
216         gint length, const char *format, ...);
217 #endif
218
219 /* Add a FT_PROTOCOL to a proto_tree */
220 #if __GNUC__ >= 2
221 extern proto_item *
222 proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
223         gint length, const char *format, ...)
224         __attribute__((format (printf, 6, 7)));
225 #else
226 extern proto_item *
227 proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
228         gint length, const char *format, ...);
229 #endif
230
231 /* Add a FT_BYTES to a proto_tree */
232 extern proto_item *
233 proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
234         gint length, const guint8* start_ptr);
235
236 extern proto_item *
237 proto_tree_add_bytes_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
238         gint length, const guint8* start_ptr);
239
240 #if __GNUC__ >= 2
241 extern proto_item *
242 proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
243         gint length, const guint8* start_ptr, const char *format, ...)
244         __attribute__((format (printf, 7, 8)));
245 #else
246 extern proto_item *
247 proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
248         gint length, const guint8* start_ptr, const char *format, ...);
249 #endif
250
251 /* Add a FT_*TIME to a proto_tree */
252 extern proto_item *
253 proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
254         gint length, nstime_t* value_ptr);
255
256 extern proto_item *
257 proto_tree_add_time_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
258         gint length, nstime_t* value_ptr);
259
260 #if __GNUC__ >= 2
261 extern proto_item *
262 proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
263         gint length, nstime_t* value_ptr, const char *format, ...)
264         __attribute__((format (printf, 7, 8)));
265 #else
266 extern proto_item *
267 proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
268         gint length, nstime_t* value_ptr, const char *format, ...);
269 #endif
270
271 /* Add a FT_IPXNET to a proto_tree */
272 extern proto_item *
273 proto_tree_add_ipxnet(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
274         gint length, guint32 value);
275
276 extern proto_item *
277 proto_tree_add_ipxnet_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
278         gint length, guint32 value);
279
280 #if __GNUC__ >= 2
281 extern proto_item *
282 proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
283         gint length, guint32 value, const char *format, ...)
284         __attribute__((format (printf, 7, 8)));
285 #else
286 extern proto_item *
287 proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
288         gint length, guint32 value, const char *format, ...);
289 #endif
290
291 /* Add a FT_IPv4 to a proto_tree */
292 extern proto_item *
293 proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
294         gint length, guint32 value);
295
296 extern proto_item *
297 proto_tree_add_ipv4_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
298         gint length, guint32 value);
299
300 #if __GNUC__ >= 2
301 extern proto_item *
302 proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
303         gint length, guint32 value, const char *format, ...)
304         __attribute__((format (printf, 7, 8)));
305 #else
306 extern proto_item *
307 proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
308         gint length, guint32 value, const char *format, ...);
309 #endif
310
311 /* Add a FT_IPv6 to a proto_tree */
312 extern proto_item *
313 proto_tree_add_ipv6(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
314         gint length, const guint8* value_ptr);
315
316 extern proto_item *
317 proto_tree_add_ipv6_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
318         gint length, const guint8* value_ptr);
319
320 #if __GNUC__ >= 2
321 extern proto_item *
322 proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
323         gint length, const guint8* value_ptr, const char *format, ...)
324         __attribute__((format (printf, 7, 8)));
325 #else
326 extern proto_item *
327 proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
328         gint length, const guint8* value_ptr, const char *format, ...);
329 #endif
330
331 /* Add a FT_ETHER to a proto_tree */
332 extern proto_item *
333 proto_tree_add_ether(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
334         gint length, const guint8* value);
335
336 extern proto_item *
337 proto_tree_add_ether_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
338         gint length, const guint8* value);
339
340 #if __GNUC__ >= 2
341 extern proto_item *
342 proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
343         gint length, const guint8* value, const char *format, ...)
344         __attribute__((format (printf, 7, 8)));
345 #else
346 extern proto_item *
347 proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
348         gint length, const guint8* value, const char *format, ...);
349 #endif
350
351 /* Add a FT_STRING to a proto_tree */
352 extern proto_item *
353 proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
354         gint length, const char* value);
355
356 extern proto_item *
357 proto_tree_add_string_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
358         gint length, const char* value);
359
360 #if __GNUC__ >= 2
361 extern proto_item *
362 proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
363         gint length, const char* value, const char *format, ...)
364         __attribute__((format (printf, 7, 8)));
365 #else
366 extern proto_item *
367 proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
368         gint length, const char* value, const char *format, ...);
369 #endif
370
371 /* Add a FT_BOOLEAN to a proto_tree */
372 extern proto_item *
373 proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
374         gint length, guint32 value);
375
376 extern proto_item *
377 proto_tree_add_boolean_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
378         gint length, guint32 value);
379
380 #if __GNUC__ >= 2
381 extern proto_item *
382 proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
383         gint length, guint32 value, const char *format, ...)
384         __attribute__((format (printf, 7, 8)));
385 #else
386 extern proto_item *
387 proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
388         gint length, guint32 value, const char *format, ...);
389 #endif
390
391 /* Add a FT_FLOAT to a proto_tree */
392 extern proto_item *
393 proto_tree_add_float(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
394         gint length, float value);
395
396 extern proto_item *
397 proto_tree_add_float_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
398         gint length, float value);
399
400 #if __GNUC__ >= 2
401 extern proto_item *
402 proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
403         gint length, float value, const char *format, ...)
404         __attribute__((format (printf, 7, 8)));
405 #else
406 extern proto_item *
407 proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
408         gint length, float value, const char *format, ...);
409 #endif
410
411 /* Add a FT_DOUBLE to a proto_tree */
412 extern proto_item *
413 proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
414         gint length, double value);
415
416 extern proto_item *
417 proto_tree_add_double_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
418         gint length, double value);
419
420 #if __GNUC__ >= 2
421 extern proto_item *
422 proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
423         gint length, double value, const char *format, ...)
424         __attribute__((format (printf, 7, 8)));
425 #else
426 extern proto_item *
427 proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
428         gint length, double value, const char *format, ...);
429 #endif
430
431 /* Add any FT_UINT* to a proto_tree */
432 extern proto_item *
433 proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
434         gint length, guint32 value);
435
436 extern proto_item *
437 proto_tree_add_uint_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
438         gint length, guint32 value);
439
440 #if __GNUC__ >= 2
441 extern proto_item *
442 proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
443         gint length, guint32 value, const char *format, ...)
444         __attribute__((format (printf, 7, 8)));
445 #else
446 extern proto_item *
447 proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
448         gint length, guint32 value, const char *format, ...);
449 #endif
450
451 /* Add any FT_INT* to a proto_tree */
452 extern proto_item *
453 proto_tree_add_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
454         gint length, gint32 value);
455
456 extern proto_item *
457 proto_tree_add_int_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
458         gint length, gint32 value);
459
460 #if __GNUC__ >= 2
461 extern proto_item *
462 proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
463         gint length, gint32 value, const char *format, ...)
464         __attribute__((format (printf, 7, 8)));
465 #else
466 extern proto_item *
467 proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
468         gint length, gint32 value, const char *format, ...);
469 #endif
470
471
472 /* Add a text-only node to the proto_tree */
473 #if __GNUC__ >= 2
474 extern proto_item *
475 proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *,
476         ...) __attribute__((format (printf, 5, 6)));
477 #else
478 extern proto_item *
479 proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *,
480         ...);
481 #endif
482
483 extern proto_item *
484 proto_tree_add_text_valist(proto_tree *tree, tvbuff_t *tvb, gint start,
485         gint length, const char *format, va_list ap);
486
487
488 /* Useful for quick debugging. Also sends string to STDOUT, so don't
489  * leave call to this function in production code. */
490 #if __GNUC__ >= 2
491 extern proto_item *
492 proto_tree_add_debug_text(proto_tree *tree, const char *format, ...)
493         __attribute__((format (printf, 2, 3)));
494 #else
495 extern proto_item *
496 proto_tree_add_debug_text(proto_tree *tree, const char *format, ...);
497 #endif
498
499 extern void
500 proto_item_fill_label(field_info *fi, gchar *label_str);
501
502 extern void
503 proto_tree_set_visible(proto_tree *tree, gboolean visible);
504
505 /* Returns number of items (protocols or header fields) registered. */
506 extern int proto_registrar_n(void);
507
508 /* Returns char* to name for item # n (0-indexed) */
509 extern char* proto_registrar_get_name(int n);
510
511 /* Returns char* to abbrev for item # n (0-indexed) */
512 extern char* proto_registrar_get_abbrev(int n);
513
514 /* get the header field information based upon a field or protocol id */
515 extern header_field_info* proto_registrar_get_nth(int hfindex);
516
517 /* get the header field information based upon a field name */
518 extern header_field_info* proto_registrar_get_byname(char *field_name);
519
520 /* Returns enum ftenum for item # n */
521 extern int proto_registrar_get_ftype(int n);
522
523 /* Returns parent protocol for item # n.
524  * Returns -1 if item _is_ a protocol */
525 extern int proto_registrar_get_parent(int n);
526
527 /* Is item #n a protocol? */
528 extern gboolean proto_registrar_is_protocol(int n);
529
530 /* Is item #n decoding enabled ? */
531 extern gboolean proto_is_protocol_enabled(int proto_id);
532
533 /* Can item #n decoding be disabled? */
534 extern gboolean proto_can_disable_protocol(int proto_id);
535
536 /* Routines to use to iterate over the protocols; they return the item
537  * number of the protocol in question, and keep state in "*cookie". */
538 extern int proto_get_first_protocol(void **cookie);
539 extern int proto_get_next_protocol(void **cookie);
540
541 /* Given a protocol's filter_name, return it's proto_id */
542 extern int proto_get_id_by_filter_name(gchar* filter_name);
543
544 /* Given a protocol's item number, return its name. */
545 extern char *proto_get_protocol_name(int n);
546
547 /* Given a protocol's item number, return its short name. */
548 extern char *proto_get_protocol_short_name(int proto_id);
549
550 /* Given a protocol's item number, return its filter name. */
551 extern char *proto_get_protocol_filter_name(int proto_id);
552
553 /* Enable / Disable protocol */
554 extern void proto_set_decoding(int proto_id, gboolean enabled);
555
556 /* Disable disabling of protocol */
557 extern void proto_set_cant_disable(int proto_id);
558
559 /* Get length of registered field according to field type.
560  * 0 means undeterminable at registration time.
561  * -1 means unknown field */
562 extern gint proto_registrar_get_length(int n);
563
564 /* Checks for existence any protocol or field within a tree.
565  * "Protocols" are assumed to be a child of the [empty] root node.
566  * TRUE = found, FALSE = not found */
567 extern gboolean proto_check_for_protocol_or_field(proto_tree* tree, int id);
568
569 /* Return GPtrArray* of field_info pointers for all hfindex that appear in
570  * tree. */
571 extern GPtrArray* proto_get_finfo_ptr_array(proto_tree *tree, int hfindex);
572
573 /* Dumps a glossary of the protocol registrations to STDOUT */
574 extern void proto_registrar_dump_protocols(void);
575
576 /* Dumps a glossary of the protocol and field registrations to STDOUT */
577 extern void proto_registrar_dump_fields(void);
578
579 /* Points to the first element of an array of Booleans, indexed by
580    a subtree item type; that array element is TRUE if subtrees of
581    an item of that type are to be expanded. */
582 extern gboolean      *tree_is_expanded;
583
584 /* Number of elements in that array. */
585 extern int           num_tree_types;
586
587 /* glib doesn't have g_ptr_array_len of all things!*/
588 #ifndef g_ptr_array_len
589 #define g_ptr_array_len(a)      ((a)->len)
590 #endif
591
592 extern int
593 hfinfo_bitwidth(header_field_info *hfinfo);
594
595 /*
596  * Returns TRUE if we can do a "match selected" on the field, FALSE
597  * otherwise.
598  */
599 extern gboolean
600 proto_can_match_selected(field_info *finfo);
601
602 extern char*
603 proto_alloc_dfilter_string(field_info *finfo, guint8 *pd);
604
605 extern field_info*
606 proto_find_field_from_offset(proto_tree *tree, guint offset, tvbuff_t *tvb);
607
608 #endif /* proto.h */