aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ip.c
AgeCommit message (Collapse)AuthorFilesLines
1999-08-28Changed ip.flags from FT_UINT16 to FT_UINT8, and made it highlight onlyGilbert Ramirez1-3/+3
one byte in the hexdump. svn path=/trunk/; revision=600
1999-08-28Set protocol column to "IP" for fragmented IP packets. It was not being set atGilbert Ramirez1-1/+3
the IP layer, leaving the lower layer's abbreviation in the protocol column. svn path=/trunk/; revision=599
1999-08-26Dissect unknown IP protocols with dissect_data().Gilbert Ramirez1-1/+4
svn path=/trunk/; revision=585
1999-08-21Richard J�rgensen <ric@tbit.dk> pointed out that ICMP and IGMP checksumsGerald Combs1-3/+3
were printed in the wrong byteorder. svn path=/trunk/; revision=539
1999-08-18Declare the "packet_info" structure "pi" in "packet.h", rather than in aGuy Harris1-7/+16
bunch of source files. Replace the "payload" field of a "packet_info" structure with "len" and "captured_len" fields, which contain the total packet length and total captured packet length (including all headers) at the current protocol layer (i.e., if a given layer has a length field, and that length field says its shorter than the length we got from the capture, reduce the "pi.len" and "pi.captured_len" values appropriately). Those fields can be used in the future if we add checks to make sure a field we're extracting from a packet doesn't go past the end of the packet, or past the captured part of the packet. Get rid of the additional payload argument to some dissection functions; use "pi.captured_len - offset" instead. Have the END_OF_FRAME macro use "pi.captured_len" rather than "fd->cap_len", so that "dissect the rest of the frame" becomes "dissect the rest of the packet", and doesn't dissect end-of-frame padding such as padding added to make an Ethernet frame 60 or more octets long. (We might want to rename it END_OF_PACKET; if we ever want to label the end-of-frame padding for the benefit of people curious what that extra gunk is, we could have a separate END_OF_FRAME macro that uses "fd->cap_len".) svn path=/trunk/; revision=506
1999-08-17Converted more of the IP fields to filterable fields.Gilbert Ramirez1-11/+32
svn path=/trunk/; revision=505
1999-08-14Add ICMP to the set of packet types counted in the window shown while aGuy Harris1-1/+4
capture is in progress. svn path=/trunk/; revision=491
1999-08-10Fix the list of descriptions of codes in ICMP Unreachable messages.Guy Harris1-2/+6
svn path=/trunk/; revision=458
1999-08-09Added John McDermott's patch for handling ICMP Unreachable|FragmentationGilbert Ramirez1-1/+30
Required packets. svn path=/trunk/; revision=455
1999-08-05Fix a "proto_tree_add_text()" call that should've been aGuy Harris1-2/+2
"proto_tree_add_item()" call (and fix the length passed to it, which, it appears, has been wrong for ages). svn path=/trunk/; revision=439
1999-07-31Remove srcip and destip from packet_info since it is not safe to affectLaurent Deniel1-3/+2
string pointer from the result of ip_to_str (statically allocated string). Use the ip_src and the new field ip_dst in follow.c to build a correct string display filter. svn path=/trunk/; revision=408
1999-07-29Made the protocol (but not the fields) use the new proto_tree routine,Gilbert Ramirez1-20/+28
allowing users to filter on the existence of these protocols. I also added packet-clip.c to the Nmake makefile. svn path=/trunk/; revision=402
1999-07-17Added just enough fields to TCP to support "Follow TCP Stream". It works now.Gilbert Ramirez1-4/+41
Added the protocol IDs for ipx and IGMP, but not their fields. svn path=/trunk/; revision=365
1999-07-15Modified the proto_register_field_array usage again. Thanks to Guy'sGilbert Ramirez1-11/+31
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-08Added Johan's RADIUS dissector, finally. I modified it to fit in with theGilbert Ramirez1-46/+13
new proto_tree routines. I also removed the check for lex and yacc from wiretap's configure script. The IP dissector now uses proto_register_field_array(). svn path=/trunk/; revision=348
1999-07-07Created a new protocol tree implementation and a new display filterGilbert Ramirez1-115/+176
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-21Added "0x" to a couple of proto_tree_add_item printf-style labels thatGilbert Ramirez1-3/+3
were printing values in hex. The lack of "0x" in fron of the hex numbers made me think the values were decimal, causing me to waste a bit of time during debugging. svn path=/trunk/; revision=323
1999-06-11Added RSVP protocol dissector.Gilbert Ramirez1-1/+4
svn path=/trunk/; revision=304
1999-06-11Added PPPoE, PPTP, GRE, and ISAKMP dissectors.Gilbert Ramirez1-1/+8
svn path=/trunk/; revision=303
1999-05-20Dissect ICMP Router Discovery packets (router advertisements and routerGuy Harris1-2/+37
solicitations). svn path=/trunk/; revision=295
1999-05-12Minor performance improvement and TCP option decoding fixed (when no tree).Laurent Deniel1-26/+27
svn path=/trunk/; revision=283
1999-04-05FTP, POP, and Telnet support from Richard Sharpe.Guy Harris1-1/+2
svn path=/trunk/; revision=237
1999-03-30Bugfix: The IP Precedence (first three bits in the TOS field) has been clearedhannes1-3/+2
by accident -> It should be displayed correctly with this fix svn path=/trunk/; revision=234
1999-03-28Jun-ichiro's IPv6 patch is merged in with ethereal and now uses the newGilbert Ramirez1-2/+29
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-108/+256
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-03-09Decode more stuff in an ICMP packet.Guy Harris1-1/+67
svn path=/trunk/; revision=213
1999-03-09Make the arrays of pointers to strings for ICMP decoding static, asGuy Harris1-24/+38
they're not used outside this file. Compute their sizes with the standard "number of elements in an array" C idiom, rather than hardcoding them as numbers. Add the "information request" and "information reply" ICMP packet types. svn path=/trunk/; revision=212
1999-02-09When doing a capture, decode enough of the incoming packets to correctlyGuy Harris1-1/+18
update the packet counts and percentages in the dialog box popped up during a capture, even for non-Ethernet captures. svn path=/trunk/; revision=184
1999-02-08I removed the bit-fields that depended upon gcc's ability to use any typeGilbert Ramirez1-7/+7
of variable as a bit field container. ANSI specs only allow unsigned ints to host bit fields; IBM's C compiler is very ANSI-strict. svn path=/trunk/; revision=183
1998-12-29* Added Joerg Mayer's Vines patchGerald Combs1-4/+41
* Added Joerg to the AUTHORS file * Added Guy's bitfield decode patch * Fixed time output svn path=/trunk/; revision=142
1998-11-17* Added column formatting functionality.Gerald Combs1-28/+37
* 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-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. svn path=/trunk/; revision=82
1998-10-28 Add the "Maximize security" type of service for IP, from RFCGuy Harris1-15/+18
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-21/+7
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-11/+10
* 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-13Add a routine to dissect IP or TCP options (and, from a look at RFCGuy Harris1-10/+380
1883, it should, perhaps with some additions, be able to handle IPv6 options as well). Make the IPv4 and TCP dissectors use it. Fix a typo in the IP dissector ("Unknon" for "Unknown"). Show the IP and TCP header lengths as byte counts rather than 4-byte-word counts. Show the protocol field value of an IP header as a name if it's a protocol we know about. List the acknowledgment and urgent pointer values in a TCP header only if the corresponding flag is set. Make the ETT_ values members of an enum, so that the compiler automatically assigns them sequential integer values (at least if said compiler conforms to the ANSI C standard). svn path=/trunk/; revision=45
1998-10-10* Fixes for bugs introduced in last night's commit.Gerald Combs1-35/+37
svn path=/trunk/; revision=37
1998-10-10* OSPF alignment fixes (Gerald)Gerald Combs1-11/+11
* 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-11/+11
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-17* Added Mike Hall's TCP reconstruction code.Gerald Combs1-1/+10
svn path=/trunk/; revision=10
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/+319
svn path=/trunk/; revision=2