aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ip.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-01-09 06:32:10 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-01-09 06:32:10 +0000
commita2e2dd78a3bfe730f3ffbcee258923f45bd5c27c (patch)
tree64e405774b7cf4b6cc4f247aea0c3c3651aeef53 /packet-ip.c
parenta1f75fe99c63add12c6dca8d8c0bc31435568dfa (diff)
Add an additional "protocol index" argument to "{old_}dissector_add()",
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and "register_dissector()", so that an entry in those tables has associated with it the protocol index of the protocol the dissector handles (or -1, if there is no protocol index for it). This is for future use in a number of places. (Arguably, "proto_register_protocol()" should take a dissector pointer as an argument, but 1) it'd have to handle both regular and heuristic dissectors; 2) making it take either a "dissector_t" or a union of that and a "heur_dissector_t" introduces some painful header-file interdependencies so I'm punting on that for now. As with other Ethereal internal APIs, these APIs are subject to change in the future, at least until Ethereal 1.0 comes out....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2849 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ip.c')
-rw-r--r--packet-ip.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/packet-ip.c b/packet-ip.c
index 78b5f4dd51..3bfef03767 100644
--- a/packet-ip.c
+++ b/packet-ip.c
@@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
- * $Id: packet-ip.c,v 1.118 2001/01/03 16:41:06 gram Exp $
+ * $Id: packet-ip.c,v 1.119 2001/01/09 06:31:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -1335,7 +1335,7 @@ proto_register_igmp(void)
void
proto_reg_handoff_igmp(void)
{
- dissector_add("ip.proto", IP_PROTO_IGMP, dissect_igmp);
+ dissector_add("ip.proto", IP_PROTO_IGMP, dissect_igmp, proto_igmp);
}
void
@@ -1473,19 +1473,19 @@ proto_register_ip(void)
"Whether the IPv4 type-of-service field should be decoded as a Differentiated Services field",
&g_ip_dscp_actif);
- register_dissector("ip", dissect_ip);
+ register_dissector("ip", dissect_ip, proto_ip);
}
void
proto_reg_handoff_ip(void)
{
- dissector_add("ethertype", ETHERTYPE_IP, dissect_ip);
- dissector_add("ppp.protocol", PPP_IP, dissect_ip);
- dissector_add("ppp.protocol", CISCO_IP, dissect_ip);
- dissector_add("llc.dsap", SAP_IP, dissect_ip);
- dissector_add("ip.proto", IP_PROTO_IPV4, dissect_ip);
- dissector_add("ip.proto", IP_PROTO_IPIP, dissect_ip);
- dissector_add("null.type", BSD_AF_INET, dissect_ip);
+ dissector_add("ethertype", ETHERTYPE_IP, dissect_ip, proto_ip);
+ dissector_add("ppp.protocol", PPP_IP, dissect_ip, proto_ip);
+ dissector_add("ppp.protocol", CISCO_IP, dissect_ip, proto_ip);
+ dissector_add("llc.dsap", SAP_IP, dissect_ip, proto_ip);
+ dissector_add("ip.proto", IP_PROTO_IPV4, dissect_ip, proto_ip);
+ dissector_add("ip.proto", IP_PROTO_IPIP, dissect_ip, proto_ip);
+ dissector_add("null.type", BSD_AF_INET, dissect_ip, proto_ip);
}
void
@@ -1518,5 +1518,5 @@ proto_register_icmp(void)
void
proto_reg_handoff_icmp(void)
{
- dissector_add("ip.proto", IP_PROTO_ICMP, dissect_icmp);
+ dissector_add("ip.proto", IP_PROTO_ICMP, dissect_icmp, proto_icmp);
}