aboutsummaryrefslogtreecommitdiffstats
path: root/packet-clip.c
AgeCommit message (Collapse)AuthorFilesLines
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-3/+7
take a dissector handle as an argument, rather than a pointer to a dissector function and a protocol ID. Associate dissector handles with dissector table entries. svn path=/trunk/; revision=4308
2001-11-20Make the capture routines take an additional argument giving the amountGuy Harris1-3/+3
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-09-23Explain what the LLC header vs. no LLC header stuff in the ATM on LinuxGuy Harris1-4/+17
tcpdump patch is all about, and note that a future version of libpcap may render it irrelevant. svn path=/trunk/; revision=3950
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-2/+3
"{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
2000-11-29Wrap the dissect_fddi() call (with a 4th argument) withGilbert Ramirez1-2/+3
dissect_fddi_not_bitswapped() and dissect_fddi_bitswapped(), both of which use the standard 3-argument tvbuffified-dissector argument list. Add a dissector table called "wtap_encap" which is used to call dissectors from dissect_frame(). The switch() statement from this top-level dissector is removed. The link-layer dissectors register themselves with the "wtap_encap" dissector table. The dissectors are now static where possible. svn path=/trunk/; revision=2708
2000-11-19For each column, have both a buffer into which strings for that columnGuy Harris1-5/+5
can be put, and a pointer to the string for the column, which might or might not point to that buffer. Add a routine "col_set_str()", which sets the string for the column to the string passed to it as an argument; it should only be handed a static string (a string constant would be ideal). It doesn't do any copying, so it's faster than "col_add_str()". Make the routines that append to columns check whether the pointer to the string for the column points to the buffer for the column and, if not, copy the string for the column to the buffer for the column so that you can append to it (so you can use "col_set_str()" and then use "col_append_str()" or "col_append_fstr()"). Convert a bunch of "col_add_str()" calls that take a string constant as an argument to "col_set_str()" calls. Convert some "col_add_fstr()" calls that take a string constant as the only argument - i.e., the format string doesn't have any "%" slots into which to put strings for subsequent arguments to "col_set_str()" calls (those calls are just like "col_add_str()" calls). Replace an END_OF_FRAME reference in a tvbuffified dissector with a "tvb_length(tvb)" call. svn path=/trunk/; revision=2670
2000-11-18Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSIGuy Harris1-5/+13
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-05-25replaced pinfo->current with pinfo->current_protoOlivier Abad1-2/+2
svn path=/trunk/; revision=2006
2000-05-25Set pinfo->current_protoGilbert Ramirez1-1/+3
svn path=/trunk/; revision=2005
2000-05-25Convert dissect_clip() to use tvbuffs. Very trivial change.Gilbert Ramirez1-15/+19
svn path=/trunk/; revision=2003
2000-05-19Make "packet-clip.c", "packet-raw.c", "packet-ppp.c", "packet-tr.c",Guy Harris1-1/+2
"packet-eth.c", and "packet-fddi.c" include the include files that declare the functions they export, so that the declarationss in the header files will be checked against the definitions in the source files. svn path=/trunk/; revision=1981
2000-05-11Add tvbuff class.Gilbert Ramirez1-3/+3
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-02-15Create a header file for every packet-*.c file. Prune the packet.h file.Gilbert Ramirez1-1/+2
This change allows you to add a new packet-*.c file and not cause a recompilation of everything that #include's packet.h Add the plugin_api.[ch] files ot the plugins/Makefile.am packaging list. Add #define YY_NO_UNPUT 1 to the lex source so that the yyunput symbol is not defined, squelching a compiler complaint when compiling the generated C file. svn path=/trunk/; revision=1637
2000-01-23In "dissect_eth()", update "pi.len" and "pi.captured_len" regardless ofGuy Harris1-3/+3
whether we're building a protocol tree or not. Make "dissect_eth()" use "BYTES_ARE_IN_FRAME()" to see if we have a full Ethernet header - it can be called with a non-zero offset, if Ethernet frames are encapsulated inside other frames (e.g., ATM LANE). Make capture routines take an "offset" argument if the corresponding dissect routine takes one (for symmetry, and for Cisco ISL or any other protocol that encapsulates Ethernet or Token-Ring frames inside other frames). Pass the frame lengths to capture routines via the "pi" structure, rather than as an in-line argument, so that they can macros such as "BYTES_ARE_IN_FRAME()" the way the corresponding dissect routines do. Make capture routines update "pi.len" and "pi.captured_len" the same way the corresponding diseect routines do, if the capture routines then call other capture routines. Make "capture_vlan()" count as "other" frames that are too short, the way other capture routines do. svn path=/trunk/; revision=1525
1999-11-16Replace the ETT_ "enum" members, declared in "packet.h", withGuy Harris1-2/+14
dynamically-assigned "ett_" integer values, assigned by "proto_register_subtree_array()"; this: obviates the need to update "packet.h" whenever you add a new subtree type - you only have to add a call to "proto_register_subtree_array()" to a "register" routine and an array of pointers to "ett_", if they're not already there, and add a pointer to the new "ett_" variable to the array, if they are there; would allow run-time-loaded dissectors to allocate subtree types when they're loaded. svn path=/trunk/; revision=1043
1999-08-24In the summary display for CLIP frames, make the protocol CLIP (whichGuy Harris1-2/+2
will get overridden in any case). svn path=/trunk/; revision=561
1999-07-28Patches from Thierry Andry to support Classical IP captures from systemsGuy Harris1-0/+77
with the ATM on Linux software from <http://lrcwww.epfl.ch/linux-atm/>. svn path=/trunk/; revision=401