aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-vxlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-vxlan.c')
-rw-r--r--epan/dissectors/packet-vxlan.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/epan/dissectors/packet-vxlan.c b/epan/dissectors/packet-vxlan.c
index b9244841a5..4064156ae3 100644
--- a/epan/dissectors/packet-vxlan.c
+++ b/epan/dissectors/packet-vxlan.c
@@ -4,7 +4,7 @@
* RFC 7348 plus draft-smith-vxlan-group-policy-01
*
* (c) Copyright 2016, Sumit Kumar Jha <sjha3@ncsu.edu>
- * Support for VXLAN GPE (https://www.ietf.org/id/draft-ietf-nvo3-vxlan-gpe-02.txt)
+ * Support for VXLAN GPE (https://datatracker.ietf.org/doc/html/draft-ietf-nvo3-vxlan-gpe-02)
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
@@ -25,28 +25,31 @@
void proto_register_vxlan(void);
void proto_reg_handoff_vxlan(void);
-static int proto_vxlan = -1;
-static int proto_vxlan_gpe = -1;
-
-static int hf_vxlan_flags = -1;
-static int hf_vxlan_gpe_flags = -1;
-static int hf_vxlan_flags_reserved = -1;
-static int hf_vxlan_reserved_8 = -1;
-static int hf_vxlan_flag_a = -1;
-static int hf_vxlan_flag_d = -1;
-static int hf_vxlan_flag_i = -1;
-static int hf_vxlan_flag_g = -1;
-static int hf_vxlan_gbp = -1;
-static int hf_vxlan_vni = -1;
-static int hf_vxlan_gpe_flag_i = -1;
-static int hf_vxlan_gpe_flag_p = -1;
-static int hf_vxlan_gpe_flag_o = -1;
-static int hf_vxlan_gpe_flag_ver = -1;
-static int hf_vxlan_gpe_flag_reserved = -1;
-static int hf_vxlan_gpe_reserved_16 = -1;
-static int hf_vxlan_next_proto = -1;
-static int ett_vxlan = -1;
-static int ett_vxlan_flags = -1;
+static dissector_handle_t vxlan_handle;
+static dissector_handle_t vxlan_gpe_handle;
+
+static int proto_vxlan;
+static int proto_vxlan_gpe;
+
+static int hf_vxlan_flags;
+static int hf_vxlan_gpe_flags;
+static int hf_vxlan_flags_reserved;
+static int hf_vxlan_reserved_8;
+static int hf_vxlan_flag_a;
+static int hf_vxlan_flag_d;
+static int hf_vxlan_flag_i;
+static int hf_vxlan_flag_g;
+static int hf_vxlan_gbp;
+static int hf_vxlan_vni;
+static int hf_vxlan_gpe_flag_i;
+static int hf_vxlan_gpe_flag_p;
+static int hf_vxlan_gpe_flag_o;
+static int hf_vxlan_gpe_flag_ver;
+static int hf_vxlan_gpe_flag_reserved;
+static int hf_vxlan_gpe_reserved_16;
+static int hf_vxlan_next_proto;
+static int ett_vxlan;
+static int ett_vxlan_flags;
static int * const flags_fields[] = {
&hf_vxlan_flag_g,
@@ -273,15 +276,14 @@ proto_register_vxlan(void)
proto_register_subtree_array(ett, array_length(ett));
vxlan_dissector_table = register_dissector_table("vxlan.next_proto", "VXLAN Next Protocol", proto_vxlan, FT_UINT8, BASE_DEC);
-
+ /* Register dissector handles */
+ vxlan_handle = register_dissector("vxlan", dissect_vxlan, proto_vxlan);
+ vxlan_gpe_handle = register_dissector("vxlan_gpe", dissect_vxlan_gpe, proto_vxlan_gpe);
}
void
proto_reg_handoff_vxlan(void)
{
- dissector_handle_t vxlan_handle;
- dissector_handle_t vxlan_gpe_handle;
-
/*
* RFC 7348 Figures 1 and 2, in the Payload section, say
*
@@ -292,8 +294,6 @@ proto_reg_handoff_vxlan(void)
*/
eth_handle = find_dissector_add_dependency("eth_withoutfcs", proto_vxlan);
- vxlan_handle = create_dissector_handle(dissect_vxlan, proto_vxlan);
- vxlan_gpe_handle = create_dissector_handle(dissect_vxlan_gpe, proto_vxlan_gpe);
dissector_add_uint_with_preference("udp.port", UDP_PORT_VXLAN, vxlan_handle);
dissector_add_uint_with_preference("udp.port", UDP_PORT_VXLAN_GPE, vxlan_gpe_handle);
}