aboutsummaryrefslogtreecommitdiffstats
path: root/packet-data.c
AgeCommit message (Collapse)AuthorFilesLines
2004-01-03Apply the patches from Tadaaki Nagao for a global version of disabledsharpe1-2/+2
protocols ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9538 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-22- get rid of col_set_fence: it will be called in packet-sctp.c only.tuexen1-4/+2
- replace DATA1 by DATA in packet-m3ua.c (typo) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7529 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-19- add a col_set_fence calltuexen1-2/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7501 f5534014-38df-0310-8fa8-9805f1628bb7
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-5/+1
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-05-10From Joerg Mayer: make a pile of stuff not used outside one source fileguy1-1/+2
static, and add a new "packet-data.h" to declare "proto_data". Display escape sequences in octal in the IAPP dissector, as is now done in the RADIUS dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5441 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-04Make "dissect_data()" static - it's only called through handles.guy1-4/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5096 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-04Add _U_ to unused argument.gram1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5095 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-11-26This should be the final bit of removing the dissect_data symbolhagbard1-11/+5
from being required by anyone other than packet-data.c. It can now be accessed with call_dissector() with the name "data". dissect_data is now also of dissect_t. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4271 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-25Added hooks to be able to call dissect_data as via a handle.hagbard1-1/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4262 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-13Hopefully the last time I have to change my e-mail address.gram1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4199 f5534014-38df-0310-8fa8-9805f1628bb7
2001-10-31Get rid of a bunch of stuff that was there to support non-tvbuffifiedguy1-14/+2
dissectors and that's no longer needed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4112 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Have "proto_register_protocol()" build a list of data structures forguy1-3/+12
protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2810 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-16Tvbuffify the STP dissector, have it register itself and have the LLCguy1-4/+5
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2651 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-07Allow either old-style (pre-tvbuff) or new-style (tvbuffified)guy1-4/+4
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()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2218 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-12Fix dissect_data_tvb() so that it only appends a "Data" proto_tree labelgram1-4/+6
if there are more than 0 bytes of data. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1948 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-11Convert LLC dissector to use tvbuffs.gram1-1/+15
Non-tvbuff dissectors create a tvbuff when calling dissect_llc() Changed name of current_proto to match string in COL_PROTO ("FDDI" instead of "fddi") Changed short text to be: [Short Frame: %s] where %s is current_proto. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1943 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-11Add tvbuff class.gram1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1939 f5534014-38df-0310-8fa8-9805f1628bb7
2000-03-12Break proto_tree_add_item_format() into multiple functions:gram1-3/+3
proto_tree_add_protocol_format() proto_tree_add_uint_format() proto_tree_add_ipxnet_format() proto_tree_add_ipv4_format() proto_tree_add_ipv6_format() proto_tree_add_bytes_format() proto_tree_add_string_format() proto_tree_add_ether_format() proto_tree_add_time_format() proto_tree_add_double_format() proto_tree_add_boolean_format() If using GCC 2.x, we can check the print-format against the variable args passed in. Regardless of compiler, we can now check at run-time that the field type passed into the function corresponds to what that function expects (FT_UINT, FT_BOOLEAN, etc.) Note that proto_tree_add_protocol_format() does not require a value field, since the value of a protocol is always NULL. It's more intuitive w/o the vestigial argument. Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*) Checked in Guy's fix for the function declearation for proto_tree_add_text() and proto_tree_add_notext(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1713 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-24Fix a bunch of dissectors to use "pi.captured_len" rather thanguy1-4/+4
"fd->cap_len" for the frame length - or to use macros such as "BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which use "pi.captured_len" - so that they correctly handle frames where the actual data length of the packet is less than the size of the raw frame, e.g. with encapsulations such as ISL. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1530 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-22Fix files that had Gilbert's old e-mail address or that didn't have myguy1-2/+2
forwarding e-mail address. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1522 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-07Fix Gerald's e-mail address.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1437 f5534014-38df-0310-8fa8-9805f1628bb7
1999-08-26Properly pluralize "bytes" in the detail line for "dissect_data()".guy1-2/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@586 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-29Made the protocol (but not the fields) use the new proto_tree routine,gram1-1/+4
allowing users to filter on the existence of these protocols. I also added packet-clip.c to the Nmake makefile. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@402 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-07Created a new protocol tree implementation and a new display filtergram1-3/+12
mechanism that is built into ethereal. Wiretap is now used to read all file formats. Libpcap is used only for capturing. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@342 f5534014-38df-0310-8fa8-9805f1628bb7
1999-03-23Removed all references to gtk objects from packet*.[ch] files. They nowgram1-9/+4
reference the protocol tree with struct proto_tree and struct proto_item objects. That way, the packet decoding source code file can be used with non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged some of the information in packet.h to more appropriate places (like other packet-*.[ch] files). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@223 f5534014-38df-0310-8fa8-9805f1628bb7
1999-03-22Well, that was dumb. I didn't have to add a "capture_data()" routine; Iguy1-6/+1
just had to make "sap_capture_func()" return NULL if it didn't find an entry for the SAP it was passed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@220 f5534014-38df-0310-8fa8-9805f1628bb7
1999-03-22Have "sap_capture_func()" return "capture_data" rather thanguy1-1/+6
"dissect_data"; if you call "dissect_data()" with an argument list of the type expected by a "capture_XXX()" routine, it won't do the right thing (and may do the wrong thing, e.g. crash). Have "sap_capture_func()" (and "sap_dissect_func()") return function pointers rather than "void *"s, so that I don't make a mistake like the above in the future.... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@219 f5534014-38df-0310-8fa8-9805f1628bb7
1998-11-12A lengthy patch to add the wiretap library. Wiretap is not used by defaultgram1-2/+1
because it is still in its infancy, but it can be compiled in optionally. The library exists in its own subdirectory ethereal/wiretap. This patch also edits all the packet-*.c files to remove the #include <pcap.h> line which is unnecessary in these files. In the ethereal code, file.c is the most heavily modified with #ifdef WITH_WIRETAP lines for the optional library. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@82 f5534014-38df-0310-8fa8-9805f1628bb7
1998-10-22I added the byte count to the Data section. The print routines had togram1-2/+2
be modified to check the beginning of the string instead of the entire string when trying to find the Data section in order to print a hex dump. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@70 f5534014-38df-0310-8fa8-9805f1628bb7
1998-09-23I removed the ncp code from packet-ipx.c and created packet-ncp.c. Now thatgram1-2/+2
I've started concentrating on the NetWare modules again, packet-ncp.c is going to start to grow. I also added IPX RIP to packet-ipx.c. Additionally, I added the END_OF_FRAME macro to packet.h, which is useful for many dissect() routines. (and I already modified packet-bootp.c and packet-data.c to use this macro) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22 f5534014-38df-0310-8fa8-9805f1628bb7
1998-09-16Added ID tags to the beginning of each source file.gerald1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7 f5534014-38df-0310-8fa8-9805f1628bb7
1998-09-16Initial revisiongerald1-0/+51
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2 f5534014-38df-0310-8fa8-9805f1628bb7