aboutsummaryrefslogtreecommitdiffstats
path: root/packet.c
AgeCommit message (Collapse)AuthorFilesLines
1999-07-15Modified the proto_register_field_array usage again. Thanks to Guy'sGilbert Ramirez1-25/+14
suggestion, this new method using a static array should use less memory and be faster. It also has a nice side-effect of making the source-code more readble, IMHO. Changed the print routines to look for protocol proto_data instead of looking at the text label as they did before, hoping that the data hex dump field item starts with "Data (". Added the -G keyword to ethereal to make it dump a glossary of display filter keywords to stdout and exit. This data is then formatted with the doc/dfilter2pod perl program to pod format, which is combined with doc/ethereal.pod.template to create doc/ethereal.pod, from which the ethereal manpage is created. This way we can keep the manpage up-to-date with a list of fields that can be filtered on. svn path=/trunk/; revision=364
1999-07-13Added support for compiling on win32 with Visual C and 'nmake'. It compiles,Gilbert Ramirez1-1/+8
but does not link. Perhaps someone who understands the MS tools can help out. I made it link a few months ago, but with different version of glib/gtk+. I can't remember how I made it link. Most of the compatibility issues were resolved with adding #ifdef HAVE_UNISTD_H the the source code. Please be sure to add this to all future code. svn path=/trunk/; revision=359
1999-07-07Created a new protocol tree implementation and a new display filterGilbert Ramirez1-65/+100
mechanism that is built into ethereal. Wiretap is now used to read all file formats. Libpcap is used only for capturing. svn path=/trunk/; revision=342
1999-06-22Update the display if the "command-line-specified" time format isGuy Harris1-38/+56
changed by updating those columns showing the time in the "command-line-specified" format, not by redoing the entire packet list display; that way, the display continues to show the same packets and any packet the user selected remains selected. (It's also less work to do that - you don't have to re-dissect the packet.) Turn "redisplay_packets()" into "filter_packets()", and do some other cleanups. svn path=/trunk/; revision=325
1999-06-19Added "Capture" and "Display" menus; "Capture" has a "Start" item, whichGuy Harris1-3/+25
is the same as "Tools/Capture", and "Display" has an "Options" item, which pops up a dialog box to let you change the "default" time-stamp column display format on the fly (the "default" is what the "-t" command-line option sets), and have the display change when you do that. Made infrastructure changes to make the immediate display update work. Removed some unused functions, declared some functions used only in the file in which they're defined "static", and removed some unnecessary #includes. svn path=/trunk/; revision=317
1999-06-12Make the string argument to "col_add_str()" a "const gchar *" - itGuy Harris1-2/+2
doesn't modify anything pointed to by that argument, and that keeps us from getting complaints if we pass a "const gchar *" to it. svn path=/trunk/; revision=306
1999-05-11Turn "arpaddr_to_str()" into "bytes_to_str()", and make it public, so itGuy Harris1-1/+40
can be used by dissectors other than ARP to display byte arrays as strings of hex digits. Add a routine to extract a null-terminated Unicode string and turn it into an ISO 8859-1 string for display. (Ultimately, we should determine what character sets the X server or printer or whatever can handle, and turn it into the appropriate character set.) Display the challenge in "core-to-LANMAN-2.1" Negotiate Protocol responses as a string of hex digits - but only if the length is non-zero. (It's a counted array, not a null-terminated string.) Display some additional security mode bits in an NT LM 0.12 Negotiate Protocol response. Display some additional bits in the "capabilities" field of the Negotiate Protocol response. Display the challenge in an NT LM 0.12 Negotiate Protocol response as a string of hex digits (it's a counted array, not a null-terminated string). Display the domain name as Unicode in an NT LM 0.12 Negotiate Protocol response if the capabilities field has the "supports Unicode" bit set (no, not the "Unicode" bit in the "flags2" field - NT doesn't set that in the response, even though it sends the domain name over in Unicode!). Display some additional bits in the "flags2" field of an SMB. svn path=/trunk/; revision=275
1999-03-31Move the bitfield-decoding routines to "packet.h", along with otherGuy Harris1-1/+81
helper routines for packet dissecting, and away from "util.c", which is now all GUI-related. (Among other things, this makes life more pleasant for Gilbert Ramirez's "tethereal" stuff, although a lot more separation of GUI from other stuff needs to be done to make that - or a "curses"-based variant of Ethereal, or a variant using some other GUI toolkit - work smoothly.) svn path=/trunk/; revision=235
1999-03-30Changes to the routines to help decode text-oriented protocols (FTP,Guy Harris1-38/+89
SMTP, POP, HTTP, etc.) for the benefit of Richard Sharpe's FTP and POP dissectors. svn path=/trunk/; revision=233
1999-03-28Jun-ichiro's IPv6 patch is merged in with ethereal and now uses the newGilbert Ramirez1-1/+2
proto*() functions. The configure script tries to use ipv6 name resolution if it knows the type of ipv6 stack the user has (this can be avoided with the --disable-ipv6 switch) Additionally, the configure script now deals with wiretap better. If the user doesn't want to compile wiretap, the wiretap is never visited. A few unnecessary #includes were removed from some wiretap files, and a CPP macro was moved from bpf.c to wtap.h. svn path=/trunk/; revision=229
1999-03-23Removed all references to gtk objects from packet*.[ch] files. They nowGilbert Ramirez1-130/+11
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). svn path=/trunk/; revision=223
1999-02-12Add a first cut at HTTP decoding.Guy Harris1-1/+133
svn path=/trunk/; revision=187
1999-01-28Added guy's time and DHCP patch.Gilbert Ramirez1-1/+51
svn path=/trunk/; revision=177
1999-01-07I removed the per-file encapsulation type from wiretap, and make all filetypesGilbert Ramirez1-12/+2
provide a per-packet encapsulation type. this required minor modifications to ethereal. svn path=/trunk/; revision=162
1999-01-05Neither "ether_to_str()" nor "ip_to_str()" modify the data pointed to byGuy Harris1-3/+3
their arguments, so make those arguments pointers to 'const", so that we don't get complaints if somebody hands them a pointer to "const". svn path=/trunk/; revision=158
1999-01-02Added the iptrace (AIX's packet-capture tool) file format to wiretap.Gilbert Ramirez1-2/+12
This necessitated a change in ethereal because iptrace supports multi-NIC packet capturing, including multi-datalink-type capturing. svn path=/trunk/; revision=145
1998-12-29* Added Joerg Mayer's Vines patchGerald Combs1-16/+23
* Added Joerg to the AUTHORS file * Added Guy's bitfield decode patch * Fixed time output svn path=/trunk/; revision=142
1998-12-21Modify add_item_to_tree to return immediately on a null tree ptr.Gerald Combs1-1/+4
svn path=/trunk/; revision=131
1998-12-04When dissecting DNS or NBNS queries or replies, add the item to the treeGuy Harris1-1/+7
for the queries or replies first, then create and add the subtree and populate it, and, when that's done, set the length of the item appropriately; if you add the subtree later, the subtree's top-level node appears to have level 0, rather than 1 greater than the tree of which it's a subtree, which causes those trees not to print correctly. svn path=/trunk/; revision=122
1998-11-18* Added patches from Laurent and GuyGerald Combs1-1/+2
svn path=/trunk/; revision=103
1998-11-17* Added column formatting functionality.Gerald Combs1-8/+49
* Added check_col(), add_col_str() and add_col_fmt() to replace references to ft->win_info. * Added column prefs handling code. svn path=/trunk/; revision=97
1998-11-12A lengthy patch to add the wiretap library. Wiretap is not used by defaultGilbert Ramirez1-1/+24
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. svn path=/trunk/; revision=82
1998-10-28 Add the "Maximize security" type of service for IP, from RFCGuy Harris1-3/+3
1455. Make the arguments to "val_to_str()" and "match_strval()" that point to things those routines don't modify pointers to "const", and make the "value_string" tables passed into those routines in "packet-ip.c" "const". svn path=/trunk/; revision=72
1998-10-20 Add a "val_to_str()" routine that calls "match_strval()" and, ifGuy Harris1-3/+25
it returns NULL, formats the value with the format passed in as an argument, and returns a pointer to that static buffer. Change several "match_strval()" calls to use "val_to_str()". In "dissect_ospf()", use "match_strval()" to look up the packet type, and use "Unknown" if it doesn't find a match. svn path=/trunk/; revision=66
1998-10-16* Copied in the correct GNU license (I'm such a goober)Gerald Combs1-4/+5
* Hacks to the filter interface (Gerald) * About box (Laurent) * AppleTalk support (Simon) * Mods to the match_strval routine (Gerald) svn path=/trunk/; revision=61
1998-10-12- Added match_strval function to packet.cGerald Combs1-16/+4
- Separated display and capture filters; rearranged some of the look and feel - Lots of other miscellaneous fixes and updates svn path=/trunk/; revision=38
1998-10-10* OSPF alignment fixes (Gerald)Gerald Combs1-1/+27
* FDDI support (Laurent, Guy) svn path=/trunk/; revision=36
1998-09-27Merged in a _huge_ patch from Guy Harris. It adds a time stap column,Gerald Combs1-5/+62
generalizes the column printing code, adds a "frame" tree item to the tree view, and fixes a bunch of miscellaneous coding bugs. svn path=/trunk/; revision=31
1998-09-25* Ethernet manufacturer support (Laurent)Gerald Combs1-1/+7
* PPP fixes (Gerald) * Null/loopback interface support (Gerald) svn path=/trunk/; revision=25
1998-09-16Added ID tags to the beginning of each source file.Gerald Combs1-0/+2
svn path=/trunk/; revision=7
1998-09-16Initial revisionGerald Combs1-0/+216
svn path=/trunk/; revision=2