aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ethertype.c
AgeCommit message (Collapse)AuthorFilesLines
2001-06-16Add the PPP Compression Control Protocol to the list of PPP protocolsGuy Harris1-1/+2
for which the ethertype dissector knows the name. svn path=/trunk/; revision=3557
2001-06-15Explain why we have to be ready to handle Ethernet frames withGuy Harris1-4/+14
protocol type values that are PPP protocol types. svn path=/trunk/; revision=3554
2001-06-14As long as we're supporting PPP protocol types over Ethernet, we mightGuy Harris1-2/+11
as well just include "ppptypes.h" in "packet-ethertype.c", rather than defining ETHERTYPE_ values equal to the corresponding PPP_ values, and add entries for the PPP protocols we now dissect when running atop Ethernet. svn path=/trunk/; revision=3548
2001-06-14LCP-over Ethernet and IPCP-over-Ethernet support, from Laurent Rabret.Guy Harris1-1/+2
svn path=/trunk/; revision=3547
2001-04-03An Ethernet type of 0x6558 is "Transparent Ethernet Bridging" which,Guy Harris1-1/+2
apparently, means an Ethernet packet is stuffed into the payload; add support for it as an Ethernet, Cisco HDLC, and GRE packet type. Sort the Ethernet types in "etypes.h" by value. svn path=/trunk/; revision=3250
2001-03-29Add WCP to the list of Ethernet types in "etype_vals[]", and addGuy Harris1-1/+2
"compressed" to the list of NLPIDs in "nlpid_vals[]". Use "nlpid_vals" for the Frame Relay NLPID field. svn path=/trunk/; revision=3206
2001-02-01"Decode As" dialog, from David Hampton.Guy Harris1-1/+3
svn path=/trunk/; revision=2965
2001-01-18In "ethertype()", catch exceptions from the dissector we call, and, ifGuy Harris1-12/+62
we get an exception, add in any trailer we and then rethrow the exception, so that the trailer will be put into the tree even if some subdissector threw an exception. (Yes, an exception can be thrown even in a frame with a trailer; you could have a frame, all of which was captured, that has an IP datagram containing a UDP datagram, and if the UDP payload isn't big enough for the type of packet it's supposed to be, a ReportedBoundsError exception can be thrown.) svn path=/trunk/; revision=2917
2001-01-18Pull the handling of trailers in Ethernet (as opposed to 802.3) framesGuy Harris1-9/+45
into "ethertype()". svn path=/trunk/; revision=2915
2000-11-18Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSIGuy Harris1-2/+8
ESIS dissectors. Register the IP dissector and have dissectors that call it directly (rather than through a port table) call it through a handle. Add a routine "tvb_set_reported_length()" which a dissector can use if it was handed a tvbuff that contains more data than is actually in its part of the packet - for example, handing a padded Ethernet frame to IP; the routine sets the reported length of the tvbuff (and also adjusts the actual length, as appropriate). Then use it in IP. Given that, "ethertype()" can determine how much of the Ethernet frame was actually part of an IP datagram (and can do the same for other protocols under Ethernet that use "tvb_set_reported_length()"; have it return the actual length, and have "dissect_eth()" and "dissect_vlan()" use that to mark trailer data in Ethernet II frames as well as in 802.3 frames. svn path=/trunk/; revision=2658
2000-11-16Tvbuffify the STP dissector, have it register itself and have the LLCGuy Harris1-2/+2
dissector call it through a handle, and make it static. Give "dissect_data()" an "offset" argument, so dissectors can use it to dissect part of the packet without having to cook up a new tvbuff. Go back to using "dissect_data()" to dissect the data in an IPP request. svn path=/trunk/; revision=2651
2000-08-09Add some ethertypes (which were captured on my network, so inuse ;-).Laurent Deniel1-18/+28
svn path=/trunk/; revision=2242
2000-08-07Allow either old-style (pre-tvbuff) or new-style (tvbuffified)Guy Harris1-24/+17
dissectors to be registered as dissectors for particular ports, registered as heuristic dissectors, and registered as dissectors for conversations, and have routines to be used both by old-style and new-style dissectors to call registered dissectors. Have the code that calls those dissectors translate the arguments as necessary. (For conversation dissectors, replace "find_conversation_dissector()", which just returns a pointer to the dissector, with "old_try_conversation_dissector()" and "try_conversation_dissector()", which actually call the dissector, so that there's a single place at which we can do that translation. Also make "dissector_lookup()" static and, instead of calling it and, if it returns a non-null pointer, calling that dissector, just use "old_dissector_try_port()" or "dissector_try_port()", for the same reason.) This allows some dissectors that took old-style arguments and immediately translated them to new-style arguments to just take new-style arguments; make them do so. It also allows some new-style dissectors not to have to translate arguments before calling routines to look up and call dissectors; make them not do so. Get rid of checks for too-short frames in new-style dissectors - the tvbuff code does those checks for you. Give the routines to register old-style dissectors, and to call dissectors from old-style dissectors, names beginning with "old_", with the routines for new-style dissectors not having the "old_". Update the dissectors that use those routines appropriately. Rename "dissect_data()" to "old_dissect_data()", and "dissect_data_tvb()" to "dissect_data()". svn path=/trunk/; revision=2218
2000-05-31Add routines for adding items to a protocol tree that take arguments ofGuy Harris1-2/+2
a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. svn path=/trunk/; revision=2031
2000-05-19Add protection against 0-length FT_BYTES being added to proto_tree.Gilbert Ramirez1-13/+18
Convert ethertype() and dissect_null() to use tvbuff. svn path=/trunk/; revision=1979
2000-05-11Add tvbuff class.Gilbert Ramirez1-2/+2
Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
2000-04-13Re-insert 4 #include lines to get capture_*() function prototypes.Gilbert Ramirez1-1/+5
svn path=/trunk/; revision=1849
2000-04-13Change the sub-dissector handoff registration routines so that theGilbert Ramirez1-0/+136
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. :-) svn path=/trunk/; revision=1848