aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ethertype.c
AgeCommit message (Collapse)AuthorFilesLines
2003-11-27From Erwin Rol: RTCFG support.Guy Harris1-1/+2
Add in a URL to the RTNET home page. svn path=/trunk/; revision=9102
2003-11-17added ETHERTYPE_PROFINETUlf Lamping1-1/+2
svn path=/trunk/; revision=8982
2003-10-080x81fd and 0x81ff appear to be for the Cabletron Interswitch MessageGuy Harris1-1/+4
Protocol, although the packets I've seen with 0x81fd don't look like the ISMP packets described in RFC 2641/2642/2643. svn path=/trunk/; revision=8645
2003-10-01Have a pseudo-header for Ethernet packets, giving the size of the FCS -Guy Harris1-10/+12
0 means "there is no FCS in the packet data", 4 means "there is an FCS in the packet data", -1 means "I don't know whether there's an FCS in the packet data, guess based on the packet size". Assume that Ethernet encapsulated inside other protocols has no FCS, by having the "eth" dissector assume that (and not check for an Ethernet pseudo-header). Have "ethertype()" take an argument giving the FCS size; pass 0 when appropriate. Fix up Wiretap routines to set the pseudo-header. This means we no longer use the "generic" seek-and-read routine, so get rid of it. svn path=/trunk/; revision=8574
2003-08-21Sometimes Ethernet captures include an FCS at the end of the packet.Guy Harris1-19/+24
An Ethernet trailer is only needed to pad the packet to 60 bytes of Ethernet header plus payload; if the packet has what appears to be a trailer, and it's 4 or more bytes (i.e., long enough to include an FCS), and the Ethernet frame was claimed to have 64 or more bytes (i.e., it has at least an FCS worth of data more than the minimum 60 bytes), assume that the last 4 bytes of the frame were an FCS. svn path=/trunk/; revision=8207
2003-06-11From Erwin Rol: RTNET/TDMA support.Guy Harris1-1/+2
svn path=/trunk/; revision=7839
2003-04-22Add the Ethernet type for the Vines Echo protocol.Guy Harris1-3/+5
svn path=/trunk/; revision=7526
2003-03-02Even though we don't yet dissect Intel ANS (NIC teaming) or MicrosoftGerald Combs1-1/+3
Network Load Balancing probes, we can at least recognize them as such. svn path=/trunk/; revision=7247
2002-10-22Minimalistic support for counting IPv6 packets during captureJörg Mayer1-1/+5
svn path=/trunk/; revision=6476
2002-10-14From Ulf Lamping: count ARP packets in capture progress dialog box.Guy Harris1-1/+4
svn path=/trunk/; revision=6416
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-7/+7
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-6/+2
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
2002-06-13From Steve Housley: support for the IEEE 802.3ad Link AggregationGuy Harris1-1/+2
Control Protocol. svn path=/trunk/; revision=5663
2002-04-24From Joerg Mayer: get rid of extra arguments to capture routines.Guy Harris1-3/+3
svn path=/trunk/; revision=5233
2002-03-23CGMP-over-Ethernet II support, from Heikki Vatiainen.Guy Harris1-1/+2
svn path=/trunk/; revision=5009
2002-02-17Add support for SNA-over-Ethernet (Ethernet type 80d5).Guy Harris1-1/+2
svn path=/trunk/; revision=4747
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-2/+2
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-7/+7
structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. svn path=/trunk/; revision=4370
2001-12-08Attach a descriptive name field type and base to dissector tables; thatGuy Harris1-2/+3
specifies how the selector values used as keys in those tables are to be displayed, and the title to use when displaying the table. Use that information in the code to display the initial and current entries of various dissector tables. Have the dissector for BACnet APDUs register itself by name, and have the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set, rather than doing it with a dissector table. svn path=/trunk/; revision=4358
2001-11-26Moved from using dissect_data() to using call_dissector()Ed Warnicke1-2/+9
svn path=/trunk/; revision=4269
2001-11-20Make the capture routines take an additional argument giving the amountGuy Harris1-9/+8
of packet data captured. Make the "BYTES_ARE_IN_FRAME()" macro take a "captured length of the packet" argument. Add some length checks to capture routines. svn path=/trunk/; revision=4235
2001-11-13Hopefully the last time I have to change my e-mail address.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=4199
2001-11-06IEEE 802.1x, a/k/a EAPOL, and PPP/EAPOL EAP support, from PekkaGuy Harris1-1/+2
Nikander. svn path=/trunk/; revision=4170
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