aboutsummaryrefslogtreecommitdiffstats
path: root/packet-clip.c
AgeCommit message (Collapse)AuthorFilesLines
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hjmayer1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-21Include files from the "epan" directory and subdirectories thereof withguy1-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/"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4586 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"guy1-9/+9
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4370 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4308 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-20Make the capture routines take an additional argument giving the amountguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4235 f5534014-38df-0310-8fa8-9805f1628bb7
2001-09-23Explain what the LLC header vs. no LLC header stuff in the ATM on Linuxguy1-4/+17
tcpdump patch is all about, and note that a future version of libpcap may render it irrelevant. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3950 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",guy1-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....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2849 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-29Wrap the dissect_fddi() call (with a 4th argument) withgram1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2708 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-19For each column, have both a buffer into which strings for that columnguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2670 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-18Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSIguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2658 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-25replaced pinfo->current with pinfo->current_protooabad1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2006 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-25Set pinfo->current_protogram1-1/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2005 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-25Convert dissect_clip() to use tvbuffs. Very trivial change.gram1-15/+19
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2003 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-19Make "packet-clip.c", "packet-raw.c", "packet-ppp.c", "packet-tr.c",guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1981 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-11Add tvbuff class.gram1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1939 f5534014-38df-0310-8fa8-9805f1628bb7
2000-02-15Create a header file for every packet-*.c file. Prune the packet.h file.gram1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1637 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-23In "dissect_eth()", update "pi.len" and "pi.captured_len" regardless ofguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1525 f5534014-38df-0310-8fa8-9805f1628bb7
1999-11-16Replace the ETT_ "enum" members, declared in "packet.h", withguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1043 f5534014-38df-0310-8fa8-9805f1628bb7
1999-08-24In the summary display for CLIP frames, make the protocol CLIP (whichguy1-2/+2
will get overridden in any case). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@561 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-28Patches from Thierry Andry to support Classical IP captures from systemsguy1-0/+77
with the ATM on Linux software from <http://lrcwww.epfl.ch/linux-atm/>. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@401 f5534014-38df-0310-8fa8-9805f1628bb7