diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-09 06:32:10 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-09 06:32:10 +0000 |
commit | 43ccfd8054ae2b3313ce16d0e96f65183a8062e6 (patch) | |
tree | 64e405774b7cf4b6cc4f247aea0c3c3651aeef53 /packet-srvloc.c | |
parent | 925ce160144e354b91b25f6b28f60e0df689f043 (diff) | |
download | wireshark-43ccfd8054ae2b3313ce16d0e96f65183a8062e6.tar.gz wireshark-43ccfd8054ae2b3313ce16d0e96f65183a8062e6.tar.bz2 wireshark-43ccfd8054ae2b3313ce16d0e96f65183a8062e6.zip |
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....)
svn path=/trunk/; revision=2849
Diffstat (limited to 'packet-srvloc.c')
-rw-r--r-- | packet-srvloc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/packet-srvloc.c b/packet-srvloc.c index e61b47c44c..77d63825eb 100644 --- a/packet-srvloc.c +++ b/packet-srvloc.c @@ -6,7 +6,7 @@ * In particular I have not had an opportunity to see how it * responds to SRVLOC over TCP. * - * $Id: packet-srvloc.c,v 1.18 2001/01/03 16:41:07 gram Exp $ + * $Id: packet-srvloc.c,v 1.19 2001/01/09 06:31:44 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -518,12 +518,12 @@ proto_register_srvloc(void) FT_UINT16, BASE_DEC, VALS(srvloc_errs), 0x0, ""} }, - }; + }; - static gint *ett[] = { - &ett_srvloc, - &ett_srvloc_flags, - }; + static gint *ett[] = { + &ett_srvloc, + &ett_srvloc_flags, + }; proto_srvloc = proto_register_protocol("Service Location Protocol", "SRVLOC", "srvloc"); @@ -534,7 +534,9 @@ proto_register_srvloc(void) void proto_reg_handoff_srvloc(void) { - old_dissector_add("tcp.port", TCP_PORT_SRVLOC, dissect_srvloc); - old_dissector_add("udp.port", UDP_PORT_SRVLOC, dissect_srvloc); + old_dissector_add("tcp.port", TCP_PORT_SRVLOC, dissect_srvloc, + proto_srvloc); + old_dissector_add("udp.port", UDP_PORT_SRVLOC, dissect_srvloc, + proto_srvloc); } |