Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal packet-ethertype.c Makefile.am Makefile.nmak
gram 2000/04/13 13:19:11 CDT
Modified files:
. Makefile.am Makefile.nmake packet-aarp.c
packet-arp.c packet-atalk.c packet-ip.c
packet-ipv6.c packet-ipx.c packet-mpls.c
packet-pppoe.c packet-snmp.c packet-tcp.c
packet-udp.c packet-vines.c packet-vlan.c
packet-x25.c packet.c packet.h proto.c
proto.h
Added files:
. packet-ethertype.c
Removed files:
. ethertype.c packet-aarp.h
Log:
Change the sub-dissector handoff registration routines so that the
sub-dissector table is not stored in the header_field_info struct, but
in a separate namespace. Dissector tables are now registered by name
and not by field ID. For example:
udp_dissector_table = register_dissector_table("udp.port");
Because of this different namespace, dissector tables can have names
that are not field names. This is useful for ethertype, since multiple
fields are "ethertypes".
packet-ethertype.c replaces ethertype.c (the name was changed so that it
would be named in the same fashion as all the filenames passed to make-reg-dotc)
Although it registers no protocol or field, it registers one dissector table:
ethertype_dissector_table = register_dissector_table("ethertype");
All protocols that can be called because of an ethertype field now register
that fact with dissector_add() calls.
In this way, one dissector_table services all ethertype fields
(hf_eth_type, hf_llc_type, hf_null_etype, hf_vlan_etype)
Furthermore, the code allows for names of protocols to exist in the
etype_vals, yet a dissector for that protocol doesn't exist. The name
of the dissector is printed in COL_INFO. You're welcome, Richard. :-)
Revision Changes Path
1.182 +2 -3 ethereal/Makefile.am
1.26 +2 -2 ethereal/Makefile.nmake
1.18 +7 -1 ethereal/packet-aarp.c
1.27 +8 -1 ethereal/packet-arp.c
1.32 +8 -1 ethereal/packet-atalk.c
1.79 +8 -1 ethereal/packet-ip.c
1.32 +8 -1 ethereal/packet-ipv6.c
1.53 +3 -1 ethereal/packet-ipx.c
1.4 +7 -1 ethereal/packet-mpls.c
1.6 +8 -1 ethereal/packet-pppoe.c
1.28 +3 -1 ethereal/packet-snmp.c
1.68 +2 -2 ethereal/packet-tcp.c
1.61 +2 -2 ethereal/packet-udp.c
1.13 +8 -1 ethereal/packet-vines.c
1.9 +7 -1 ethereal/packet-vlan.c
1.23 +8 -1 ethereal/packet-x25.c
1.75 +35 -18 ethereal/packet.c
1.180 +3 -2 ethereal/packet.h
1.62 +1 -18 ethereal/proto.c
1.28 +1 -8 ethereal/proto.h