35#define hi_nibble(b) (((b) & 0xf0) >> 4)
36#define lo_nibble(b) ((b) & 0x0f)
40#define BYTES_ARE_IN_FRAME(offset, captured_len, len) \
41 ((unsigned)(offset) + (unsigned)(len) > (unsigned)(offset) && \
42 (unsigned)(offset) + (unsigned)(len) <= (unsigned)(captured_len))
47#define STRING_CASE_SENSITIVE 0
48#define STRING_CASE_INSENSITIVE 1
50extern void packet_init(
void);
51extern void packet_cache_proto_handles(
void);
52extern void packet_all_tables_sort_handles(
void);
53extern void packet_cleanup(
void);
97typedef void (*DATFunc) (
const char *table_name, ftenum_t selector_type,
98 void *key,
void *value,
void *user_data);
99typedef void (*DATFunc_handle) (
const char *table_name,
void *value,
101typedef void (*DATFunc_table) (
const char *table_name,
const char *ui_name,
166 void *user_data, GCompareFunc compare_key_func);
175 const char *ui_name,
const int proto,
const ftenum_t type,
const int param);
182 const char *ui_name,
const int proto, GHashFunc hash_func, GEqualFunc key_equal_func,
183 GDestroyNotify key_destroy_func);
191 const char *alias_name);
200WS_DLL_PUBLIC
const char *get_dissector_table_ui_name(
const char *name);
204WS_DLL_PUBLIC ftenum_t get_dissector_table_selector_type(
const char *name);
208WS_DLL_PUBLIC
int get_dissector_table_param(
const char *name);
212WS_DLL_PUBLIC
void dissector_dump_dissector_tables(
void);
215WS_DLL_PUBLIC
void dissector_add_uint(
const char *name,
const uint32_t pattern,
219WS_DLL_PUBLIC
void dissector_add_uint_with_preference(
const char *name,
const uint32_t pattern,
270WS_DEPRECATED_X(
"Use dissector_try_uint_with_data instead")
293 const char *name,
const uint32_t uint_val);
296WS_DLL_PUBLIC
void dissector_add_string(
const char *name,
const char *pattern,
301WS_DLL_PUBLIC
void dissector_delete_string(
const char *name,
const char *pattern,
306WS_DLL_PUBLIC
void dissector_change_string(
const char *name,
const char *pattern,
310WS_DLL_PUBLIC
void dissector_reset_string(
const char *name,
const char *pattern);
316WS_DLL_PUBLIC
bool dissector_is_string_changed(
dissector_table_t const subdissectors,
const char *
string);
328WS_DEPRECATED_X(
"Use dissector_try_string_with_data instead")
334WS_DEPRECATED_X(
"Use dissector_try_string_with_data instead")
359 const char *name,
const char *
string);
362WS_DLL_PUBLIC
void dissector_add_custom_table_handle(
const char *name,
void *pattern,
383WS_DLL_PUBLIC
void dissector_add_guid(
const char *name,
guid_key* guid_val,
393WS_DLL_PUBLIC
void dissector_delete_guid(
const char *name,
guid_key* guid_val,
409WS_DLL_PUBLIC
int dissector_try_payload_with_data(
dissector_table_t sub_dissectors,
412WS_DEPRECATED_X(
"Use dissector_try_payload_with_data instead")
415 return dissector_try_payload_with_data(sub_dissectors, tvb, pinfo, tree, add_proto_name, data); \
421WS_DEPRECATED_X(
"Use dissector_try_payload_with_data instead")
425 return dissector_try_payload_with_data(sub_dissectors, tvb, pinfo, tree,
true, NULL); \
430WS_DLL_PUBLIC
void dissector_change_payload(
const char *abbrev,
dissector_handle_t handle);
433WS_DLL_PUBLIC
void dissector_reset_payload(
const char *name);
443WS_DLL_PUBLIC
void dissector_add_for_decode_as(
const char *name,
447WS_DLL_PUBLIC
void dissector_add_for_decode_as_with_preference(
const char *name,
485 const char *display_name;
488 bool enabled_by_default;
517typedef void (*DATFunc_heur) (
const char *table_name,
519typedef void (*DATFunc_heur_table) (
const char *table_name,
532 DATFunc_heur func,
void *user_data);
543 void *user_data, GCompareFunc compare_key_func);
546WS_DLL_PUBLIC
bool has_heur_dissector_list(
const char *name);
588 const char *display_name,
const char *internal_name,
const int proto, heuristic_enable_e enable);
619WS_DLL_PUBLIC
const char *dissector_handle_get_short_name(
const dissector_handle_t handle);
639WS_DLL_PUBLIC
const char *dissector_handle_get_pref_suffix(
const dissector_handle_t handle);
666 const int proto,
const char* name);
683 const int proto,
const char* name,
const char* description);
684WS_DLL_PUBLIC
dissector_handle_t create_dissector_handle_with_data(dissector_cb_t dissector,
685 const int proto,
void* cb_data);
688WS_DLL_PUBLIC
void dissector_dump_dissectors(
void);
773extern void dissect_init(
void);
775extern void dissect_cleanup(
void);
781WS_DLL_PUBLIC
void set_actual_length(
tvbuff_t *tvb,
const unsigned specified_len);
805WS_DLL_PUBLIC
void register_shutdown_routine(
void (*func)(
void));
808void init_dissection(
void);
811void cleanup_dissection(
void);
817WS_DLL_PUBLIC
void register_postseq_cleanup_routine(
void (*func)(
void));
820WS_DLL_PUBLIC
void postseq_cleanup_all_protocols(
void);
830register_final_registration_routine(
void (*func)(
void));
834final_registration_all_protocols(
void);
843WS_DLL_PUBLIC
void remove_last_data_source(
packet_info *pinfo);
849WS_DLL_PUBLIC
char *get_data_source_name(
const struct data_source *src);
864WS_DLL_PUBLIC
void mark_frame_as_depended_upon(frame_data *fd, uint32_t frame_num);
869 int file_type_subtype;
886extern void dissect_record(
struct epan_dissect *edt,
int file_type_subtype,
909WS_DLL_PUBLIC
void dissector_dump_decodes(
void);
914WS_DLL_PUBLIC
void dissector_dump_heur_decodes(
void);
932 GArray *wanted_hfids);
945extern bool have_postdissector(
void);
958WS_DLL_PUBLIC
bool postdissectors_want_hfids(
void);
964prime_epan_dissect_with_postdissector_wanted_hfids(
epan_dissect_t *edt);
WS_DLL_PUBLIC void dissector_table_foreach(const char *table_name, DATFunc func, void *user_data)
Definition packet.c:2567
WS_DLL_PUBLIC int call_dissector_only(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
Definition packet.c:3654
WS_DLL_PUBLIC const char * dissector_handle_get_protocol_long_name(const dissector_handle_t handle)
Definition packet.c:3335
void deregister_dissector(const char *name)
Definition packet.c:3638
WS_DLL_PUBLIC dissector_handle_t dissector_get_default_string_handle(const char *name, const char *string)
Definition packet.c:1989
WS_DLL_PUBLIC heur_dtbl_entry_t * find_heur_dissector_by_unique_short_name(const char *short_name)
Definition packet.c:2909
void dissector_table_foreach_changed(const char *table_name, DATFunc func, void *user_data)
Definition packet.c:2644
WS_DLL_PUBLIC dissector_handle_t dissector_get_default_uint_handle(const char *name, const uint32_t uint_val)
Definition packet.c:1666
WS_DLL_PUBLIC dissector_handle_t find_dissector_add_dependency(const char *name, const int parent_proto)
Definition packet.c:3410
WS_DLL_PUBLIC dissector_handle_t register_dissector(const char *name, dissector_t dissector, const int proto)
Definition packet.c:3581
void deregister_dissector_table(const char *name)
Definition packet.c:2843
WS_DLL_PUBLIC dissector_handle_t dissector_get_guid_handle(dissector_table_t const sub_dissectors, guid_key *guid_val)
Definition packet.c:2164
WS_DLL_PUBLIC dissector_handle_t register_dissector_with_data(const char *name, dissector_cb_t dissector, const int proto, void *cb_data)
Definition packet.c:3601
WS_DLL_PUBLIC void dissector_change_uint(const char *abbrev, const uint32_t pattern, dissector_handle_t handle)
Definition packet.c:1494
WS_DLL_PUBLIC heur_dissector_list_t find_heur_dissector_list(const char *name)
Definition packet.c:2899
WS_DLL_PUBLIC ftenum_t dissector_table_get_type(dissector_table_t dissector_table)
Definition packet.c:2447
WS_DLL_PUBLIC int dissector_try_uint(dissector_table_t sub_dissectors, const uint32_t uint_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Definition packet.c:1644
WS_DLL_PUBLIC const char * dissector_handle_get_dissector_name(const dissector_handle_t handle)
Definition packet.c:3423
void deregister_heur_dissector_list(const char *name)
Definition packet.c:3309
WS_DLL_PUBLIC dissector_handle_t dissector_get_custom_table_handle(dissector_table_t sub_dissectors, void *key)
Definition packet.c:2049
WS_DLL_PUBLIC GList * get_dissector_names(void)
Definition packet.c:3393
WS_DLL_PUBLIC const char * dissector_handle_get_description(const dissector_handle_t handle)
Definition packet.c:3364
WS_DLL_PUBLIC void dissector_delete_uint(const char *name, const uint32_t pattern, dissector_handle_t handle)
Definition packet.c:1381
WS_DLL_PUBLIC bool dissector_table_supports_decode_as(dissector_table_t dissector_table)
Definition packet.c:2459
WS_DLL_PUBLIC void decrement_dissection_depth(packet_info *pinfo)
Definition packet.c:4254
WS_DLL_PUBLIC void register_init_routine(void(*func)(void))
Definition packet.c:323
WS_DLL_PUBLIC dissector_handle_t dissector_get_uint_handle(dissector_table_t const sub_dissectors, const uint32_t uint_val)
Definition packet.c:1654
WS_DLL_PUBLIC void heur_dissector_delete(const char *name, heur_dissector_t dissector, const int proto)
Definition packet.c:3005
WS_DLL_PUBLIC bool register_depend_dissector(const char *parent, const char *dependent)
Definition packet.c:3781
WS_DLL_PUBLIC void register_cleanup_routine(void(*func)(void))
Definition packet.c:329
WS_DLL_PUBLIC void dissector_delete_uint_range(const char *abbrev, struct epan_range *range, dissector_handle_t handle)
Definition packet.c:1404
WS_DLL_PUBLIC dissector_handle_t create_dissector_handle(dissector_t dissector, const int proto)
Definition packet.c:3521
WS_DLL_PUBLIC int dissector_try_string_with_data(dissector_table_t sub_dissectors, const char *string, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const bool add_proto_name, void *data)
Definition packet.c:1918
WS_DLL_PUBLIC const char * dissector_handle_get_protocol_short_name(const dissector_handle_t handle)
Definition packet.c:3346
WS_DLL_PUBLIC void heur_dissector_table_foreach(const char *table_name, DATFunc_heur func, void *user_data)
Definition packet.c:3172
WS_DLL_PUBLIC void dissector_table_allow_decode_as(dissector_table_t dissector_table)
Definition packet.c:2453
WS_DLL_PUBLIC dissector_handle_t find_dissector(const char *name)
Definition packet.c:3404
WS_DLL_PUBLIC void increment_dissection_depth(packet_info *pinfo)
Definition packet.c:4248
WS_DLL_PUBLIC void dissector_all_tables_foreach_table(DATFunc_table func, void *user_data, GCompareFunc compare_key_func)
Definition packet.c:2699
WS_DLL_PUBLIC void dissector_all_heur_tables_foreach_table(DATFunc_heur_table func, void *user_data, GCompareFunc compare_key_func)
Definition packet.c:3228
WS_DLL_PUBLIC GSList * dissector_table_get_dissector_handles(dissector_table_t dissector_table)
Definition packet.c:2405
WS_DLL_PUBLIC void dissector_all_tables_foreach_changed(DATFunc func, void *user_data)
Definition packet.c:2628
WS_DLL_PUBLIC void dissector_add_uint_range(const char *abbrev, struct epan_range *range, dissector_handle_t handle)
Definition packet.c:1257
WS_DLL_PUBLIC dissector_handle_t create_dissector_handle_with_name_and_description(dissector_t dissector, const int proto, const char *name, const char *description)
Definition packet.c:3498
WS_DLL_PUBLIC int dissector_handle_get_protocol_index(const dissector_handle_t handle)
Definition packet.c:3375
WS_DLL_PUBLIC bool dissector_is_uint_changed(dissector_table_t const sub_dissectors, const uint32_t uint_val)
Definition packet.c:1572
WS_DLL_PUBLIC depend_dissector_list_t find_depend_dissector_list(const char *name)
Definition packet.c:3819
WS_DLL_PUBLIC const char * heur_dissector_list_get_description(heur_dissector_list_t list)
Definition packet.c:3320
WS_DLL_PUBLIC void register_dissector_table_alias(dissector_table_t dissector_table, const char *alias_name)
Definition packet.c:2825
WS_DLL_PUBLIC bool deregister_depend_dissector(const char *parent, const char *dependent)
Definition packet.c:3809
WS_DLL_PUBLIC int call_dissector_with_data(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
Definition packet.c:3668
WS_DLL_PUBLIC void call_heur_dissector_direct(heur_dtbl_entry_t *heur_dtbl_entry, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
Definition packet.c:3702
WS_DLL_PUBLIC void heur_dissector_add(const char *name, heur_dissector_t dissector, const char *display_name, const char *internal_name, const int proto, heuristic_enable_e enable)
Definition packet.c:2915
WS_DLL_PUBLIC dissector_handle_t register_dissector_with_description(const char *name, const char *description, dissector_t dissector, const int proto)
Definition packet.c:3591
WS_DLL_PUBLIC dissector_handle_t create_dissector_handle_with_name(dissector_t dissector, const int proto, const char *name)
Definition packet.c:3513
bool(* heur_dissector_t)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *)
Definition packet.h:89
WS_DLL_PUBLIC dissector_handle_t dissector_table_get_dissector_handle(dissector_table_t dissector_table, const char *description)
Definition packet.c:2435
WS_DLL_PUBLIC heur_dissector_list_t register_heur_dissector_list(const char *name, const int proto)
Definition packet.c:3303
WS_DLL_PUBLIC int dissector_try_uint_with_data(dissector_table_t sub_dissectors, const uint32_t uint_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const bool add_proto_name, void *data)
Definition packet.c:1587
WS_DLL_PUBLIC void dissector_table_foreach_handle(const char *table_name, DATFunc_handle func, void *user_data)
Definition packet.c:2586
WS_DLL_PUBLIC bool dissector_try_heuristic(heur_dissector_list_t sub_dissectors, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, heur_dtbl_entry_t **hdtbl_entry, void *data)
Definition packet.c:3031
WS_DLL_PUBLIC void dissector_reset_uint(const char *name, const uint32_t pattern)
Definition packet.c:1539
WS_DLL_PUBLIC int dissector_try_guid_with_data(dissector_table_t sub_dissectors, guid_key *guid_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const bool add_proto_name, void *data)
Definition packet.c:2110
WS_DLL_PUBLIC void dissector_delete_all(const char *name, dissector_handle_t handle)
Definition packet.c:1466
WS_DLL_PUBLIC void dissector_add_uint_range_with_preference(const char *abbrev, const char *range_str, dissector_handle_t handle)
Definition packet.c:1363
WS_DLL_PUBLIC dissector_handle_t dissector_get_string_handle(dissector_table_t sub_dissectors, const char *string)
Definition packet.c:1974
WS_DLL_PUBLIC heur_dissector_list_t register_heur_dissector_list_with_description(const char *name, const char *ui_name, const int proto)
Definition packet.c:3282
Definition guid-utils.h:23
Definition packet_info.h:43
Definition column-info.h:62
Definition epan_dissect.h:28
wtap_block_t pkt_block
Definition packet.h:878
wtap_block_t pkt_block
Definition packet.h:870
Definition tvbuff-int.h:35
Definition wtap_opttypes.c:85