aboutsummaryrefslogtreecommitdiffstats
path: root/epan
AgeCommit message (Collapse)AuthorFilesLines
2000-12-22fix '#endif FRED' to '#endif /* FRED */'Nathan Neulinger1-2/+2
svn path=/trunk/; revision=2771
2000-12-22Enable FT_BYTES dfiltering, from Ed Warnicke.Gilbert Ramirez5-27/+70
svn path=/trunk/; revision=2768
2000-12-13Add code to check the checksums of TCP segments and UDP datagrams;Guy Harris1-2/+3
replace the existing checksummer with a modified version of the BSD checksumming code. Add a flag to the "packet_info" structure to indicate that a packet is the first fragment of a fragmented datagram, so that the checksummers won't try to checksum those. (It doesn't seem to add a lot of CPU overhead, so we don't introduce a flag to disable it, yet. Further checks may be necessary to see whether the overhead is just swamped by other overheads when scanning through a capture dissecting all frames, or if it truly is negligible.) Make the Boolean preference option controlling whether to make the top-level protocol tree item for TCP display a packet summary static to the TCP dissector (it doesn't need to be accessible outside the TCP dissector). svn path=/trunk/; revision=2751
2000-12-04Add a "col_clear()" routine, to clear a column; it appears (and itGuy Harris2-2/+21
doesn't just seem to be a profiling artifact) that, at least on FreeBSD 3.4, it's significantly more efficient to clear out a column by stuffing a '\0' into the first byte of the column data than to do so by copying a null string (I guess when copying one byte, the fixed overhead of the procedure call and of "strcpy()" is significant). Have the TCP dissector set the Protocol column, and clear the Info column, before doing anything that might cause an exception to be thrown, so that if we *do* get an exception thrown, the frame at least shows up as TCP. Instead of, in the TCP dissector, constructing a string and then stuffing it into the Info column, just append to the Info column, which avoids one string copy. Pass a "frame_data" pointer to dissectors for TCP and IP (and PPP) options, so they can use it to append to the Info column. svn path=/trunk/; revision=2744
2000-12-03Update a comment.Guy Harris1-3/+3
svn path=/trunk/; revision=2742
2000-12-03Declare "proto_malformed" in "packet-frame.h", as "packet-frame.c"Guy Harris1-5/+2
exports it. Make the pointer that points to the GMemChunk for per-frame data static to "epan/packet.c", as it's not used outside "epan/packet.c". svn path=/trunk/; revision=2741
2000-12-03Nothing in "packet.c" uses the global "cfile", so there's no need toGuy Harris1-4/+1
declare it there. svn path=/trunk/; revision=2740
2000-12-03Pull the code to set the fields in the "cfile.cinfo" structure into aGuy Harris2-2/+20
common routine to initialize a "column_info()" structure, shared by Ethereal and Tethereal. svn path=/trunk/; revision=2739
2000-11-30In "tvb_find_guint8()" and "tvb_pbrk_guint8()", correctly set the limitGuy Harris1-4/+14
of the search if the caller-supplied limit goes past the end of the tvbuff - the limit should just be what remains in the tvbuff after the specified starting offset. In "tvb_find_line_end_unquoted()", after searching for the next interesting character, check the value we got back from that search, in "char_offset", not whatever happens to be in "cur_offset", to see if we found a character. svn path=/trunk/; revision=2719
2000-11-30In tvb_set_reported_length(), don't assert onGilbert Ramirez1-2/+4
reported_length <= tvb->reported_length, but throw a ReportedBoundsError if that condition is not met. svn path=/trunk/; revision=2718
2000-11-29Get the suffix for dynamically-loaded modules by means of a hackGuy Harris1-9/+31
involving "g_module_build_path()", rather than by checking the platform - this should let us handle non-Windows platforms that don't use ".so" (e.g., HP-UX). Use G_DIR_SEPARATOR_S as the pathname separator character when generating the pathname of the module. svn path=/trunk/; revision=2712
2000-11-28Move Win32 version to 0.8.14.1Gilbert Ramirez1-3/+3
svn path=/trunk/; revision=2705
2000-11-22Generated Bison and Flex files test whether __STDC__ is definedGuy Harris1-1/+18
in order to check whether to use ANSI C features such as "const". GCC defines it as 1 even if extensions that render the implementation non-conformant are enabled; Sun's C compiler (and, I think, other AT&T-derived C compilers) define it as 0 if extensions that render the implementation non-conformant are enabled; Microsoft Visual C++ 6.0 doesn't define it at all if extensions that render the implementation non-conformant are enabled. We define it as 0 in "config.h.win32", so that those generated files will use those features (and thus not get type warnings when compiled with MSVC++). svn path=/trunk/; revision=2698
2000-11-21Senseless old prototype for rpc init removed.Uwe Girlich1-3/+1
svn path=/trunk/; revision=2686
2000-11-20Move to version 0.8.14Gilbert Ramirez1-5/+5
svn path=/trunk/; revision=2682
2000-11-20Move tvbtest.c to EXTRA_DISTGilbert Ramirez1-3/+3
svn path=/trunk/; revision=2679
2000-11-19Check to make sure the h_addr entry returned by gethostbyname() can fitGerald Combs1-4/+6
into an in_addr struct. svn path=/trunk/; revision=2673
2000-11-19For each column, have both a buffer into which strings for that columnGuy Harris2-36/+88
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-18Fix a number of problems that caused compiles to fail ifGuy Harris2-7/+8
PLUGINS_NEED_ADDRESS_TABLE was defined. svn path=/trunk/; revision=2662
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 Harris3-4/+27
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-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-16Tvbuffify the STP dissector, have it register itself and have the LLCGuy Harris2-4/+4
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-15Move the table of bit-swapped byte values to "epan/bitswap.c", andGuy Harris6-18/+134
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-15Add a mechanism by which a dissector can be registered by name, anotherGuy Harris3-4/+102
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-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-13Add "dissector_delete()", "proto_item_get_len()",Guy Harris1-1/+11
"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-13Add the tvbuff routines expected to be used by dissectors to the tableGuy Harris1-1/+48
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 Harris7-47/+63
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-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-12Make "tvb_find_line_end()" and "tvb_find_line_end_unquoted()" treat CRGuy Harris1-72/+50
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
2000-11-11Make the string-to-compare-with arguments to "tvb_strneql()" andGuy Harris2-6/+6
"tvb_strncaseeql()" "const guint8 *", so that you can pass them pointers to "const". svn path=/trunk/; revision=2611
2000-11-11Get rid of the definitions of LITTLE_ENDIAN and BIG_ENDIAN inGuy Harris1-12/+1
"epan/pint.h" - they caused GCC to whine about them being redefined when I compiled on FreeBSD 3.4. Get rid of the stuff in "packet-ipv6.h" that defines various bit vectors differently depending on the byte order of the machine; instead, define them so that they work with items in host byte order. This lets us use a number of them rather than using hardwired hex values. Put "frag.ip6f_offlg" in host byte order before using it; this means that IP6F_MORE_FRAG can still be used even though it now works only on items in host byte order. svn path=/trunk/; revision=2610
2000-11-10Allow "tvb_find_guint8()", "tvb_pbrk_guint8()", and "tvb_strnlen()" toGuy Harris2-23/+45
take -1 as a "maxlength" value, meaning "to the end of the tvbuff". svn path=/trunk/; revision=2598
2000-11-10Tvbuffify the SAP and SDP dissectors.Guy Harris4-41/+246
Add "tvb_find_line_end_unquoted()" for the benefit of the SDP dissector; get rid of "find_line_end_unquoted()" as nobody uses it any more. Add "tvb_pbrk_guint8()" for the benefit of "tvb_find_line_end_unquoted()"; it searches for any of a number of characters, unlike "tvb_find_guint8()" which searches for only one. svn path=/trunk/; revision=2595
2000-11-09Tvbuffify the HTTP, NNTP, RSH, RTSP, and Telnet dissectors.Guy Harris2-12/+151
Add "tvb_find_line_end()", to find a CR and/or LF-terminated line in a tvbuff and return its length and the offset of the character after the line end, for the use of those dissectors. Add "tvb_strncaseeql()", which is like "tvb_strneql()" except that it does a case-insensitive comparison. svn path=/trunk/; revision=2590
2000-11-09Support for embedded newlines in SDP fields, from Robert Tsai.Guy Harris2-2/+34
svn path=/trunk/; revision=2584
2000-11-05Allow plugins to have, instead of "protocol" and "filter_string"Guy Harris1-37/+173
variables and a "dissector" routine, a "plugin_reg_handoff()" routine, which will act just like the "reg_handoff()" routine of a non-plugin dissector, registering the dissector with handoff tables. This lets them plug into both TCP and UDP, or plug into protocols other than TCP or UDP. Those new-style plugin are enabled and disabled using the standard "Edit->Protocols" mechanism (and thus should use "OLD_CHECK_DISPLAY_AS_DATA()" or "CHECK_DISPLAY_AS_DATA()"); they don't show up in the list of plugins, aren't enabled or disabled from that list, and, as they don't have a filter, can't have the filter changed from that list - instead, they should register preferences for port numbers and the like if they should be configurable to use different ports. Make the Gryphon protocol a new-style plugin. svn path=/trunk/; revision=2565
2000-11-03Corrected BASE_OCT support for display formats. Note - it probably isn'tNathan Neulinger1-5/+13
correct to display ints. svn path=/trunk/; revision=2552
2000-11-01Add a fourth choice of time format in the packet list display, whichGuy Harris2-2/+30
shows the date (in YYYY-MM-DD format) as well as the time of day when the packet arrived. svn path=/trunk/; revision=2547
2000-10-27Move to version 0.8.13.Gilbert Ramirez1-5/+5
Mention IGRP dissector in NEWS. svn path=/trunk/; revision=2539
2000-10-27Added some autoconf- and automake-generated files to .cvsignore.Gilbert Ramirez1-0/+8
svn path=/trunk/; revision=2538
2000-10-21Wildcard matching is tricky - you have to try wildcarding both theGuy Harris2-68/+393
source *and* destination port and/or both the source *and* destination address passed to "find_conversation()", because the packet for which you're trying to find the conversation may be going in the opposite direction to the packet for which the conversation was originally created. Create different hash tables for wildcarded conversations, to reduce the number of "is this a wildcard?" tests done when doing hash lookups. This is sufficient to allow the TFTP dissector to use conversations rather than being special-cased in the UDP dissector, and may also be sufficient to handle a similar problem with SMTP (request goes from client IP X port Y to server IP Z's well-known port, reply comes back from some other port on server Z to client IP X port Y), but further use may reveal other changes that should be made. svn path=/trunk/; revision=2525
2000-10-21Support for conversations with "wildcard" destination addresses, fromGuy Harris2-32/+147
Jeff Foster. svn path=/trunk/; revision=2523
2000-10-19Move the declaration of "g_resolving_actif" from the top-levelGuy Harris2-3/+3
"globals.h" file to "epan/resolv.h", as it's exported by "epan/resolv.c", have files that use "g_resolving_actif" include "resolv.h", and don't have "epan/resolv.c" include "globals.h" so that it doesn't drag in, for example, headers that, in turn, drag in GTK+ headers. svn path=/trunk/; revision=2517
2000-10-19There's no "exception.h" header file in "epan", but there isGuy Harris1-2/+2
"exceptions.h". svn path=/trunk/; revision=2514
2000-10-18Get rid of extra declaration of HAVE_DIRECT_H; one is enough.Guy Harris1-4/+1
svn path=/trunk/; revision=2510
2000-10-17Make the top-level "config.h.win32" more closely resemble the top-levelGuy Harris3-5/+100
"config.h", and update it to include stuff added to "config.h" and remove stuff removed from "config.h". Give libethereal a "config.h.win32" and make its "Makefile.nmake" file copy it to "config.h". svn path=/trunk/; revision=2504