aboutsummaryrefslogtreecommitdiffstats
path: root/packet-icmpv6.c
Commit message (Collapse)AuthorAgeFilesLines
* From Teemu Rinta-aho: draft 20 MIPv6 support (now in a file of its own).Guy Harris2003-02-041-1/+68
| | | | svn path=/trunk/; revision=7071
* Move into "call_dissector_work()" the stuff to handle dissecting, inGuy Harris2003-01-201-58/+14
| | | | | | | | | 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
* Don't cast away constness, and fix variable and structure memberGuy Harris2002-12-021-2/+2
| | | | | | | | | | | | | qualifiers as necessary to ensure that we don't have to. "strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't test their results as if they did. Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes. Update Michael Tuexen's e-mail address. svn path=/trunk/; revision=6726
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-8/+8
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-16/+8
| | | | | | | | equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
* Make some variables volatile because GCC on Digital UNIX complainedGuy Harris2002-01-301-7/+7
| | | | | | | | about them being trashed by setjmp/longjmp (does GCC there stuff them into registers? They're bigger than 64 bits, so they don't even fit into a single register on Alpha). svn path=/trunk/; revision=4636
* Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris2002-01-241-14/+13
| | | | | | | | | | | | arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. svn path=/trunk/; revision=4605
* Include files from the "epan" directory and subdirectories thereof withGuy Harris2002-01-211-3/+3
| | | | | | | | | | | | | "epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
* From Martti Kuparinen: update the HMIPv6 support to match the latestGuy Harris2002-01-151-8/+8
| | | | | | draft (draft-ietf-mobileip-hmipv6-05.txt). svn path=/trunk/; revision=4546
* Put in a comment giving various Internet Draft names for ICMPv6 stuff weGuy Harris2002-01-111-1/+15
| | | | | | handle. svn path=/trunk/; revision=4526
* Fix some more signed vs. unsigned issues.Guy Harris2002-01-111-4/+4
| | | | svn path=/trunk/; revision=4525
* Fix more unsigned items to be displayed with "%u" rather than "%d", asGuy Harris2002-01-101-4/+4
| | | | | | per Martti Kuparinen's comments. svn path=/trunk/; revision=4515
* The filetime is an unsigned quantity, so display it with %u, as perGuy Harris2002-01-101-2/+2
| | | | | | Martti Kuparinen's comment. svn path=/trunk/; revision=4512
* HMIPv6 fix, from Martti Kuparinen.Guy Harris2002-01-091-7/+7
| | | | svn path=/trunk/; revision=4506
* Move the pointer to the "column_info" structure in the "frame_data"Guy Harris2001-12-101-9/+9
| | | | | | | | | | | | | | | structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. svn path=/trunk/; revision=4370
* Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris2001-12-031-2/+5
| | | | | | | | take a dissector handle as an argument, rather than a pointer to a dissector function and a protocol ID. Associate dissector handles with dissector table entries. svn path=/trunk/; revision=4308
* Moved from using dissect_data to using call_dissector()Ed Warnicke2001-11-251-6/+8
| | | | svn path=/trunk/; revision=4264
* Have a flag in the "packet_info" structure, which indicates whether theGuy Harris2001-10-011-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | stuff currently being dissected is part of a packet included in an error packet (e.g., an ICMP Unreachable packet). Have the TCP dissector not bother doing reassembly if the TCP segment is part of an error packet, rather than an actual TCP transmission; other dissectors might want to treat those packets specially as well. Add to the "tcpinfo" structure a flag indicating whether the URG flag was set, rather than having the zero or non-zero value of the urgent pointer indicate that. (Yes, at least as I read RFC 793, a zero urgent pointer value isn't useful, as it means "the stuff before this segment is urgent", but it's certainly possible to put onto the wire a TCP segment with URG set and a zero urgent pointer.) Don't dissect the TCP header by grabbing the entire header with "tvb_memcpy()" and then pulling stuff out of it - extract stuff with individual tvbuff calls, and put stuff into the protocol tree and the Info column as we extract it, so that we can dissect a partial header. This lets us, for example, get the source and destination ports from the TCP header of the part of a TCP segment included in a minimum-length ICMPv4 error packet. svn path=/trunk/; revision=3986
* When dissecting an ICMP datagram that contains part of an IP datagram,Guy Harris2001-09-271-3/+12
| | | | | | | | | | | hand the (possibly-partial) IP datagram to the IP dissector, as we do for IPv6 datagrams inside ICMPv6 and CLNP datagrams inside CLNP ER PDUs. When dissecting IPv6 datagrams inside ICMPv6 and CLNP datagrams inside CLNP ER PDUs, catch the ReportedLengthError exception and ignore it, as they don't guarantee that all of the original PDU is present. svn path=/trunk/; revision=3960
* If "snprintf()" can't print all the data because there's not enoughGuy Harris2001-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | room, it might return -1 in some versions of glibc; check for that, and quit if that happens. It might also return the number of characters that would've been printed had there been enough room; this means that a loop that does n += snprintf (buf + n, BUF_LENGTH - n, ...); may end up making "n" bigger than BUF_LENGTH, and "snprintf()" might not sanely handle being passed a negative length, so if "n" isn't less than the total length of the string buffer, don't add stuff to it. The "capabilitiesStart" variable in "add_capabilities()" in the WSP dissector is an offset into the PDU data; there's no guarantee that said offet is < 256, and, even if there were, there's no point in making it an 8-bit variable. Add some additional buffer overflow checks to the WSP dissector. svn path=/trunk/; revision=3953
* Typo fix, from Martti Kuparinen.Guy Harris2001-09-051-2/+2
| | | | svn path=/trunk/; revision=3910
* HMIPv6 support, from Martti Kuparinen.Guy Harris2001-09-041-2/+60
| | | | svn path=/trunk/; revision=3907
* Tvbuffify the DNS, NBNS, NBDS, and NBSS dissectors.Guy Harris2001-07-021-14/+7
| | | | | | | Add a "tvb_memeql()" routine, for doing "memcmp()"-style equality comparisons. svn path=/trunk/; revision=3631
* From Joerg Mayer: explicitly fill in all members of aGuy Harris2001-06-181-5/+5
| | | | | | | "header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
* Not all platforms have u_int32_t (for example, Windows+MSVC doesn't), soGuy Harris2001-06-021-2/+2
| | | | | | use "guint32" instead. svn path=/trunk/; revision=3503
* Create the tree for an ICMPv6 optionn before putting something in it.Guy Harris2001-06-021-5/+5
| | | | svn path=/trunk/; revision=3499
* draft-draves-ipngwg-router-selection-01 support.Jun-ichiro itojun Hagino2001-06-011-28/+97
| | | | | | | | fix icmp6 homeagent info option decoding (convert to tvb framework). plug a memory leak. sync some of mobile-ip6 #define symbol names with draft-ietf-ipngwg-2292bis-02. svn path=/trunk/; revision=3497
* In the ICMPv6 and OSI CLNP dissectors, when calling the IPv6 or CLNPGuy Harris2001-05-271-56/+62
| | | | | | | | | | | | | | dissector to dissect the datagram inside an error report datagram, save the current values of the source and destination addresses, and restore them after the subdissector returns, so that all address columns in the summary pane will reflect the error datagram, not the datagram that provoked the error. Set the Protocol and Info columns upon entry to the ICMPv6 dissector, so that if we throw an exception they don't reflect the protocol above ICMPv6. svn path=/trunk/; revision=3456
* More signed-vs-unsigned changes from Joerg Mayer.Guy Harris2001-04-271-10/+12
| | | | svn path=/trunk/; revision=3386
* Move the declarations of IP protocol numbers to "ipproto.h" fromGuy Harris2001-04-231-2/+2
| | | | | | | | "packet-ip.h". Fix Gerald's address in some files while we're at it. svn path=/trunk/; revision=3366
* Now that the IPv6 dissector has been tvbuffified, we can register it; doGuy Harris2001-04-231-7/+43
| | | | | | | | | | | so, make it static, and call it only through a handle. In the ICMPv6 dissector, when we dissect the invoking packet in an ICMPv6 error or in a redirected header option, make the columns non-writable, so the summary line for the packet shows it as an ICMPv6 packet, not as the packet included in the ICMPv6 packet. svn path=/trunk/; revision=3361
* Tvbuffification of the IPv6 and ICMPv6 dissectors, and some bug fixesGuy Harris2001-04-231-282/+314
| | | | | | | | | | | | and an update to draft 7 of ICMPv6 name lookups, from Heikki Vatiainen. Fix some formats in the ICMPv6 dissector to use %u, rather than %d, for unsigned quantities. Show various type and code values in ICMPv6 as decimal, not hexadecimal (they're decimal in the RFCs). svn path=/trunk/; revision=3360
* Replace proto_tree_add_item_hidden with proto_tree_add_boolean_hidden toOlivier Abad2001-03-281-2/+2
| | | | | | | fix a crash found by Heikki Vatiainen when adding the hf_icmpv6_checksum_bad field. svn path=/trunk/; revision=3201
* Add hidden fields for bad checksums to various IP-family protocols.Guy Harris2001-02-281-2/+10
| | | | | | | | Initialize the "hf_" value for "icmp.checksum_bad" to -1, the way all other "hf_" values are initialized, and declare it and "ip.checksum_bad" to have base BASE_NONE, not 4. svn path=/trunk/; revision=3087
* Mobile IPv6 updates from Borosa Tomislav <tomislav.borosa@SIEMENS.HR>.Gerald Combs2001-01-231-4/+43
| | | | svn path=/trunk/; revision=2935
* Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="Guy Harris2001-01-221-3/+1
| | | | | | | | | | | statements. Move the setting of the Protocol column in various dissectors before anything is fetched from the packet, and also clear the Info column at that point in those and some other dissectors, so that if an exception is thrown, the columns don't reflect the previous protocol. svn path=/trunk/; revision=2932
* Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris2001-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | "{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and "register_dissector()", so that an entry in those tables has associated with it the protocol index of the protocol the dissector handles (or -1, if there is no protocol index for it). This is for future use in a number of places. (Arguably, "proto_register_protocol()" should take a dissector pointer as an argument, but 1) it'd have to handle both regular and heuristic dissectors; 2) making it take either a "dissector_t" or a union of that and a "heur_dissector_t" introduces some painful header-file interdependencies so I'm punting on that for now. As with other Ethereal internal APIs, these APIs are subject to change in the future, at least until Ethereal 1.0 comes out....) svn path=/trunk/; revision=2849
* Have "proto_register_protocol()" build a list of data structures forGuy Harris2001-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. svn path=/trunk/; revision=2810
* Check the checksum on ICMPv6 packets, if possible.Guy Harris2000-12-141-5/+45
| | | | svn path=/trunk/; revision=2759
* For each column, have both a buffer into which strings for that columnGuy Harris2000-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Get rid of the definitions of LITTLE_ENDIAN and BIG_ENDIAN inGuy Harris2000-11-111-13/+13
| | | | | | | | | | | | | | | | "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
* Fix a "proto_tree_add_text()" call.Guy Harris2000-11-091-2/+2
| | | | svn path=/trunk/; revision=2593
* support match-prefix and use-prefix decoding for router renumbering protocolJun-ichiro itojun Hagino2000-11-091-37/+165
| | | | svn path=/trunk/; revision=2592
* correct IPv6 router renumbering dissector.Jun-ichiro itojun Hagino2000-11-091-5/+6
| | | | svn path=/trunk/; revision=2591
* Don't loop infinitely on options with zero length.Gilbert Ramirez2000-10-121-6/+13
| | | | | | From Santeri Paavolainen. svn path=/trunk/; revision=2489
* correct nodeinfo (node addresses). it returns address (16byte) + ttl (4byte),Jun-ichiro itojun Hagino2000-08-291-5/+6
| | | | | | | not just addresses. KAME kernel currently uses old format, so ethereal does not work with current KAME kernel (KAME kernel will be corrected). svn path=/trunk/; revision=2381
* Change u_int32_t to guint32Gilbert Ramirez2000-08-221-4/+4
| | | | svn path=/trunk/; revision=2342
* more support for icmp6 node information query.Jun-ichiro itojun Hagino2000-08-221-8/+167
| | | | | | | - DNS name decode (uses function in packet-dns.c) - supported bitmap svn path=/trunk/; revision=2338
* avoid pointer typecast, which leads to unaligned access.Jun-ichiro itojun Hagino2000-08-181-6/+5
| | | | svn path=/trunk/; revision=2294
* add dissector for draft-ietf-ipngwg-icmp-name-lookups-06.txtJun-ichiro itojun Hagino2000-08-181-48/+303
| | | | | | | (icmp node information query). not finished yet - need DNS decoding. for DNS name queries/replies. svn path=/trunk/; revision=2289