aboutsummaryrefslogtreecommitdiffstats
path: root/packet-isakmp.c
AgeCommit message (Collapse)AuthorFilesLines
2004-06-15From Yaniv Kaul: Switch from the DPD draft to RFC 3706.gerald1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11155 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-13Widen the "value" parameter to "value2str()", rather than narrowing theguy1-51/+51
values passed via that parameter. Fix indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9262 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-11prevent MSVC warning:ulfl1-3/+3
"warning C4761: Gr��enkonflikt im Argument. Konvertierung vorgenommen" -> size conflict in argument, conversion done git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9244 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-10Squelch a compiler warning.guy1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9229 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-10Check whether the packet length is less than the length of the packetguy1-1/+8
header, and give up if it is. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9227 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-02From Yaniv Kaul:guy1-2/+4
1) fix description of Check Point version 5004; 2) add description of Check Point version 5005. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9142 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-02From Arnaud Jacques: fix a typo, and handle another CheckPoint versionguy1-2/+4
number. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9138 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-04Get rid of all the UDP-encapsulated IPSec stuff.guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8882 f5534014-38df-0310-8fa8-9805f1628bb7
2003-10-09From Aki Immonen: add a numbre of vendor IDs.guy1-2/+244
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8654 f5534014-38df-0310-8fa8-9805f1628bb7
2003-10-08Dissect NAT-Discovery and NAT-Original Address payloads, and just useguy1-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...). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8644 f5534014-38df-0310-8fa8-9805f1628bb7
2003-10-04If a payload type doesn't have a dissector function, don't crash by callingguy1-2/+2
through the null dissector pointer, just dissect it as "Payload". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8610 f5534014-38df-0310-8fa8-9805f1628bb7
2003-09-15From Yaniv Kaul: add AES-XCBC-MAC to the list of authentication methods,guy1-1/+2
per RFC 3566. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8473 f5534014-38df-0310-8fa8-9805f1628bb7
2003-08-08Register the dissector by name - the "UDP Encapsulation of IPsecguy1-2/+4
Packets" dissector uses it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8155 f5534014-38df-0310-8fa8-9805f1628bb7
2003-06-24Squelch some compiler warnings.guy1-10/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7918 f5534014-38df-0310-8fa8-9805f1628bb7
2003-05-26Fix the definition of NUM_GRPDESC_TYPES, from Yaniv Kaul.gerald1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7746 f5534014-38df-0310-8fa8-9805f1628bb7
2003-05-25The last byte of "foo[N]" is "foo[N-1]", not "foo[N]".guy1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7740 f5534014-38df-0310-8fa8-9805f1628bb7
2003-05-25From Yaniv Kaul: add RFC3526 DH MODP groups.gerald1-5/+10
Fix a typo. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7739 f5534014-38df-0310-8fa8-9805f1628bb7
2003-05-24Fix instances where the return value of snprintf() was being checked for -1,gerald1-7/+10
but not for <buf_size> or greater. Discovered by Timo Sirainen. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7731 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-28From Yaniv Kaul - remove the check for the SafeNet VID, as that's notguy1-6/+1
SafeNet's VID. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7594 f5534014-38df-0310-8fa8-9805f1628bb7
2003-01-20From Yaniv Kaul:guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6947 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-47/+47
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-20From Yaniv Kaul:guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6033 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-18From Yaniv Kaul:guy1-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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6013 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hjmayer1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-20From Yaniv Kaul: update to draft-ietf-ipsec-udp-encaps-02, which removedguy1-45/+11
UDP-encapsulated AH packet support. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5512 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-01Mark unused arguments as such.guy1-14/+14
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5340 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-21Convert some "col_add_str()" calls to "col_set_str()".guy1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4592 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-21Include files from the "epan" directory and subdirectories thereof withguy1-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/"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4586 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4370 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4308 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-14Update two values for XAUTH (XAUTH-NEXT-PIN, XAUTH-ANSWER), ingram1-1/+3
accordance with http://www.vpnc.org/draft-beaulieu-ike-xauth. From Yaniv Kaul <ykaul@checkpoint.com> git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4200 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-05IPCOMP transformation and ID_IPV4_ADDR_SUBNET for ISAKMP, fromguy1-2/+24
<a.stockmeier[AT]avm.de>. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4162 f5534014-38df-0310-8fa8-9805f1628bb7
2001-10-26Make the protocol ID argument to "dissect_transform()" an "int", andguy1-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()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4086 f5534014-38df-0310-8fa8-9805f1628bb7
2001-10-25We no longer try to dissect payloads of type "None", so get rid ofguy1-9/+3
"dissect_none()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4082 f5534014-38df-0310-8fa8-9805f1628bb7
2001-10-25Loop over all the sub-payloads of a Security Association payload; make aguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4081 f5534014-38df-0310-8fa8-9805f1628bb7
2001-10-22From Yaniv Kaul - handle UDP-encapsulated IPSec NAT Keepalive packets.guy1-2/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4059 f5534014-38df-0310-8fa8-9805f1628bb7
2001-09-25If "snprintf()" can't print all the data because there's not enoughguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3953 f5534014-38df-0310-8fa8-9805f1628bb7
2001-08-31From Frank Singleton: add some missing includes of <string.h>.guy1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3889 f5534014-38df-0310-8fa8-9805f1628bb7
2001-08-30Update from Yaniv Kaul to dissect UDP-encapsulated AH and to registerguy1-17/+37
the ISAKMP dissector to be called for TCP port 500. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3883 f5534014-38df-0310-8fa8-9805f1628bb7
2001-08-29Call the ESP dissector regardless of whether "tree" is non-null or not.guy1-35/+32
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3882 f5534014-38df-0310-8fa8-9805f1628bb7
2001-08-29Support for UDP encapsulation of IPSec packet draft, from Yaniv Kaul.guy1-5/+59
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3881 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-17Move the declaration of "ipprotostr()" out of "epan/packet.h" into a newguy1-1/+2
"ipproto.h" header file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3313 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-04Add, as per Tim Newsham, code to forcibly set the payload length to 4guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3253 f5534014-38df-0310-8fa8-9805f1628bb7
2001-02-28Tvbuffify the ISAKMP dissector.guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3085 f5534014-38df-0310-8fa8-9805f1628bb7
2001-02-13Updates from Yaniv Kaul to show the certificate encoding and typeguy1-4/+25
symbolically. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3031 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",guy1-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....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2849 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Have "proto_register_protocol()" build a list of data structures forguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2810 f5534014-38df-0310-8fa8-9805f1628bb7
2000-12-12print message ID in isakmp headeritojun1-2/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2750 f5534014-38df-0310-8fa8-9805f1628bb7
2000-12-12remove incorrect bound check. the check can fail on legal packet, at theitojun1-1/+3
very end of the packet. may need to revisit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2749 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-19For each column, have both a buffer into which strings for that columnguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2670 f5534014-38df-0310-8fa8-9805f1628bb7