aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-08-28 15:38:33 -0700
committerAnders Broman <a.broman58@gmail.com>2018-08-31 05:25:17 +0000
commitef013598494e8a6571d042bc73c2dab393934b2f (patch)
tree81c642e80868d852c8022f4caeea747e11bcd1ab /epan/proto.h
parent9a71ec042e68743ad709ae1b8b718985d4c79450 (diff)
Add support for protocol aliases. Switch BOOTP to DHCP.
Add support for aliasing one protocol name to another and for filtering using aliased fields. Mark aliased fields as deprecated. Rename the BOOTP dissector to DHCP and alias "bootp" to "dhcp". This lets you use both "dhcp.type" and "bootp.type" as display filter fields without having to duplicate all 500+ DHCP/BOOTP fields. To do: - Add checks to proto.c:check_valid_filter_name_or_fail? - Transition SSL to TLS. - Rename packet-bootp.c to packet-dhcp.c? Change-Id: I29977859995e8347d80b8e83f1618db441b10279 Ping-Bug: 14922 Reviewed-on: https://code.wireshark.org/review/29327 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/proto.h b/epan/proto.h
index d1ce17fa32..e10e6c81e7 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -2194,6 +2194,13 @@ proto_register_protocol_in_name_only(const char *name, const char *short_name, c
gboolean
proto_deregister_protocol(const char *short_name);
+/** Register a protocol alias.
+ This is for dissectors whose original name has changed, e.g. BOOTP to DHCP.
+ @param proto_id protocol id returned by proto_register_protocol (0-indexed)
+ @param alias_name alias for the protocol's filter name */
+WS_DLL_PUBLIC void
+proto_register_alias(const int proto_id, const char *alias_name);
+
/** This type of function can be registered to get called whenever
a given field was not found but a its prefix is matched;
It can be used to procrastinate the hf array registration.
@@ -2264,6 +2271,11 @@ WS_DLL_PUBLIC header_field_info* proto_registrar_get_nth(guint hfindex);
@return the registered item */
WS_DLL_PUBLIC header_field_info* proto_registrar_get_byname(const char *field_name);
+/** Get the header_field information based upon a field alias.
+ @param alias_name the aliased field name to search for
+ @return the registered item */
+WS_DLL_PUBLIC header_field_info* proto_registrar_get_byalias(const char *alias_name);
+
/** Get the header_field id based upon a field name.
@param field_name the field name to search for
@return the field id for the registered item */