aboutsummaryrefslogtreecommitdiffstats
path: root/packet-isakmp.c
AgeCommit message (Collapse)AuthorFilesLines
2003-12-13Widen the "value" parameter to "value2str()", rather than narrowing theGuy Harris1-51/+51
values passed via that parameter. Fix indentation. svn path=/trunk/; revision=9262
2003-12-11prevent MSVC warning:Ulf Lamping1-3/+3
"warning C4761: Gr��enkonflikt im Argument. Konvertierung vorgenommen" -> size conflict in argument, conversion done svn path=/trunk/; revision=9244
2003-12-10Squelch a compiler warning.Guy Harris1-3/+3
svn path=/trunk/; revision=9229
2003-12-10Check whether the packet length is less than the length of the packetGuy Harris1-1/+8
header, and give up if it is. svn path=/trunk/; revision=9227
2003-12-02From Yaniv Kaul:Guy Harris1-2/+4
1) fix description of Check Point version 5004; 2) add description of Check Point version 5005. svn path=/trunk/; revision=9142
2003-12-02From Arnaud Jacques: fix a typo, and handle another CheckPoint versionGuy Harris1-2/+4
number. svn path=/trunk/; revision=9138
2003-11-04Get rid of all the UDP-encapsulated IPSec stuff.Guy Harris1-40/+3
draft-ietf-ipsec-udp-encaps-06 says "The UDP port numbers are the same as used by IKE traffic, as defined in [Kiv05]", and "[Kiv05]" is draft-ietf-ipsec-nat-t-ike-05, which has been superseded by draft-ietf-ipsec-nat-t-ike-07; the latter appears to imply that it goes over port 4500, not port 500. We already have a draft-ietf-ipsec-udp-encaps-06 dissector for port 4500 (packet-ipsec-udp.c), and it's not entirely clear to me how, if draft-ietf-ipsec-udp-encaps-06 traffic *did* go over port 500, you'd distinguish it from regular ISAKMP traffic. svn path=/trunk/; revision=8882
2003-10-09From Aki Immonen: add a numbre of vendor IDs.Guy Harris1-2/+244
svn path=/trunk/; revision=8654
2003-10-08Dissect NAT-Discovery and NAT-Original Address payloads, and just useGuy Harris1-3/+67
the version-independent part of the draft ID for "Negotiation of NAT-Traversal in the IKE" rather than giving a URL for the draft (the URL in question was out-of-date, and a future one runs the risk of becoming out of date, given that the -07 draft expired a few days ago...). svn path=/trunk/; revision=8644
2003-10-04If a payload type doesn't have a dissector function, don't crash by callingGuy Harris1-2/+2
through the null dissector pointer, just dissect it as "Payload". svn path=/trunk/; revision=8610
2003-09-15From Yaniv Kaul: add AES-XCBC-MAC to the list of authentication methods,Guy Harris1-1/+2
per RFC 3566. svn path=/trunk/; revision=8473
2003-08-08Register the dissector by name - the "UDP Encapsulation of IPsecGuy Harris1-2/+4
Packets" dissector uses it. svn path=/trunk/; revision=8155
2003-06-24Squelch some compiler warnings.Guy Harris1-10/+9
svn path=/trunk/; revision=7918
2003-05-26Fix the definition of NUM_GRPDESC_TYPES, from Yaniv Kaul.Gerald Combs1-2/+2
svn path=/trunk/; revision=7746
2003-05-25The last byte of "foo[N]" is "foo[N-1]", not "foo[N]".Guy Harris1-4/+4
svn path=/trunk/; revision=7740
2003-05-25From Yaniv Kaul: add RFC3526 DH MODP groups.Gerald Combs1-5/+10
Fix a typo. svn path=/trunk/; revision=7739
2003-05-24Fix instances where the return value of snprintf() was being checked for -1,Gerald Combs1-7/+10
but not for <buf_size> or greater. Discovered by Timo Sirainen. svn path=/trunk/; revision=7731
2003-04-28From Yaniv Kaul - remove the check for the SafeNet VID, as that's notGuy Harris1-6/+1
SafeNet's VID. svn path=/trunk/; revision=7594
2003-01-20From Yaniv Kaul:Guy Harris1-3/+13
1. Add NAT-D and NAT-OA to the known payloads (does not dissect NAT-D yet, though), 2. Add types 3 and 4 as enapsulated tunnel and transport. svn path=/trunk/; revision=6947
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-47/+47
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-20From Yaniv Kaul:Guy Harris1-12/+119
1. Add parsing of group description attribute (donno why it was missed so far). 2. Enumeration of # of transforms and # of payloads (just makes it easier to look at). 3. Parsing of Vendor ID: 3.1 Identify several vendors' Vendor ID string (Microsoft, CyberGuard, SafeNet, Check Point at the moment) - if anyone has more VendorID strings, I'd be more than happy to add them. 3.2 Identify Vendor ID string of draft_ietf_ipsec_nat_t_ike_03 (NAT traversal RFC draft). 3.3 Further parsing of Check Point's Vendor ID string, to include Check Point product and version. If anyone has other vendors' parsing knowledge, again, I'd be happy to add it. svn path=/trunk/; revision=6033
2002-08-18From Yaniv Kaul:Guy Harris1-50/+55
1. Proper extraction of data from packet (removed bad tvb_get_ptr() and casting the resulting pointer to a structure method). 2. Printout of Initator and Responder cookies (per request from VPNC organization). svn path=/trunk/; revision=6013
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-9/+1
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
2002-05-20From Yaniv Kaul: update to draft-ietf-ipsec-udp-encaps-02, which removedGuy Harris1-45/+11
UDP-encapsulated AH packet support. svn path=/trunk/; revision=5512
2002-05-01Mark unused arguments as such.Guy Harris1-14/+14
svn path=/trunk/; revision=5340
2002-01-21Convert some "col_add_str()" calls to "col_set_str()".Guy Harris1-4/+4
svn path=/trunk/; revision=4592
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-2/+2
"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
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-12/+12
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
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-3/+6
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
2001-11-14Update two values for XAUTH (XAUTH-NEXT-PIN, XAUTH-ANSWER), inGilbert Ramirez1-1/+3
accordance with http://www.vpnc.org/draft-beaulieu-ike-xauth. From Yaniv Kaul <ykaul@checkpoint.com> svn path=/trunk/; revision=4200
2001-11-05IPCOMP transformation and ID_IPV4_ADDR_SUBNET for ISAKMP, fromGuy Harris1-2/+24
<a.stockmeier[AT]avm.de>. svn path=/trunk/; revision=4162
2001-10-26Make the protocol ID argument to "dissect_transform()" an "int", andGuy Harris1-36/+49
pass -1 in the cases where it's not called from "dissect_proposal()", i.e. where there *is* no protocol ID to pass it, and have it dissect the transform ID only as a number if the protocol ID isn't one of the ones we know about. Give the payload dissectors other than "dissect_transform()" an extra "int" argument, so that their signature is the same as that of "dissect_transform()", put "dissect_transform()" back in the "strfuncs[]" table, and get rid of the special-casing of "dissect_transform()" in "dissect_payloads()". svn path=/trunk/; revision=4086
2001-10-25We no longer try to dissect payloads of type "None", so get rid ofGuy Harris1-9/+3
"dissect_none()". svn path=/trunk/; revision=4082
2001-10-25Loop over all the sub-payloads of a Security Association payload; make aGuy Harris1-48/+82
common routine that loops over payloads. Have that routine check for a payload of type "None", which means that there's extra data after a payload that claimed to be the last one (by virtue of having a next payload type of "None"). When dissecting a Security Association payload, make sure we have enough data for the Domain of Interpretation field before putting it into the tree, dissect the situation as a 4-byte quantity followed by a set of sub-payloads only of the DOI is "IPSEC" (otherwise dissect it as raw data), and make sure we have enough data for the 4-byte situation field before putting it into the tree. When dissecting a Proposal payload, show the raw bytes of the SPI. svn path=/trunk/; revision=4081
2001-10-22From Yaniv Kaul - handle UDP-encapsulated IPSec NAT Keepalive packets.Guy Harris1-2/+7
svn path=/trunk/; revision=4059
2001-09-25If "snprintf()" can't print all the data because there's not enoughGuy Harris1-4/+28
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
2001-08-31From Frank Singleton: add some missing includes of <string.h>.Guy Harris1-1/+2
svn path=/trunk/; revision=3889
2001-08-30Update from Yaniv Kaul to dissect UDP-encapsulated AH and to registerGuy Harris1-17/+37
the ISAKMP dissector to be called for TCP port 500. svn path=/trunk/; revision=3883
2001-08-29Call the ESP dissector regardless of whether "tree" is non-null or not.Guy Harris1-35/+32
svn path=/trunk/; revision=3882
2001-08-29Support for UDP encapsulation of IPSec packet draft, from Yaniv Kaul.Guy Harris1-5/+59
svn path=/trunk/; revision=3881
2001-04-17Move the declaration of "ipprotostr()" out of "epan/packet.h" into a newGuy Harris1-1/+2
"ipproto.h" header file. svn path=/trunk/; revision=3313
2001-04-04Add, as per Tim Newsham, code to forcibly set the payload length to 4Guy Harris1-2/+8
(the minimum) if it's less than 4; also, add code to put a note that the payload length is bogus into the protocol tree. svn path=/trunk/; revision=3253
2001-02-28Tvbuffify the ISAKMP dissector.Guy Harris1-726/+425
Handle the payloads iteratively rather than recursively, so that the code that knows how to iterate over payloads is confined to a small number of places rather than being in every single payload dissector. Pull the code to dissect the generic payload header into a single routine, and do it in the code that iterates over payloads rather than in the dissectors for each payload. Clean up some other things. svn path=/trunk/; revision=3085
2001-02-13Updates from Yaniv Kaul to show the certificate encoding and typeGuy Harris1-4/+25
symbolically. svn path=/trunk/; revision=3031
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-2/+3
"{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
2001-01-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-2/+3
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
2000-12-12print message ID in isakmp headerJun-ichiro itojun Hagino1-2/+4
svn path=/trunk/; revision=2750
2000-12-12remove incorrect bound check. the check can fail on legal packet, at theJun-ichiro itojun Hagino1-1/+3
very end of the packet. may need to revisit. svn path=/trunk/; revision=2749
2000-11-19For each column, have both a buffer into which strings for that columnGuy Harris1-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
2000-10-07Patch from Jack Keane to keep the dissector from looping infintely onGuy Harris1-10/+12
malformed packets. svn path=/trunk/; revision=2480