diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2011-03-31 12:14:59 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2011-03-31 12:14:59 +0000 |
commit | a6476ba91b38c40284e2edad0f42af2619e5de19 (patch) | |
tree | 3512d004c9179d8a42a8927e09dde8ba34387a6a /epan | |
parent | 0b8be02229b70bcd4a3f2b6edf90b0fb619000df (diff) |
Added dissector_handle_get_long_name().
svn path=/trunk/; revision=36412
Diffstat (limited to 'epan')
-rw-r--r-- | epan/packet.c | 11 | ||||
-rw-r--r-- | epan/packet.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/epan/packet.c b/epan/packet.c index 94a13e5054..a6ce1835a5 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -1682,6 +1682,17 @@ register_heur_dissector_list(const char *name, heur_dissector_list_t *sub_dissec */ static GHashTable *registered_dissectors = NULL; +/* Get the long name of the protocol for a dissector handle, if it has + a protocol. */ +const char * +dissector_handle_get_long_name(const dissector_handle_t handle) +{ + if (handle == NULL || handle->protocol == NULL) { + return NULL; + } + return proto_get_protocol_long_name(handle->protocol); +} + /* Get the short name of the protocol for a dissector handle, if it has a protocol. */ const char * diff --git a/epan/packet.h b/epan/packet.h index 9aa604990f..c65773187a 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -313,6 +313,9 @@ extern void register_dissector(const char *name, dissector_t dissector, extern void new_register_dissector(const char *name, new_dissector_t dissector, const int proto); +/* Get the long name of the protocol for a dissector handle. */ +extern const char *dissector_handle_get_long_name(const dissector_handle_t handle); + /* Get the short name of the protocol for a dissector handle. */ extern const char *dissector_handle_get_short_name(const dissector_handle_t handle); |