aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2000-11-18Fix a number of problems that caused compiles to fail ifGuy Harris8-40/+42
PLUGINS_NEED_ADDRESS_TABLE was defined. svn path=/trunk/; revision=2662
2000-11-18dissect_sip() was incorrectly always calling the next levelGilbert Ramirez1-4/+5
dissector when tree was NULL. From Heikki Vatiainen <hessu@cs.tut.fi> svn path=/trunk/; revision=2661
2000-11-18Nobody calls "old_try_conversation_dissector()" orGuy Harris4-98/+4
"old_dissector_try_heuristic()" any more, as their users have all been tvbuffified - get rid of them. svn path=/trunk/; revision=2660
2000-11-18Put in an empty declaration of "struct dissector_handle" beforeGuy Harris1-2/+4
typedeffing "dissector_handle_t" to be a pointer to it. svn path=/trunk/; revision=2659
2000-11-18Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSIGuy Harris29-1182/+1350
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-18Corrected wrong function call in plugins_enable_cbGraham Bloice1-2/+2
svn path=/trunk/; revision=2657
2000-11-18Do the checks for the presence of a conversation dissector the same wayGuy Harris1-10/+6
in "try_conversation_dissector()" that they're done in "old_try_conversation_dissector()". svn path=/trunk/; revision=2656
2000-11-18Don't attempt to call the dissector for a conversation if theGuy Harris1-3/+16
conversation doesn't have a dissector. svn path=/trunk/; revision=2655
2000-11-17Add #include <string.h>, to get prototypes for mem* and str* functions.Gilbert Ramirez27-27/+54
svn path=/trunk/; revision=2654
2000-11-17Give the "null" link-layer header dissector a dissector table, and putGuy Harris9-49/+63
the BSD AF_ type values it uses into an "aftypes.h" header file for dissectors that register themselves in that dissector table include. svn path=/trunk/; revision=2653
2000-11-17Reference clock identifiers a DATUM TymServe 2100 NTP network timeserverGuy Harris2-1/+5
can return, from Phil Techau. svn path=/trunk/; revision=2652
2000-11-16Tvbuffify the STP dissector, have it register itself and have the LLCGuy Harris30-172/+155
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-11-15"get_CDR_short()", from Frank Singleton.Guy Harris3-2/+35
Fix a comment. svn path=/trunk/; revision=2650
2000-11-15Move the table of bit-swapped byte values to "epan/bitswap.c", andGuy Harris9-131/+174
declare it, and define a "BIT_SWAP" macro that uses it, in "epan/bitswap.h". Use that macro to bit-swap bytes in the IEEE 802.11 dissector, rather than the macro that was used (said macro used GCCisms and didn't compile on Windows). Make an "init_plugin()" routine to enable a plugin and call its init routine, and call it from "check_plugin_status()" and "plugins_enable_cb()", rather than having very similar code in two places; "patable" is now part of libethereal, and, at least on Windows, attempts to refer to it from "libui" failed. Make "patable" static to "epan/plugins.c". (This may still not work, as now "libui" is calling a routine in "libethereal"; if that fails, perhaps it's time to get rid of the "enable/disable plugins" stuff completely, as new-style plugins, at least, register themselves as protocols and should be controllable from the "Edit->Protocols" window just as built-in dissectors are.) svn path=/trunk/; revision=2649
2000-11-15Tvbuffify the IPP dissector, and have it register itself rather thanGuy Harris4-141/+107
being a global function. The HTTP dissector should set "pinfo->current_proto" to HTTP even if we consider the packet to be IPP, so that if we run past the end of a tvbuff while dissecting HTTP stuff it's reported as a problem with HTTP, not IPP. svn path=/trunk/; revision=2648
2000-11-15Add a mechanism by which a dissector can be registered by name, anotherGuy Harris13-55/+173
dissector can get a "handle" for that dissector by name and then call that dissector through the handle. This allows dissectors that can't be called through a port table or a heuristic table to be called from other dissectors without directly referring to the dissector function - dynamically-loaded modules, under Windows, cannot directly call functions in the main program, and non-plugin dissectors are in the main program and thus cannot be called from plugin dissectors unless either 1) a pointer to the dissector is put in the Big Transfer Vector or 2) some other mechanism for getting a pointer to the dissector is provided. This mechanism could also support registering old-style dissectors and calling them from new-style dissectors without the new-style dissector having to do the argument translation itself (I didn't add support for registering old-style dissectors because I'd prefer to have people tvbuffify their code if they have to register a dissector...). It could also, in the future, perhaps support disabling of protocols; setting "pinfo->current_proto"; inside "call_dissector()" - and inside "{old_}dissector_try_port()" and "{old_"dissector_try_heuristic()" - allowing a pile of stuff that currently has to be done in every dissector be done by common code. (I have some ideas about how to do this, by having "proto_register_protocol()" take an abbreviation - of the sort that would be put in, for example, "pinfo->current_proto" - as an argument; having the calls to register dissectors take an index returned by "proto_register_protocol()" as an argument. The abbreviation could be used elsewhere as well, e.g. in the "Decoding" tab of the "Edit->Protocols" dialog box, and in a GUI for constructing protocol filters. Watch this space.) Make "dissect_sdp()" the first client of this mechanism; it's now static to "packet-sdp.c", and all dissectors that call it - including the MGCP plugin - now call it through a dissector handle fetched by "find_dissector()". (Next step - see if Ethereal can now compile on Windows as a result of this.) svn path=/trunk/; revision=2647
2000-11-15IEEE 802.11 support, from Johan Jorgensen of Axis Communications AB.Guy Harris11-10/+1848
Add in stuff for a bunch of libpcap formats either in libpcap 0.5.2 or in the current CVS version; we don't implement all of them in Ethereal/Wiretap (those are "#if 0"ed out), but we do implement the IEEE 802.11 stuff (which isn't yet in libpcap or tcpdump, but the CVS version of libpcap *does* reserve 105 as the encapsulation type number for 802.11). svn path=/trunk/; revision=2646
2000-11-14Add a ; to the empty default case in a switch statement. ANSI C saysGilbert Ramirez1-1/+3
you need some statement there, and a semicolon serves as a statement. Put a comment in there too, emphasizing the fact that the default case was meant to be empty. svn path=/trunk/; revision=2645
2000-11-14Guy's synopsis of the core routines of Ethereal, minus the protocol treeGilbert Ramirez1-0/+60
stuff which I need to explain. svn path=/trunk/; revision=2644
2000-11-14"plugin_api.c" needs to include <glib.h>, to define G_HAVE_GINT64 onGuy Harris4-9/+12
platforms that have "gint64". Fix plugin-table lines for "dissector_delete()", "dissect_data()", "prefs_register_module()", and "prefs_register_uint_preference()". The MGCP dissector uses routines from GLib, so when building it as a DLL for Windows, it has to be linked with "glib-XXX.lib". svn path=/trunk/; revision=2643
2000-11-14Add tvb_set_child_real_data_tvbuff(), which allows you to tell theGilbert Ramirez2-9/+32
tvbuff routines that a particular TVBUFF_REAL_DATA tvbuff is a "child" of another tvbuff. This link is utilized during a tvb_free_chain(), so that the child is freed when no longer necessary. svn path=/trunk/; revision=2642
2000-11-14Check for existence of COL_INFO before adding "Short xxx packet" toGilbert Ramirez2-4/+8
COL_INFO. svn path=/trunk/; revision=2641
2000-11-13Support for the BASE100 and GSC100BT subsystems by Jeff Foster.Olivier Abad2-62/+77
svn path=/trunk/; revision=2640
2000-11-13Improve the detection of the encapsulation used in a radcom file.Olivier Abad1-13/+11
svn path=/trunk/; revision=2639
2000-11-13Add "dissector_delete()", "proto_item_get_len()",Guy Harris4-12/+67
"proto_item_set_len()", "proto_item_set_text()", and the preference routines expected to be used by dissectors to the table of function pointers handed to dissectors on platforms where dynamically-loaded modules can't access symbols from the main program. svn path=/trunk/; revision=2638
2000-11-13As the SDP dissector now appends to, rather than overwriting, theGuy Harris1-3/+1
Protocol and Info columns, there's no longer any need for the SIP dissector to make the columns non-writable - SDP won't trash what SIP put there. svn path=/trunk/; revision=2637
2000-11-13Use "tvb_offset_exists()" rather than "tvb_length_remaining()" to checkGuy Harris12-28/+28
whether there's any data left in the tvbuff starting at a specified offset. svn path=/trunk/; revision=2636
2000-11-13Add the tvbuff routines expected to be used by dissectors to the tableGuy Harris4-4/+225
of function pointers handed to dissectors on platforms where dynamically-loaded modules can't access symbols from the main program. svn path=/trunk/; revision=2635
2000-11-13Move "bytes_to_str()" to "strutil.c" from "packet.c" - it's just aGuy Harris18-253/+285
string formatter, like "format_text()", and, as "tvbuff.c" now calls it (*vide infra*), we don't want to have to make "tvbuff.c" drag "packet.h" in just to declare "bytes_to_str()". It's now declared in "strutil.h", so include it in modules that use "bytes_to_str()" and weren't already including it. Add a "tvb_bytes_to_str()" wrapper that calls "tvb_get_ptr()" to get a pointer to a chunk of N bytes at a given offset in a tvbuff and then hands that chunk to "bytes_to_str()". Convert the code that was doing that to use "tvb_bytes_to_str()" instead (which caught what I suspect is a bug in the Q.2931 dissector, where it was handing an offset of 0 to "tvb_get_ptr()" - a cut-and-pasteo, I think). Tvbuffify the ARP dissector. svn path=/trunk/; revision=2634
2000-11-13If either of the "tvb_new_subset()" calls throws an exception, it meansGuy Harris1-1/+19
we don't have so much data in the frame that there's a trailer, so we should set "trailer_tvb" to NULL. Put in a comment explaining what the exception catching is all about. svn path=/trunk/; revision=2633
2000-11-13If either of the "tvb_new_subset()" calls throws an exception, it meansGuy Harris1-1/+19
we don't have so much data in the frame that there's a trailer, so we should set "trailer_tvb" to NULL. Put in a comment explaining what the exception catching is all about. svn path=/trunk/; revision=2632
2000-11-13"It's pronounced 'volatile pointer to tvbuff_t' but it's spelledGuy Harris2-18/+9
'tvbuff_t *volatile'." Makes "Throat-Warbler Mangrove" vs. "Luxury-Yacht" sound almost normal.... Type-qualified pointers to non-type-qualified objects are a barrel of fun in C. The way you declare a volatile pointer named "bar" to a *non-volatile* "foo" is foo *volatile bar; as opposed to a non-volatile pointer "bar" to a volatile "foo", which is volatile foo *bar; GCC's complaint about variables being clobbered by longjmp refers to the fact that "longjmp()" isn't guaranteed to restore variables stored in registers to the values they had at the time of the "longjmp()" (if "setjmp()" stuffs the current register values in the "jmp_buf", and "longjmp()" just reloads them rather than walking the stack to restore all register values pushed onto the stack, the values at the time of the "setjmp()" will be restored, clobbering any updates done after the "setjmp()"); the workaround provided in ANSI C is to declare the variables in question "volatile", which will keep them out of registers (or any other place that "setjmp()"/"longjmp()" can't handle). svn path=/trunk/; revision=2631
2000-11-13Tvbuffify the AppleTalk dissectors.Guy Harris2-4/+4
Dissect RTMP requests, as well as RTMP data packets. Call it "Routing Table Maintenance Protocol", not just "Routing Table". Print unsigned quantities with "%u", not "%d". Correctly handle extended vs. non-extended networks in RTMP data packets, as per *Inside AppleTalk(R), Second Edition*. svn path=/trunk/; revision=2630
2000-11-13If the packet inside the VLAN packet isn't an Ethernet packet - i.e., ifGuy Harris1-9/+60
the type/length field has a value 1500 or less, and thus is a length field rather than an Ethernet type field - give the next dissector only that many bytes, and put an entry in the VLAN protocol tree for the padding. svn path=/trunk/; revision=2629
2000-11-13Tvbuffify the AppleTalk ARP dissector.Guy Harris1-46/+45
svn path=/trunk/; revision=2628
2000-11-13Tvbuffify the AppleTalk dissectors.Guy Harris1-186/+213
Dissect RTMP requests, as well as RTMP data packets. Call it "Routing Table Maintenance Protocol", not just "Routing Table". Print unsigned quantities with "%u", not "%d". Correctly handle extended vs. non-extended networks in RTMP data packets, as per *Inside AppleTalk(R), Second Edition*. svn path=/trunk/; revision=2627
2000-11-13- Fix the hex pane offsets for hf_netb_local_ses_no,Gerald Combs1-6/+10
hf_netb_remote_ses_no, and hf_netb_data2. - Change hf_netb_local_ses_no and hf_netb_remote_ses_no from FT_UINT16 to FT_UINT8. - Add hf_netb_data2 to hf_netb. svn path=/trunk/; revision=2626
2000-11-13Don't overwrite the "Info" column in the SDP dissector, either - appendGuy Harris1-2/+16
to it, so as not to stomp on what the protocol that's using SDP put there. svn path=/trunk/; revision=2625
2000-11-12As RFC 2327 says, "SDP is purely a format for session description - itGuy Harris2-5/+3
does not incorporate a transport protocol, and is intended to use different transport protocols as appropriate including the Session Announcement Protocol [4], Session Initiation Protocol [11], Real- Time Streaming Protocol [12], electronic mail using the MIME extensions, and the Hypertext Transport Protocol." As such, it shouldn't set the protocol column to SDP, as that means the protocol column won't indicate what the transport protocol was; instead, it should append "/SDP" to the protocol column - RTSP was, after calling "dissect_sdp()", setting the protocol column to "RTSP/SDP", and this change means that all protocols using SDP will have the protocol column set in that fashion, and that the RTSP dissector doesn't have to explicitly set the protocol column to cause that to happen. svn path=/trunk/; revision=2624
2000-11-12Add a Makefile.nmake for the MGCP plugin, and updateGuy Harris1-1/+6
"plugins/Makefile.nmake" to build that plugin. Add to the table of routines callable from plugins "old_dissector_add()", "old_dissect_data()", and "proto_is_protocol_enabled()", so that the Gryphon dissector can build on Windows. Move the includes of "plugins/plugin_api.h" and "moduleinfo.h" before all the other includes, except for "config.h", in "plugin-mgcp.c", to match what the Gryphon dissector does; "plugins_api.h" must be included before any of the routines whose names it #defines in order for the plugin to build on Windows. (It still doesn't build on Windows, as still more routines need to be added to the table of routines callable from plugins, but tomorrow is another day. Making libethereal a DLL may obviate the need for that table, *if* all the routines called from a plugin are in libethereal, as I think routines in a DLL, even a run-time-loaded DLL, can call routines from another DLL as long as those routines are exported from the other DLL.) svn path=/trunk/; revision=2623
2000-11-12Add a Makefile.nmake for the MGCP plugin, and updateGuy Harris6-11/+55
"plugins/Makefile.nmake" to build that plugin. Add to the table of routines callable from plugins "old_dissector_add()", "old_dissect_data()", and "proto_is_protocol_enabled()", so that the Gryphon dissector can build on Windows. Move the includes of "plugins/plugin_api.h" and "moduleinfo.h" before all the other includes, except for "config.h", in "plugin-mgcp.c", to match what the Gryphon dissector does; "plugins_api.h" must be included before any of the routines whose names it #defines in order for the plugin to build on Windows. (It still doesn't build on Windows, as still more routines need to be added to the table of routines callable from plugins, but tomorrow is another day. Making libethereal a DLL may obviate the need for that table, *if* all the routines called from a plugin are in libethereal, as I think routines in a DLL, even a run-time-loaded DLL, can call routines from another DLL as long as those routines are exported from the other DLL.) svn path=/trunk/; revision=2622
2000-11-12"pinfo->current_proto" is typically set to an acronym or short name forGuy Harris1-2/+2
the protocol, not the filter name for the protocol, so it should be "AIM", not "aim". svn path=/trunk/; revision=2621
2000-11-12"wtap_loop()" no longer has problems with packet offsets of 0, so weGuy Harris2-22/+73
don't need to work around that. The offset, for a given packet, at which "ascend_seek()" should start searching for that packet's header must be computed separately from the offset, for that packet, at which "ascend_seek()" should start searching for the *next* packet - if the file is a "wdd" capture, and the packet has a "Date:" header and a WD_DIALOUT_DISP header, the search for that packet should start at the beginning of the "Date:" header, but the search for the next packet should start after the WD_DIALOUT_DISP header, as if we start it after the "Date:" header, the search will stop at the packet's own WD_DIALOUT_DISP header, as a packet could have a WD_DIALOUT_DISP header but no "Date:" header. svn path=/trunk/; revision=2620
2000-11-12If the packet isn't an Ethernet packet, add the length field.Guy Harris1-7/+12
svn path=/trunk/; revision=2619
2000-11-12Tvbuffify the 802.1Q VLAN dissector.Guy Harris1-22/+20
svn path=/trunk/; revision=2618
2000-11-12Not all packets in a "wdd" dump necessarily have a "Cause an attempt toGuy Harris3-21/+42
place call to" header (I presume this can happen if there was a call in progress when the packet was sent or received); don't require the Date: 01/12/1990. Time: 12:22:33 Cause an attempt to place call to 14082750382 to be present in every packet. (Only the date on the first packet is used, and only if it's present in the first packet; if the first packet doesn't have a date, we can't easily go back and fix up the previous packets, *especially* in programs such as Tethereal and editcap which make only one pass through the capture. We set the called number to a null string if that's the case; we could assume, in the sequential pass, that it's the phone number from the last call, and remember that for use when doing random access.) svn path=/trunk/; revision=2617
2000-11-12Add only one "proto_smtp" item to the protocol tree for SMTP; add textGuy Harris1-13/+11
subitems with "proto_tree_add_text()". svn path=/trunk/; revision=2616
2000-11-12Don't set the "Protocol" column to "GIOP" until we've decided that theGuy Harris1-9/+11
packet is a GIOP packet. If it has a GIOP header but doesn't have a version number we handle, accept it as a GIOP packet; if we don't do that, we should simply return FALSE *without* changing any of the columns or putting anything into the protocol tree. svn path=/trunk/; revision=2615
2000-11-12Tvbuffify the SMTP dissector.Guy Harris1-81/+159
Don't assume that we start out getting commands from the client - the capture may have started in the middle of a transaction, and we may be getting a message body from the client instead. Only treat stuff as commands if it consists of four alphabetic characters followed either by an end-of-line or a space. Commands in SMTP are case-insensitive; when looking for "DATA", do a case-insensitive comparison. If the packet contains the message body, just put "Message Body" in the summary, don't put any of the message body itself in there. If it's a command, put "Command:" in the summary before the first line of the command. When putting the message body into the protocol tree, give each line its own entry, rather than putting the entire body in as one entry. Don't put an entry into the protocol tree for a command parameter if there is no command parameter. svn path=/trunk/; revision=2614
2000-11-12Make "tvb_find_line_end()" and "tvb_find_line_end_unquoted()" treat CRGuy Harris2-77/+95
by itself as a line ending, as well as treating CR LF and LF as line endings. Tweak the Telnet dissector to treat LF and CR NUL as line endings, but not to treat CR by itself as a line ending (that's not exactly what the NVT specification in the Telnet RFC specifies, but the resulting output may be a bit more readable that way). svn path=/trunk/; revision=2613