aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
AgeCommit message (Collapse)AuthorFilesLines
2005-01-20From Julien Leproust: add heuristic dissectors' protocol names to theGuy Harris1-1/+45
layers string. Remove protocol names from the layer names string if the dissector rejects the frame. svn path=/trunk/; revision=13135
2005-01-19Add a field called "frame.protocols" which shows the protocols presentGerald Combs1-2/+13
in the frame. The filter "frame.protocols contains ip:icmp:ip" could be used to find any ICMP packets containing IP headers. Clean up whitespace. svn path=/trunk/; revision=13118
2005-01-01Get rid of some warnings about variables whose values might be lost in aGuy Harris1-1/+2
longjmp, by properly qualifying those variables as volatile. svn path=/trunk/; revision=12914
2004-10-31Make sure we don't return a random value in an unset variable if anGuy Harris1-1/+11
exception is thrown while dissecting an "error packet". svn path=/trunk/; revision=12457
2004-09-04From Eric Wedel: backend things for "Decode As" of DCE-RPC interfacesUlf Lamping1-0/+2
svn path=/trunk/; revision=11894
2004-08-06From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anGuy Harris1-1/+1
include of <resolv.h> in any system header file gets the system <resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]). svn path=/trunk/; revision=11615
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-04-23added a byte count output to the packet details notebook tabsUlf Lamping1-2/+2
(only visible if desegmenting activated) svn path=/trunk/; revision=10675
2004-02-28Not all dissector handles have protocols associated with them; check forGuy Harris1-3/+23
that before handing a null protocol handle to another routine. svn path=/trunk/; revision=10258
2004-02-24with the cahnges to when to call the heuristic dissectorRonnie Sahlberg1-3/+1
(and the fact that nbss does not register its conversation) this caused WANT_PDU_TRACKING to be decremented multiple times between the dissectors and thus ethereal could no longer reliably spot SMB PDUs that started in the middle of a tcp segment (unless we do reassembly which we dont do unless we have to since it eats soo many resources) FIX so that ethereal once again can spot SMB (and other) protocol PDUs that start in the middle of a segment. svn path=/trunk/; revision=10219
2004-02-01Fix some pointer typesJörg Mayer1-10/+10
svn path=/trunk/; revision=9930
2003-12-29Add a "saved_can_desegment" field to the "packet_info" structure, soGuy Harris1-1/+12
that dissectors for pass-through proxying protocols such as SOCKS can allow the subdissectors they call to ask that desegmentation be done. svn path=/trunk/; revision=9488
2003-11-21From Olivier Biot:Guy Harris1-1/+11
* Add a "match_string" field to the "packet_info" structure, saving the string value that matched in a string dissector lookup, by analogy to "match_port" - this was required for dissection with token rendering of WBXML content when no public ID was given (e.g. Nokia/Ericsson OTA provisioning data). * Add support for textual content type based WBXML token mapping. * Add extra WBXML public identifiers. * Add the Nokia/Ericsson OTA provisioning (version 7) token definitions. * Inform the user when a content-type based token match is found. svn path=/trunk/; revision=9061
2003-11-16Export "protocol_t" as an opaque type.Guy Harris1-22/+22
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()" take a "protocol_t *" as an argument, so they don't have to look up the "protocol_t" - this will probably speed them up considerably, and they're called on almost every dissector handoff. Get rid of a number of "proto_is_protocol_enabled()" calls that aren't necessary (dissectors called through handles, including those called through dissector tables, or called as heuristic dissectors, aren't even called if their protocol isn't enabled). Change some direct dissector calls to go through handles. svn path=/trunk/; revision=8979
2003-09-09Add "dissector_get_string_handle()" for string dissector tables, similarGuy Harris1-1/+16
to "dissector_get_port_handle()" for uint dissector tables. svn path=/trunk/; revision=8434
2003-09-07Support string dissector tables in the Tethereal "decode as" stuff.Guy Harris1-4/+10
Make the Ethereal "decode as" stuff not blow up with string dissector tables. Selectors for uint dissector tables are unsigned, not signed. svn path=/trunk/; revision=8408
2003-09-06When registering a dissector table, choose what type of hash andGuy Harris1-21/+309
comparison function to use based on the type value passed in. For the traditional unsigned integer table, require FT_UINT{8,16,24,32}; if the type is FT_STRING or FT_STRINGZ, use the string hashing functions instead. Add routines for manipulating entries and looking up dissectors in string dissector tables. svn path=/trunk/; revision=8407
2003-08-12Save and restore the value of pinfo->current_proto when calling aTim Potter1-1/+12
dissector in call_dissector_through_handle(). svn path=/trunk/; revision=8160
2003-06-05From Lionel Ains: "-d" flag for decode-as support in Tethereal.Guy Harris1-9/+38
Add a new routine to iterate through all dissector tables, calling a routine for each table, to support having the "-d" code list all dissector tables. Get rid of "dissector_handle_get_dissector_name()"; it was put in there for "-d", but turns out not to be necessary for that. Clean up the usage message a bit (using the convention, adhered to by at least some UNIX utilities, of listing all the flags with no arguments in a single lump, and then listing the ones with arguments individually, and also putting "-v" and "-h" in a separate lump, as Ethereal does). svn path=/trunk/; revision=7788
2003-05-23Add an API to get the dissector name from a dissector handle.Guy Harris1-2/+9
svn path=/trunk/; revision=7726
2003-04-23Update to TCP to handle hints from dissectors where the next PDU may start.Ronnie Sahlberg1-1/+5
ONCRPC dissector updated to provide hint to TCP where the next RPCoverTCP PDU starts as example. Trivial updates to the other TCP based protocols required to amke them handle this as well. See the updates to packet-rpc.c as an example. This is enabled by activating tcp analysis and provides hints to TCP to know where PDUs starts when not aligned to the start of the segment. svn path=/trunk/; revision=7543
2003-04-16Pull the stuff done in "dissect_packet()" to initialize a column_infoGuy Harris1-14/+3
structure into its own routine; rename "col_init()" to "col_setup()", and call the new routine "col_init()". svn path=/trunk/; revision=7467
2003-04-16Add the notion of a "fence" to columns. A dissector can set the fenceGuy Harris1-1/+2
to "protect" what's currently in the column, so that attempts to clear the column will only clear stuff after the fence and attempts to overwrite the column will append stuff after the fence. This, for example, allows a dissector to arrange that the Info column contain information for its protocol and for protocols running atop it. svn path=/trunk/; revision=7466
2003-03-01Completely initialize all the address fields in a packet_info structure,Guy Harris1-1/+13
setting the length to 0 and the data pointer to a null pointer. svn path=/trunk/; revision=7239
2003-02-27From Didier Gautheron: provide a mechanism to indicate why reassemblyGuy Harris1-1/+2
wasn't done, and, for TCP, use that mechanism if reassembly isn't done is an incorrect TCP checksum. svn path=/trunk/; revision=7212
2003-01-22From Dinesh Dutt:Guy Harris1-1/+4
- A new decoder called MDSHDR which decodes the internal header of the Cisco MDS switch (this is different from the Boardwalk header). - Support for some more new columns as part of FC support. - Fixed the decoding of the Special Frame in FCIP. - Fixed the decoding of credit management type field in FLOGI/PLOGI frame in FC-ELS. svn path=/trunk/; revision=6974
2003-01-20Move into "call_dissector_work()" the stuff to handle dissecting, inGuy Harris1-12/+110
error packets, the copy of the packet that got the error, rather than doing it in the CLNP dissector and the ICMP dissector and the ICMPv6 dissector and the PPP dissector for various control protocols; have it do that work iff "pinfo->in_error_pkt" is set. svn path=/trunk/; revision=6942
2002-12-08From Dinesh Dutt: Add Fibre Channel support, including FCIP, Basic FCGerald Combs1-1/+4
header, Extended Link Service, Interswitch Link Service, FCP, and IPFC. svn path=/trunk/; revision=6757
2002-11-16At least in my compile environment, we don't need "inet_v6defs.h" toGuy Harris1-5/+1
compile "epan/packet.c", and including it without including <winsock2.h> before it means that, as <winsock2.h> appears to get included after we include "inet_v6defs.h", we get complaints about a redefinition of AF_INET6; removing the include of "inet_v6defs.h" sqelches that warning. If we *do* need "inet_v6defs.h" on some platforms, put it back, but put in an include of <winsock2.h> before it, to keep the warning away - if we ever use AF_INET6 in "epan/packet.c", we want to use the one from <winsock2.h> if it defines it, as that's what the rest of Ethereal uses. svn path=/trunk/; revision=6649
2002-11-15From Chris Waters: export "find_dissector_table()" and addGuy Harris1-2/+9
"dissector_handle_get_protocol_index()". svn path=/trunk/; revision=6633
2002-10-29Don't return 0 from "call_dissector_work()" if the packet was dissectedGuy Harris1-1/+9
by the dissector we handed off to, even if the tvbuff we handed them was empty. svn path=/trunk/; revision=6518
2002-10-28Hoist the bulk of the stuff involved in calling a dissector through aGuy Harris1-60/+65
handle into a routine "call_dissector_work()", and have "dissector_try_port()" and "call_dissector()" use that routine (which means that "call_dissector()" now saves and restores "pinfo->can_desegment"). svn path=/trunk/; revision=6516
2002-10-22Add in a notion of "circuits", which are for virtual circuit-orientedGuy Harris1-1/+6
protocols (where there's a virtual circuit ID of some sort in packets) what conversations are for protocols ultimately running atop connectionless network layers. Have circuit type and ID values in the "packet_info" structure. Have the Frame Relay dissector set the circuit type and ID values, and have the Wellfleet compression protocol set up circuit information and store compression information with the circuit. svn path=/trunk/; revision=6469
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-8/+8
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-08-24Before dissecting a packet, clear the filter field and value stored withGuy Harris1-1/+3
each column for use by the "Match Selected" and "Prepare Selected" functions in the packet list pane. svn path=/trunk/; revision=6080
2002-08-21Moved the generic true_false_string saying "Set", "Not set" intoTim Potter1-1/+6
epan/packet.c It was cut and pasted into seven other dissectors! svn path=/trunk/; revision=6052
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-22/+2
equivalents for the epan/ directory but leave winsock2.h in inet_pton.c and inet_ntop.c for now (can't estimate the consequences). svn path=/trunk/; revision=5928
2002-07-17From Joerg Mayer:Guy Harris1-5/+1
dftest.c: Remove #if-0-ed includes packet-ieee80211.c, packet-wtls.c, packet-afp.c, packet-wsp.c, packet-wtp.c, ethereal_gen.py: Remove redundant include varargs (already in snprintf.h, and required only for snprintf.h) Remove unused include of snprintf.h from files not using "snprintf()". svn path=/trunk/; revision=5889
2002-06-23WinPcap 2.3's <pcap.h> includes <packet32.h>, and WinPcap 2.3'sGuy Harris1-3/+3
<packet32.h> includes <winsock2.h>; we include that rather than <winsock.h>, to avoid errors due to conflicting declarations in <winsock.h> and <winsock2.h>. svn path=/trunk/; revision=5742
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itGuy Harris1-8/+9
in the "packet_info" structure instead, as we don't need a pointer for every single frame in the capture file, just for each frame for which we currently have an open "epan_dissect_t". svn path=/trunk/; revision=5614
2002-05-15Get rid of an assigned-to-but-not-used variable, and eliminate anotherGuy Harris1-8/+2
variable that's used only once. svn path=/trunk/; revision=5479
2002-05-10Mark an unused argument as such.Guy Harris1-4/+4
Fix a couple of typos in comments. svn path=/trunk/; revision=5439
2002-05-09Merge the work in Novell_NCP_branch into the mainline code.Gilbert Ramirez1-1/+34
A little work still needs to be done on the new NCP dissector -- make some of the COL_INFO texts more useful, handle a Unicode issue, and modify some of the cases that use "request conditions". But the NCP dissector as it stands is very usable now. Note: I didn't merge in the PROTO_LENGTH_UNTIL_END macro... I wanted to think about the various possible macros and review an email conversation I had with Guy on the subject. svn path=/trunk/; revision=5432
2002-04-28Add routines to create anonymous handles for new-style dissectors (onesGuy Harris1-1/+15
that return an "int", giving either an indication of how much data was dissected, an indication of how much more data is needed from TCP to dissect, or 0, meaning "this isn't one of my packets"). svn path=/trunk/; revision=5260
2002-03-28Initialize the fields of "edt->pi" in order - and initialize some fieldsGuy Harris1-15/+15
that weren't being initialized. svn path=/trunk/; revision=5034
2002-03-02From Joerg Mayer: get rid of "-Wno-unused" flag in some configureGuy Harris1-4/+5
scripts, and check in changes to add _U_ to some unused arguments (some other should perhaps be used, so we leave the _U_ out so that the warnings serve as a reminder to check those). svn path=/trunk/; revision=4848
2002-02-27From Joerg Mayer: remove unused variables and declarations ofGuy Harris1-2/+1
non-existent functions. Remove the "filetype" argument from the "can_write_encap" functions for particular capture file types - the argument value is implicit, in that the routine being called is the routine for that particular file type. svn path=/trunk/; revision=4823
2002-02-27Fix "create_dissector_handle()" to properly create a handle for anGuy Harris1-2/+3
old-style dissector. svn path=/trunk/; revision=4816
2002-02-26Allow dissectors to be registered as "old-style" or "new-style"Guy Harris1-14/+69
dissectors. "Old-style" dissectors return nothing. "New-style" dissectors return one of: a positive integer, giving the number of bytes worth of data in the tvbuff that it considered to be part of the PDU in the tvbuff; zero, if it didn't consider the data in the tvbuff to be a PDU for its protocol; a negative integer, giving the number of additional bytes worth of data in needs to get the complete PDU (for use with fragmentation/segmentation when the length of the PDU isn't known to the protocol atop the one the dissector is dissecting). Have "call_dissector()" return the return value of new-style dissectors, and the length of the tvbuff handed to it for old-style dissectors. Have "dissector_try_port()" return FALSE if the subdissector is a new-style dissector and returned 0. Make the EAP dissector a new-style dissector, and have a "EAP fragment" dissector that is also a new-style dissector and handles fragmentation of EAP messages (as happens above, for example, RADIUS). Also, clean up some signed vs. unsigned comparison problems. Reassemble EAP-Message AVPs in RADIUS. svn path=/trunk/; revision=4811
2002-02-25Note that we could save some overhead if we require the name argument toGuy Harris1-1/+6
"add_new_data_source()" to be a string constant (or some other static data item). svn path=/trunk/; revision=4803