aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipnet.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-12-03 17:31:26 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-12-03 17:31:26 +0000
commit44f8b813eef5da547e84259a2c07420cfb4718cf (patch)
tree584f2dfbc95fb17869fc38ef5e4b3ffa4a84fdc6 /epan/dissectors/packet-ipnet.c
parentb13082516f8f73d8480be36ea06baf0513a1f088 (diff)
Decode family and hook type.
svn path=/trunk/; revision=31164
Diffstat (limited to 'epan/dissectors/packet-ipnet.c')
-rw-r--r--epan/dissectors/packet-ipnet.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ipnet.c b/epan/dissectors/packet-ipnet.c
index f53096b139..215e020674 100644
--- a/epan/dissectors/packet-ipnet.c
+++ b/epan/dissectors/packet-ipnet.c
@@ -27,6 +27,7 @@
#endif
#include <glib.h>
+#include <epan/aftypes.h>
#include <epan/packet.h>
static int proto_ipnet = -1;
@@ -44,6 +45,19 @@ static gint ett_raw = -1;
static dissector_handle_t ip_handle;
static dissector_handle_t ipv6_handle;
+static const value_string solaris_family_vals[] = {
+ { SOLARIS_AF_INET, "Solaris AF_INET" },
+ { SOLARIS_AF_INET6, "Solaris AF_INET6" },
+ { 0, NULL }
+};
+
+static const value_string htype_vals[] = {
+ { 0, "Inbound" },
+ { 1, "Outbound" },
+ { 2, "Local" },
+ { 0, NULL }
+};
+
static void
dissect_ipnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@@ -78,10 +92,10 @@ dissect_ipnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
family = tvb_get_guint8(tvb, 1);
switch (family) {
- case 2: /* AF_INET */
+ case SOLARIS_AF_INET:
call_dissector(ip_handle, next_tvb, pinfo, tree);
break;
- case 26: /* AF_INET6 */
+ case SOLARIS_AF_INET6:
call_dissector(ipv6_handle, next_tvb, pinfo, tree);
break;
default:
@@ -97,10 +111,10 @@ proto_register_ipnet(void)
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_family, { "Address family", "ipnet.family",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ FT_UINT8, BASE_DEC, VALS(solaris_family_vals), 0x0, NULL, HFILL }},
{ &hf_htype, { "Hook type", "ipnet.htype",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ FT_UINT16, BASE_DEC, VALS(htype_vals), 0x0, NULL, HFILL }},
{ &hf_pktlen, { "Data length", "ipnet.pktlen",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},