36#define hi_nibble(b) (((b) & 0xf0) >> 4)
37#define lo_nibble(b) ((b) & 0x0f)
41#define BYTES_ARE_IN_FRAME(offset, captured_len, len) \
42 ((unsigned)(offset) + (unsigned)(len) > (unsigned)(offset) && \
43 (unsigned)(offset) + (unsigned)(len) <= (unsigned)(captured_len))
48#define STRING_CASE_SENSITIVE 0
49#define STRING_CASE_INSENSITIVE 1
51extern void packet_init(
void);
52extern void packet_cache_proto_handles(
void);
53extern void packet_all_tables_sort_handles(
void);
54extern void packet_cleanup(
void);
98typedef void (*DATFunc) (
const char *table_name, ftenum_t selector_type,
99 void *key,
void *value,
void *user_data);
100typedef void (*DATFunc_handle) (
const char *table_name,
void *value,
102typedef void (*DATFunc_table) (
const char *table_name,
const char *ui_name,
167 void *user_data, GCompareFunc compare_key_func);
176 const char *ui_name,
const int proto,
const ftenum_t type,
const int param);
183 const char *ui_name,
const int proto, GHashFunc hash_func, GEqualFunc key_equal_func,
184 GDestroyNotify key_destroy_func);
192 const char *alias_name);
201WS_DLL_PUBLIC
const char *get_dissector_table_ui_name(
const char *name);
205WS_DLL_PUBLIC ftenum_t get_dissector_table_selector_type(
const char *name);
209WS_DLL_PUBLIC
int get_dissector_table_param(
const char *name);
213WS_DLL_PUBLIC
void dissector_dump_dissector_tables(
void);
216WS_DLL_PUBLIC
void dissector_add_uint(
const char *name,
const uint32_t pattern,
220WS_DLL_PUBLIC
void dissector_add_uint_with_preference(
const char *name,
const uint32_t pattern,
271WS_DEPRECATED_X(
"Use dissector_try_uint_with_data instead")
294 const char *name,
const uint32_t uint_val);
297WS_DLL_PUBLIC
void dissector_add_string(
const char *name,
const char *pattern,
302WS_DLL_PUBLIC
void dissector_delete_string(
const char *name,
const char *pattern,
307WS_DLL_PUBLIC
void dissector_change_string(
const char *name,
const char *pattern,
311WS_DLL_PUBLIC
void dissector_reset_string(
const char *name,
const char *pattern);
317WS_DLL_PUBLIC
bool dissector_is_string_changed(
dissector_table_t const subdissectors,
const char *
string);
329WS_DEPRECATED_X(
"Use dissector_try_string_with_data instead")
335WS_DEPRECATED_X(
"Use dissector_try_string_with_data instead")
360 const char *name,
const char *
string);
363WS_DLL_PUBLIC
void dissector_add_custom_table_handle(
const char *name,
void *pattern,
384WS_DLL_PUBLIC
void dissector_add_guid(
const char *name,
guid_key* guid_val,
394WS_DLL_PUBLIC
void dissector_delete_guid(
const char *name,
guid_key* guid_val,
410WS_DLL_PUBLIC
int dissector_try_payload_with_data(
dissector_table_t sub_dissectors,
413WS_DEPRECATED_X(
"Use dissector_try_payload_with_data instead")
416 return dissector_try_payload_with_data(sub_dissectors, tvb, pinfo, tree, add_proto_name, data); \
422WS_DEPRECATED_X(
"Use dissector_try_payload_with_data instead")
426 return dissector_try_payload_with_data(sub_dissectors, tvb, pinfo, tree,
true, NULL); \
431WS_DLL_PUBLIC
void dissector_change_payload(
const char *abbrev,
dissector_handle_t handle);
434WS_DLL_PUBLIC
void dissector_reset_payload(
const char *name);
444WS_DLL_PUBLIC
void dissector_add_for_decode_as(
const char *name,
448WS_DLL_PUBLIC
void dissector_add_for_decode_as_with_preference(
const char *name,
486 const char *display_name;
489 bool enabled_by_default;
518typedef void (*DATFunc_heur) (
const char *table_name,
520typedef void (*DATFunc_heur_table) (
const char *table_name,
533 DATFunc_heur func,
void *user_data);
544 void *user_data, GCompareFunc compare_key_func);
547WS_DLL_PUBLIC
bool has_heur_dissector_list(
const char *name);
589 const char *display_name,
const char *internal_name,
const int proto, heuristic_enable_e enable);
620WS_DLL_PUBLIC
const char *dissector_handle_get_short_name(
const dissector_handle_t handle);
640WS_DLL_PUBLIC
const char *dissector_handle_get_pref_suffix(
const dissector_handle_t handle);
667 const int proto,
const char* name);
684 const int proto,
const char* name,
const char* description);
685WS_DLL_PUBLIC
dissector_handle_t create_dissector_handle_with_data(dissector_cb_t dissector,
686 const int proto,
void* cb_data);
689WS_DLL_PUBLIC
void dissector_dump_dissectors(
void);
774extern void dissect_init(
void);
776extern void dissect_cleanup(
void);
782WS_DLL_PUBLIC
void set_actual_length(
tvbuff_t *tvb,
const unsigned specified_len);
806WS_DLL_PUBLIC
void register_shutdown_routine(
void (*func)(
void));
809void init_dissection(
void);
812void cleanup_dissection(
void);
818WS_DLL_PUBLIC
void register_postseq_cleanup_routine(
void (*func)(
void));
821WS_DLL_PUBLIC
void postseq_cleanup_all_protocols(
void);
831register_final_registration_routine(
void (*func)(
void));
835final_registration_all_protocols(
void);
844WS_DLL_PUBLIC
void remove_last_data_source(
packet_info *pinfo);
850WS_DLL_PUBLIC
char *get_data_source_name(
const struct data_source *src);
865WS_DLL_PUBLIC
void mark_frame_as_depended_upon(frame_data *fd, uint32_t frame_num);
870 int file_type_subtype;
887extern void dissect_record(
struct epan_dissect *edt,
int file_type_subtype,
910WS_DLL_PUBLIC
void dissector_dump_decodes(
void);
915WS_DLL_PUBLIC
void dissector_dump_heur_decodes(
void);
933 GArray *wanted_hfids);
946extern bool have_postdissector(
void);
959WS_DLL_PUBLIC
bool postdissectors_want_hfids(
void);
965prime_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:2591
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:3678
WS_DLL_PUBLIC const char * dissector_handle_get_protocol_long_name(const dissector_handle_t handle)
Definition packet.c:3359
void deregister_dissector(const char *name)
Definition packet.c:3662
WS_DLL_PUBLIC dissector_handle_t dissector_get_default_string_handle(const char *name, const char *string)
Definition packet.c:2013
WS_DLL_PUBLIC heur_dtbl_entry_t * find_heur_dissector_by_unique_short_name(const char *short_name)
Definition packet.c:2933
void dissector_table_foreach_changed(const char *table_name, DATFunc func, void *user_data)
Definition packet.c:2668
WS_DLL_PUBLIC dissector_handle_t dissector_get_default_uint_handle(const char *name, const uint32_t uint_val)
Definition packet.c:1690
WS_DLL_PUBLIC dissector_handle_t find_dissector_add_dependency(const char *name, const int parent_proto)
Definition packet.c:3434
WS_DLL_PUBLIC dissector_handle_t register_dissector(const char *name, dissector_t dissector, const int proto)
Definition packet.c:3605
void deregister_dissector_table(const char *name)
Definition packet.c:2867
WS_DLL_PUBLIC dissector_handle_t dissector_get_guid_handle(dissector_table_t const sub_dissectors, guid_key *guid_val)
Definition packet.c:2188
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:3625
WS_DLL_PUBLIC void dissector_change_uint(const char *abbrev, const uint32_t pattern, dissector_handle_t handle)
Definition packet.c:1518
WS_DLL_PUBLIC heur_dissector_list_t find_heur_dissector_list(const char *name)
Definition packet.c:2923
WS_DLL_PUBLIC ftenum_t dissector_table_get_type(dissector_table_t dissector_table)
Definition packet.c:2471
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:1668
WS_DLL_PUBLIC const char * dissector_handle_get_dissector_name(const dissector_handle_t handle)
Definition packet.c:3447
void deregister_heur_dissector_list(const char *name)
Definition packet.c:3333
WS_DLL_PUBLIC dissector_handle_t dissector_get_custom_table_handle(dissector_table_t sub_dissectors, void *key)
Definition packet.c:2073
WS_DLL_PUBLIC GList * get_dissector_names(void)
Definition packet.c:3417
WS_DLL_PUBLIC const char * dissector_handle_get_description(const dissector_handle_t handle)
Definition packet.c:3388
WS_DLL_PUBLIC void dissector_delete_uint(const char *name, const uint32_t pattern, dissector_handle_t handle)
Definition packet.c:1405
WS_DLL_PUBLIC bool dissector_table_supports_decode_as(dissector_table_t dissector_table)
Definition packet.c:2483
WS_DLL_PUBLIC void decrement_dissection_depth(packet_info *pinfo)
Definition packet.c:4278
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:1678
WS_DLL_PUBLIC void heur_dissector_delete(const char *name, heur_dissector_t dissector, const int proto)
Definition packet.c:3029
WS_DLL_PUBLIC bool register_depend_dissector(const char *parent, const char *dependent)
Definition packet.c:3805
WS_DLL_PUBLIC void register_cleanup_routine(void(*func)(void))
Definition packet.c:329
WS_DLL_PUBLIC dissector_handle_t create_dissector_handle(dissector_t dissector, const int proto)
Definition packet.c:3545
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:1942
WS_DLL_PUBLIC const char * dissector_handle_get_protocol_short_name(const dissector_handle_t handle)
Definition packet.c:3370
WS_DLL_PUBLIC void dissector_delete_uint_range(const char *abbrev, range_t *range, dissector_handle_t handle)
Definition packet.c:1428
WS_DLL_PUBLIC void heur_dissector_table_foreach(const char *table_name, DATFunc_heur func, void *user_data)
Definition packet.c:3196
WS_DLL_PUBLIC void dissector_add_uint_range(const char *abbrev, range_t *range, dissector_handle_t handle)
Definition packet.c:1281
WS_DLL_PUBLIC void dissector_table_allow_decode_as(dissector_table_t dissector_table)
Definition packet.c:2477
WS_DLL_PUBLIC dissector_handle_t find_dissector(const char *name)
Definition packet.c:3428
WS_DLL_PUBLIC void increment_dissection_depth(packet_info *pinfo)
Definition packet.c:4272
WS_DLL_PUBLIC void dissector_all_tables_foreach_table(DATFunc_table func, void *user_data, GCompareFunc compare_key_func)
Definition packet.c:2723
WS_DLL_PUBLIC void dissector_all_heur_tables_foreach_table(DATFunc_heur_table func, void *user_data, GCompareFunc compare_key_func)
Definition packet.c:3252
WS_DLL_PUBLIC GSList * dissector_table_get_dissector_handles(dissector_table_t dissector_table)
Definition packet.c:2429
WS_DLL_PUBLIC void dissector_all_tables_foreach_changed(DATFunc func, void *user_data)
Definition packet.c:2652
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:3522
WS_DLL_PUBLIC int dissector_handle_get_protocol_index(const dissector_handle_t handle)
Definition packet.c:3399
WS_DLL_PUBLIC bool dissector_is_uint_changed(dissector_table_t const sub_dissectors, const uint32_t uint_val)
Definition packet.c:1596
WS_DLL_PUBLIC depend_dissector_list_t find_depend_dissector_list(const char *name)
Definition packet.c:3843
WS_DLL_PUBLIC const char * heur_dissector_list_get_description(heur_dissector_list_t list)
Definition packet.c:3344
WS_DLL_PUBLIC void register_dissector_table_alias(dissector_table_t dissector_table, const char *alias_name)
Definition packet.c:2849
WS_DLL_PUBLIC bool deregister_depend_dissector(const char *parent, const char *dependent)
Definition packet.c:3833
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:3692
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:3726
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:2939
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:3615
WS_DLL_PUBLIC dissector_handle_t create_dissector_handle_with_name(dissector_t dissector, const int proto, const char *name)
Definition packet.c:3537
bool(* heur_dissector_t)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *)
Definition packet.h:90
WS_DLL_PUBLIC dissector_handle_t dissector_table_get_dissector_handle(dissector_table_t dissector_table, const char *description)
Definition packet.c:2459
WS_DLL_PUBLIC heur_dissector_list_t register_heur_dissector_list(const char *name, const int proto)
Definition packet.c:3327
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:1611
WS_DLL_PUBLIC void dissector_table_foreach_handle(const char *table_name, DATFunc_handle func, void *user_data)
Definition packet.c:2610
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:3055
WS_DLL_PUBLIC void dissector_reset_uint(const char *name, const uint32_t pattern)
Definition packet.c:1563
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:2134
WS_DLL_PUBLIC void dissector_delete_all(const char *name, dissector_handle_t handle)
Definition packet.c:1490
WS_DLL_PUBLIC void dissector_add_uint_range_with_preference(const char *abbrev, const char *range_str, dissector_handle_t handle)
Definition packet.c:1387
WS_DLL_PUBLIC dissector_handle_t dissector_get_string_handle(dissector_table_t sub_dissectors, const char *string)
Definition packet.c:1998
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:3306
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:879
wtap_block_t pkt_block
Definition packet.h:871
Definition tvbuff-int.h:35
Definition wtap_opttypes.c:85