rerun pidl
[metze/wireshark/wip.git] / epan / packet.h
1 /* packet.h
2  * Definitions for packet disassembly structures and routines
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
23  */
24
25 #ifndef __PACKET_H__
26 #define __PACKET_H__
27
28 #include "proto.h"
29 #include "tvbuff.h"
30 #include "value_string.h"
31 #include "frame_data.h"
32 #include "packet_info.h"
33 #include "column-utils.h"
34 #include "tfs.h"
35 #include "ws_symbol_export.h"
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif /* __cplusplus */
40
41 struct epan_range;
42
43 /** @defgroup packet General Packet Dissection
44  *
45  * @{
46  */
47
48 #define hi_nibble(b) (((b) & 0xf0) >> 4)
49 #define lo_nibble(b) ((b) & 0x0f)
50
51 /* Useful when you have an array whose size you can tell at compile-time */
52 #define array_length(x) (sizeof x / sizeof x[0])
53
54 /* Check whether the "len" bytes of data starting at "offset" is
55  * entirely inside the captured data for this packet. */
56 #define BYTES_ARE_IN_FRAME(offset, captured_len, len) \
57         ((guint)(offset) + (guint)(len) > (guint)(offset) && \
58          (guint)(offset) + (guint)(len) <= (guint)(captured_len))
59
60 /* To pass one of two strings, singular or plural */
61 #define plurality(d,s,p) ((d) == 1 ? (s) : (p))
62
63 typedef struct _packet_counts {
64   gint           sctp;
65   gint           tcp;
66   gint           udp;
67   gint           icmp;
68   gint           ospf;
69   gint           gre;
70   gint           netbios;
71   gint           ipx;
72   gint           vines;
73   gint           other;
74   gint           total;
75   gint           arp;
76   gint           i2c_event;
77   gint           i2c_data;
78 } packet_counts;
79
80 /** Number of packet counts. */
81 #define PACKET_COUNTS_SIZE sizeof(packet_counts) / sizeof (gint)
82
83 extern void packet_init(void);
84 extern void packet_cache_proto_handles(void);
85 extern void packet_cleanup(void);
86
87 /* Handle for dissectors you call directly or register with "dissector_add_uint()".
88    This handle is opaque outside of "packet.c". */
89 struct dissector_handle;
90 typedef struct dissector_handle *dissector_handle_t;
91
92 /* Hash table for matching unsigned integers, or strings, and dissectors;
93    this is opaque outside of "packet.c". */
94 struct dissector_table;
95 typedef struct dissector_table *dissector_table_t;
96
97 /*
98  * Dissector that returns nothing.
99  */
100 typedef void (*dissector_t)(tvbuff_t *, packet_info *, proto_tree *);
101
102 /*
103  * Dissector that returns:
104  *
105  *      The amount of data in the protocol's PDU, if it was able to
106  *      dissect all the data;
107  *
108  *      0, if the tvbuff doesn't contain a PDU for that protocol;
109  *
110  *      The negative of the amount of additional data needed, if
111  *      we need more data (e.g., from subsequent TCP segments) to
112  *      dissect the entire PDU.
113  */
114 typedef int (*new_dissector_t)(tvbuff_t *, packet_info *, proto_tree *, void *);
115
116 /** Type of a heuristic dissector, used in heur_dissector_add().
117  *
118  * @param tvb the tvbuff with the (remaining) packet data
119  * @param pinfo the packet info of this packet (additional info)
120  * @param tree the protocol tree to be build or NULL
121  * @return TRUE if the packet was recognized by the sub-dissector (stop dissection here)
122  */
123 typedef gboolean (*heur_dissector_t)(tvbuff_t *tvb, packet_info *pinfo,
124         proto_tree *tree, void *);
125
126 typedef void (*DATFunc) (const gchar *table_name, ftenum_t selector_type,
127     gpointer key, gpointer value, gpointer user_data);
128 typedef void (*DATFunc_handle) (const gchar *table_name, gpointer value,
129     gpointer user_data);
130 typedef void (*DATFunc_table) (const gchar *table_name, const gchar *ui_name,
131     gpointer user_data);
132
133 typedef void (*DATFunc_heur_table) (const gchar *table_name,gpointer table,
134     gpointer user_data);
135
136 /* Opaque structure - provides type checking but no access to components */
137 typedef struct dtbl_entry dtbl_entry_t;
138
139 WS_DLL_PUBLIC dissector_handle_t dtbl_entry_get_handle (dtbl_entry_t *dtbl_entry);
140 WS_DLL_PUBLIC dissector_handle_t dtbl_entry_get_initial_handle (dtbl_entry_t * entry);
141
142 /** Iterate over dissectors in a table with non-default "decode as" settings.
143  *
144  * Walk one dissector table calling a user supplied function only on
145  * any entry that has been changed from its original state.
146  *
147  * @param[in] table_name The name of the dissector table, e.g. "ip.proto".
148  * @param[in] func The function to call for each dissector.
149  * @param[in] user_data User data to pass to the function.
150  */
151 void dissector_table_foreach_changed (const char *table_name, DATFunc func,
152     gpointer user_data);
153
154 /** Iterate over dissectors in a table.
155  *
156  * Walk one dissector table's hash table calling a user supplied function
157  * on each entry.
158  *
159  * @param[in] table_name The name of the dissector table, e.g. "ip.proto".
160  * @param[in] func The function to call for each dissector.
161  * @param[in] user_data User data to pass to the function.
162  */
163 WS_DLL_PUBLIC void dissector_table_foreach (const char *table_name, DATFunc func,
164     gpointer user_data);
165
166 /** Iterate over dissectors with non-default "decode as" settings.
167  *
168  * Walk all dissector tables calling a user supplied function only on
169  * any "decode as" entry that has been changed from its original state.
170  *
171  * @param[in] func The function to call for each dissector.
172  * @param[in] user_data User data to pass to the function.
173  */
174 WS_DLL_PUBLIC void dissector_all_tables_foreach_changed (DATFunc func,
175     gpointer user_data);
176
177 /** Iterate over dissectors in a table by handle.
178  *
179  * Walk one dissector table's list of handles calling a user supplied
180  * function on each entry.
181  *
182  * @param[in] table_name The name of the dissector table, e.g. "ip.proto".
183  * @param[in] func The function to call for each dissector.
184  * @param[in] user_data User data to pass to the function.
185  */
186 WS_DLL_PUBLIC void dissector_table_foreach_handle(const char *table_name, DATFunc_handle func,
187     gpointer user_data);
188
189 /** Iterate over dissectors in a table matching against a given function.
190  *
191  * Walk all dissector tables calling a user supplied function on each
192  * table.
193  * @param[in] func The function to call for each dissector.
194  * @param[in] user_data User data to pass to the function.
195  * @param[in] compare_key_func Hash table key comparison function. All entries
196  * are matched if NULL.
197  */
198 WS_DLL_PUBLIC void dissector_all_tables_foreach_table (DATFunc_table func,
199     gpointer user_data, GCompareFunc compare_key_func);
200
201 /* a protocol uses the function to register a sub-dissector table */
202 WS_DLL_PUBLIC dissector_table_t register_dissector_table(const char *name,
203     const char *ui_name, const ftenum_t type, const int base);
204
205 /* Find a dissector table by table name. */
206 WS_DLL_PUBLIC dissector_table_t find_dissector_table(const char *name);
207
208 /* Get the UI name for a sub-dissector table, given its internal name */
209 WS_DLL_PUBLIC const char *get_dissector_table_ui_name(const char *name);
210
211 /* Get the field type for values of the selector for a dissector table,
212    given the table's internal name */
213 WS_DLL_PUBLIC ftenum_t get_dissector_table_selector_type(const char *name);
214
215 /* Get the base to use when displaying values of the selector for a
216    sub-dissector table, given the table's internal name */
217 WS_DLL_PUBLIC int get_dissector_table_base(const char *name);
218
219 /* Add an entry to a uint dissector table. */
220 WS_DLL_PUBLIC void dissector_add_uint(const char *abbrev, const guint32 pattern,
221     dissector_handle_t handle);
222
223 /* Add an range of entries to a uint dissector table. */
224 WS_DLL_PUBLIC void dissector_add_uint_range(const char *abbrev, struct epan_range *range,
225     dissector_handle_t handle);
226
227 /* Delete the entry for a dissector in a uint dissector table
228    with a particular pattern. */
229 WS_DLL_PUBLIC void dissector_delete_uint(const char *name, const guint32 pattern,
230     dissector_handle_t handle);
231
232 /* Delete an range of entries from a uint dissector table. */
233 WS_DLL_PUBLIC void dissector_delete_uint_range(const char *abbrev, struct epan_range *range,
234     dissector_handle_t handle);
235
236 /* Delete all entries from a dissector table. */
237 WS_DLL_PUBLIC void dissector_delete_all(const char *name, dissector_handle_t handle);
238
239 /* Change the entry for a dissector in a uint dissector table
240    with a particular pattern to use a new dissector handle. */
241 WS_DLL_PUBLIC void dissector_change_uint(const char *abbrev, const guint32 pattern,
242     dissector_handle_t handle);
243
244 /* Reset an entry in a uint dissector table to its initial value. */
245 WS_DLL_PUBLIC void dissector_reset_uint(const char *name, const guint32 pattern);
246
247 /* Look for a given value in a given uint dissector table and, if found,
248    call the dissector with the arguments supplied, and return TRUE,
249    otherwise return FALSE. */
250 WS_DLL_PUBLIC gboolean dissector_try_uint(dissector_table_t sub_dissectors,
251     const guint32 uint_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
252
253 /* Look for a given value in a given uint dissector table and, if found,
254    call the dissector with the arguments supplied, and return TRUE,
255    otherwise return FALSE. */
256 WS_DLL_PUBLIC gboolean dissector_try_uint_new(dissector_table_t sub_dissectors,
257     const guint32 uint_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const gboolean add_proto_name, void *data);
258
259 /** Look for a given value in a given uint dissector table and, if found,
260  * return the current dissector handle for that value.
261  *
262  * @param[in] sub_dissectors Dissector table to search.
263  * @param[in] uint_val Value to match, e.g. the port number for the TCP dissector.
264  * @return The matching dissector handle on success, NULL if no match is found.
265  */
266 WS_DLL_PUBLIC dissector_handle_t dissector_get_uint_handle(
267     dissector_table_t const sub_dissectors, const guint32 uint_val);
268
269 /** Look for a given value in a given uint dissector table and, if found,
270  * return the default dissector handle for that value.
271  *
272  * @param[in] name Dissector table name.
273  * @param[in] uint_val Value to match, e.g. the port number for the TCP dissector.
274  * @return The matching dissector handle on success, NULL if no match is found.
275  */
276 WS_DLL_PUBLIC dissector_handle_t dissector_get_default_uint_handle(
277     const char *name, const guint32 uint_val);
278
279 /* Add an entry to a string dissector table. */
280 WS_DLL_PUBLIC void dissector_add_string(const char *name, const gchar *pattern,
281     dissector_handle_t handle);
282
283 /* Delete the entry for a dissector in a string dissector table
284    with a particular pattern. */
285 WS_DLL_PUBLIC void dissector_delete_string(const char *name, const gchar *pattern,
286         dissector_handle_t handle);
287
288 /* Change the entry for a dissector in a string dissector table
289    with a particular pattern to use a new dissector handle. */
290 WS_DLL_PUBLIC void dissector_change_string(const char *name, const gchar *pattern,
291     dissector_handle_t handle);
292
293 /* Reset an entry in a string sub-dissector table to its initial value. */
294 WS_DLL_PUBLIC void dissector_reset_string(const char *name, const gchar *pattern);
295
296 /* Look for a given string in a given dissector table and, if found, call
297    the dissector with the arguments supplied, and return TRUE, otherwise
298    return FALSE. */
299 WS_DLL_PUBLIC gboolean dissector_try_string(dissector_table_t sub_dissectors,
300     const gchar *string, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
301
302 /** Look for a given value in a given string dissector table and, if found,
303  * return the current dissector handle for that value.
304  *
305  * @param[in] sub_dissectors Dissector table to search.
306  * @param[in] string Value to match, e.g. the OID for the BER dissector.
307  * @return The matching dissector handle on success, NULL if no match is found.
308  */
309 WS_DLL_PUBLIC dissector_handle_t dissector_get_string_handle(
310     dissector_table_t sub_dissectors, const gchar *string);
311
312 /** Look for a given value in a given string dissector table and, if found,
313  * return the default dissector handle for that value.
314  *
315  * @param[in] name Dissector table name.
316  * @param[in] string Value to match, e.g. the OID for the BER dissector.
317  * @return The matching dissector handle on success, NULL if no match is found.
318  */
319 WS_DLL_PUBLIC dissector_handle_t dissector_get_default_string_handle(
320     const char *name, const gchar *string);
321
322 /* Add a handle to the list of handles that *could* be used with this
323    table.  That list is used by code in the UI. */
324 WS_DLL_PUBLIC void dissector_add_handle(const char *name, dissector_handle_t handle);
325
326 /** Get the list of handles for a dissector table
327  */
328 WS_DLL_PUBLIC GSList *dissector_table_get_dissector_handles(dissector_table_t dissector_table);
329
330 /** Get a dissector table's type
331  */
332 WS_DLL_PUBLIC ftenum_t dissector_table_get_type(dissector_table_t dissector_table);
333
334 /* List of "heuristic" dissectors (which get handed a packet, look at it,
335    and either recognize it as being for their protocol, dissect it, and
336    return TRUE, or don't recognize it and return FALSE) to be called
337    by another dissector. */
338 typedef GSList *heur_dissector_list_t;
339
340
341 typedef struct {
342         heur_dissector_t dissector;
343         protocol_t *protocol;
344         gboolean enabled;
345 } heur_dtbl_entry_t;
346
347 /** A protocol uses this function to register a heuristic sub-dissector list.
348  *  Call this in the parent dissectors proto_register function.
349  *
350  * @param name the name of this protocol
351  * @param list the list of heuristic sub-dissectors to be registered
352  */
353 WS_DLL_PUBLIC void register_heur_dissector_list(const char *name,
354     heur_dissector_list_t *list);
355
356 WS_DLL_PUBLIC void dissector_all_heur_tables_foreach_table (DATFunc_heur_table func,
357     gpointer user_data);
358
359 /** Try all the dissectors in a given heuristic dissector list. This is done,
360  *  until we find one that recognizes the protocol.
361  *  Call this while the parent dissector running.
362  *
363  * @param sub_dissectors the sub-dissector list
364  * @param tvb the tvbuff with the (remaining) packet data
365  * @param pinfo the packet info of this packet (additional info)
366  * @param tree the protocol tree to be build or NULL
367  * @param data parameter to pass to subdissector
368  * @return TRUE if the packet was recognized by the sub-dissector (stop dissection here)
369  */
370 WS_DLL_PUBLIC gboolean dissector_try_heuristic(heur_dissector_list_t sub_dissectors,
371     tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
372
373 /** Add a sub-dissector to a heuristic dissector list.
374  *  Call this in the proto_handoff function of the sub-dissector.
375  *
376  * @param name the name of the "parent" protocol, e.g. "tcp"
377  * @param dissector the sub-dissector to be registered
378  * @param proto the protocol id of the sub-dissector
379  */
380 WS_DLL_PUBLIC void heur_dissector_add(const char *name, heur_dissector_t dissector,
381     const int proto);
382
383 /** Remove a sub-dissector from a heuristic dissector list.
384  *  Call this in the prefs_reinit function of the sub-dissector.
385  *
386  * @param name the name of the "parent" protocol, e.g. "tcp"
387  * @param dissector the sub-dissector to be unregistered
388  * @param proto the protocol id of the sub-dissector
389  */
390 WS_DLL_PUBLIC void heur_dissector_delete(const char *name, heur_dissector_t dissector, const int proto);
391
392 /** Enable/Disable a sub-dissector in a heuristic dissector list
393  *  Call this in the prefs_reinit function of the sub-dissector.
394  *
395  * @param name the name of the "parent" protocol, e.g. "tcp"
396  * @param dissector the sub-dissector to be disabled/enabled
397  * @param proto the protocol id of the sub-dissector
398  * @param enabled TRUE/FALSE to enable/disable the sub-dissector
399  */
400 extern void heur_dissector_set_enabled(const char *name, heur_dissector_t dissector, const int proto, const gboolean enabled);
401
402 /* Register a dissector. */
403 WS_DLL_PUBLIC dissector_handle_t register_dissector(const char *name, dissector_t dissector,
404     const int proto);
405 WS_DLL_PUBLIC dissector_handle_t new_register_dissector(const char *name, new_dissector_t dissector,
406     const int proto);
407
408 /* Get the long name of the protocol for a dissector handle. */
409 extern const char *dissector_handle_get_long_name(const dissector_handle_t handle);
410
411 /* Get the short name of the protocol for a dissector handle. */
412 WS_DLL_PUBLIC const char *dissector_handle_get_short_name(const dissector_handle_t handle);
413
414 /* Get the index of the protocol for a dissector handle. */
415 WS_DLL_PUBLIC int dissector_handle_get_protocol_index(const dissector_handle_t handle);
416
417 /* Find a dissector by name. */
418 WS_DLL_PUBLIC dissector_handle_t find_dissector(const char *name);
419
420 /* Get a dissector name from handle. */
421 WS_DLL_PUBLIC const char *dissector_handle_get_dissector_name(const dissector_handle_t handle);
422
423 /* Create an anonymous handle for a dissector. */
424 WS_DLL_PUBLIC dissector_handle_t create_dissector_handle(dissector_t dissector,
425     const int proto);
426 WS_DLL_PUBLIC dissector_handle_t new_create_dissector_handle(new_dissector_t dissector,
427     const int proto);
428
429 /* Call a dissector through a handle and if no dissector was found
430  * pass it over to the "data" dissector instead.
431  *
432  *   @param handle The dissector to call.
433  *   @param  tvb The buffer to dissect.
434  *   @param  pinfo Packet Info.
435  *   @param  tree The protocol tree.
436  *   @param  data parameter to pass to dissector
437  *   @return  If the protocol for that handle isn't enabled call the data
438  *   dissector. Otherwise, if the handle refers to a new-style
439  *   dissector, call the dissector and return its return value, otherwise call
440  *   it and return the length of the tvbuff pointed to by the argument.
441  */
442 WS_DLL_PUBLIC int call_dissector_with_data(dissector_handle_t handle, tvbuff_t *tvb,
443     packet_info *pinfo, proto_tree *tree, void *data);
444 WS_DLL_PUBLIC int call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
445     packet_info *pinfo, proto_tree *tree);
446
447 /* Call a dissector through a handle but if no dissector was found
448  * just return 0 and do not call the "data" dissector instead.
449  *
450  *   @param handle The dissector to call.
451  *   @param  tvb The buffer to dissect.
452  *   @param  pinfo Packet Info.
453  *   @param  tree The protocol tree.
454  *   @param  data parameter to pass to dissector
455  *   @return  If the protocol for that handle isn't enabled, return 0 without
456  *   calling the dissector. Otherwise, if the handle refers to a new-style
457  *   dissector, call the dissector and return its return value, otherwise call
458  *   it and return the length of the tvbuff pointed to by the argument.
459  */
460 WS_DLL_PUBLIC int call_dissector_only(dissector_handle_t handle, tvbuff_t *tvb,
461     packet_info *pinfo, proto_tree *tree, void *data);
462
463 /* Do all one-time initialization. */
464 extern void dissect_init(void);
465
466 extern void dissect_cleanup(void);
467
468 /*
469  * Given a tvbuff, and a length from a packet header, adjust the length
470  * of the tvbuff to reflect the specified length.
471  */
472 WS_DLL_PUBLIC void set_actual_length(tvbuff_t *tvb, const guint specified_len);
473
474 /* Allow protocols to register "init" routines, which are called before
475    we make a pass through a capture file and dissect all its packets
476    (e.g., when we read in a new capture file, or run a "filter packets"
477    or "colorize packets" pass over the current capture file). */
478 WS_DLL_PUBLIC void register_init_routine(void (*func)(void));
479
480 /* Initialize all data structures used for dissection. */
481 void init_dissection(void);
482
483 /* Free data structures allocated for dissection. */
484 void cleanup_dissection(void);
485
486 /* Allow protocols to register a "cleanup" routine to be
487  * run after the initial sequential run through the packets.
488  * Note that the file can still be open after this; this is not
489  * the final cleanup. */
490 WS_DLL_PUBLIC void register_postseq_cleanup_routine(void (*func)(void));
491
492 /* Call all the registered "postseq_cleanup" routines. */
493 WS_DLL_PUBLIC void postseq_cleanup_all_protocols(void);
494
495 /* Allow dissectors to register a "final_registration" routine
496  * that is run like the proto_register_XXX() routine, but the end
497  * end of the epan_init() function; that is, *after* all other
498  * subsystems, liked dfilters, have finished initializing. This is
499  * useful for dissector registration routines which need to compile
500  * display filters. dfilters can't initialize itself until all protocols
501  * have registereed themselvs. */
502 WS_DLL_PUBLIC void
503 register_final_registration_routine(void (*func)(void));
504
505 /* Call all the registered "final_registration" routines. */
506 extern void
507 final_registration_all_protocols(void);
508
509 /*
510  * Add a new data source to the list of data sources for a frame, given
511  * the tvbuff for the data source and its name.
512  */
513 WS_DLL_PUBLIC void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb,
514     const char *name);
515
516
517 /*
518  * Return the data source name, tvb.
519  */
520 struct data_source;
521 WS_DLL_PUBLIC const char *get_data_source_name(const struct data_source *src);
522 WS_DLL_PUBLIC tvbuff_t *get_data_source_tvb(const struct data_source *src);
523
524 /*
525  * Free up a frame's list of data sources.
526  */
527 extern void free_data_sources(packet_info *pinfo);
528
529 /* Mark another frame as depended upon by the current frame.
530  *
531  * This information is used to ensure that the dependend-upon frame is saved
532  * if the user does a File->Save-As of only the Displayed packets and the
533  * current frame passed the display filter.
534  */
535 WS_DLL_PUBLIC void mark_frame_as_depended_upon(packet_info *pinfo, guint32 frame_num);
536
537 /*
538  * Dissectors should never modify the packet data.
539  */
540 extern void dissect_packet(struct epan_dissect *edt,
541     struct wtap_pkthdr *phdr, tvbuff_t *tvb,
542     frame_data *fd, column_info *cinfo);
543
544 /*
545  * Dissectors should never modify the packet data.
546  */
547 extern void dissect_file(struct epan_dissect *edt,
548     struct wtap_pkthdr *phdr, tvbuff_t *tvb,
549     frame_data *fd, column_info *cinfo);
550
551 /* These functions are in packet-ethertype.c */
552 extern void capture_ethertype(guint16 etype, const guchar *pd, int offset,
553                 int len, packet_counts *ld);
554 /* Structure passed to the ethertype dissector */
555 typedef struct ethertype_data_s
556 {
557     guint16 etype;
558     int offset_after_ethertype;
559     proto_tree *fh_tree;
560     int etype_id;
561     int trailer_id;
562     int fcs_len;
563 } ethertype_data_t;
564
565 /*
566  * Dump layer/selector/dissector records in a fashion similar to the
567  * proto_registrar_dump_* routines.
568  */
569 WS_DLL_PUBLIC void dissector_dump_decodes(void);
570
571 /*
572  * For each heuristic dissector table, dump list of dissectors (filter_names) for that table
573  */
574 WS_DLL_PUBLIC void dissector_dump_heur_decodes(void);
575
576 /*
577  * post dissectors are to be called by packet-frame.c after every other
578  * dissector has been called.
579  */
580 WS_DLL_PUBLIC void register_postdissector(dissector_handle_t);
581 extern gboolean have_postdissector(void);
582 extern void call_all_postdissectors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
583
584 /** @} */
585
586 #ifdef __cplusplus
587 }
588 #endif /* __cplusplus */
589
590 #endif /* packet.h */