aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isakmp.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-6/+3
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-02Eliminate proto_tree_add_text from several dissectors.Michael Mann1-36/+40
Change-Id: I6d3125f15d268edd47ef74dd655eb86cb25ee52d Reviewed-on: https://code.wireshark.org/review/5047 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-05fix a warning with gcc 4.7.2 on linuxMartin Kaiser1-1/+1
packet-isakmp.c: In function 'dissect_isakmp': packet-isakmp.c:1873:6: error: 'ivd' may be used uninitialized in this function [-Werror=maybe-uninitialized] packet-isakmp.c:1747:14: note: 'ivd' was declared here cc1: all warnings being treated as errors (not sure why the compiler complains here) Change-Id: I9b9589d3193b0dc37f2db8f6c4c6727b2a92eaaa Reviewed-on: https://code.wireshark.org/review/3444 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05Do various minor dissector changes:Bill Meier1-2151/+2151
- remove unneeded initializers; - replace tabs in files with editor mode line 'expandtabs'; - col_set_str() --> col_add_str() (in one case); - tvb_length() -- > tvb_reported_length() (in one case); - do some whitespace & indentation fixes/changes. Change-Id: Ib8ffbbcdb6e4a74c0df6021a75430ae1ef9ae089 Reviewed-on: https://code.wireshark.org/review/3435 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-29proto_tree_add_subtree[_format]Michael Mann1-3/+3
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332 Reviewed-on: https://code.wireshark.org/review/2694 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Cleanup display filters reported by checkfiltername.plMichael Mann1-7/+7
Also ensured some files have their correct names at the top so they are more easily grepped Change-Id: Ib0f5ddf14eb1616a93dee496107dc0eb09048825 Reviewed-on: https://code.wireshark.org/review/2452 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-13/+13
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17isakmp: add support for IKEv1 AES decryptionAlex Badea1-0/+15
Select an appropriate gcrypt cipher based on ISAKMP encryption ID and key length attribute. Fixes bug 10128. Bug:10128 Change-Id: Ie74fc51eb9bfe6d68340056d3ef2ef28c7677fb8 Signed-off-by: Alex Badea <abadea@ixiacom.com> Reviewed-on: https://code.wireshark.org/review/2296 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-17isakmp: allow IKEv1 decryption with non-PSK authenticationAlex Badea1-1/+0
There is a check that disables decryption for non-PSK authentication. It has been around ever since its introduction in commit acfe071e (svn r17229). As suggested in bug 7951, remove this check to allow decryption for e.g. certificates authentication. Bug: 7951 Change-Id: I5e98407d0f8dbabac2cdaf632cf0af403192872b Signed-off-by: Alex Badea <abadea@ixiacom.com> Reviewed-on: https://code.wireshark.org/review/2297 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-16isakmp: support decryption for SHA-2 hash algorithmsAlex Badea1-0/+9
Simply map ISAKMP hash IDs for sha256, sha384 and sha512 to gcrypt MDs. Fixes bug 10181. Change-Id: I9c8265bf3c5c8f8d2fd6d251cc0f267964e3be8e Signed-off-by: Alex Badea <abadea@ixiacom.com> Reviewed-on: https://code.wireshark.org/review/2250 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-28Minor: use VALS macro (as per convention); Add editor modelines; Do ↵Bill Meier1-2/+2
whitespace changes. Change-Id: I6007c1b2098d06e4a892474dd07f06a7538f94ef Reviewed-on: https://code.wireshark.org/review/1843 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-08Fix a whitespace after IKE_AUTHAlexis La Goutte1-1/+1
Change-Id: Id58da1f546ee5dff72cbc1bc012095ad0b9a9be5 Reviewed-on: https://code.wireshark.org/review/1562 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-08Remove trailing whitespaceMartin Mathieson1-2/+1
Change-Id: Idf8f9aba4e020a278e7b779de13ecdbcfcc39776 Reviewed-on: https://code.wireshark.org/review/1560 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-05-08Prettify a little, by showing ike2 flag values in flag root, and showing MID ↵Martin Mathieson1-2/+15
and flags in Info column Change-Id: I70884c933b3d82dfb7168352c5bed925f7e89e11 Reviewed-on: https://code.wireshark.org/review/1554 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-24Use correct hash algorithms in ISAKMP (IKEv2) dissectorTobias Brunner1-2/+2
Change-Id: Ia448f3cc5f5ffc8eafad73fdb0c3f3dd647342ef Reviewed-on: https://code.wireshark.org/review/335 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-22Add some simple ISAKMP heuristicsEvan Huus1-8/+31
Hopefully fixes bug 9800. Change-Id: I69e1a0e39763a6e25eb18aed6b4a6a6217e22d14 Reviewed-on: https://code.wireshark.org/review/312 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-2/+2
The majority of the fixes are for calls to uat_new(). Instead of having each caller cast its private data to (void**), we use void* in the uat_new() API itself. Inside uat_new(), we cast the void* to void**. Some dissectors use val64_string arrays, so a VALS64() macro was added for those, to avoid using VALS(), which is useful only for value_string arrays. packet-mq.c was changed because dissect_nt_sid() requires a char**, not a guint**. All other callers of dissect_nt_sid() use char*'s (and take the address of it) for their local storage. So, this was changed to follow the other practices. A confusion between gint and absolute_time_display_e in packet-time.c was cleared up. The ugliest fix is the addition of ip6_guint8_to_str(), for exactly one caller. The caller uses one type of ip6 address byte array, while ip6_to_str() expects another. This new function is in place until the various address implementations can be consolidated. Add VALS64() to the developer documentation. Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805 Reviewed-on: https://code.wireshark.org/review/48 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-3/+3
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-12-14Fix some trivial warnings.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54085
2013-10-29Mark an unused parameter as suchMartin Mathieson1-1/+1
svn path=/trunk/; revision=52971
2013-10-29Remove no-longer-used parameter.Jeff Morriss1-6/+6
svn path=/trunk/; revision=52965
2013-10-29Remove use of pinfo->private_dataMichael Mann1-55/+42
svn path=/trunk/; revision=52963
2013-10-25Add a very small hack to make the UAT update callback error string freeable, andEvan Huus1-9/+9
convert all existing UAT update callbacks to use glib memory instead of ephemeral memory for that string. UAT code paths are entirely distinct from packet dissection, so using ephemeral memory was the wrong choice, because there was no guarantees about when it would be freed. The move away from emem still needs to be propogated deeper into the UAT code itself at some point. Net effect: remove another bunch of emem calls from dissectors, where replacing with wmem would have caused assertions. svn path=/trunk/; revision=52854
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+4
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-29Convert several proto_tree_add_bytes_format calls to ↵Michael Mann1-2/+2
proto_tree_add_bytes_format_value. svn path=/trunk/; revision=52272
2013-09-22emem -> wmem conversion:Pascal Quantin1-16/+16
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-16Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-8/+8
hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either: 1. Case sensitivity differences between hf_ field name and formatted string. 2. Unnecessary whitespace between hf_ field name and colon in formatted string There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed. svn path=/trunk/; revision=52098
2013-09-15More wmem conversion (leaving uat related functions aside)Pascal Quantin1-10/+17
svn path=/trunk/; revision=52055
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-14/+14
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-08-27From Dmitry Dyachenko:Anders Broman1-4/+32
Add Vendor Ids https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9075 svn path=/trunk/; revision=51525
2013-08-08Rename variables to reflect their use and to avoid a shadowing warning.Guy Harris1-8/+8
Fix some indentation while we're at it. svn path=/trunk/; revision=51211
2013-08-08From Tommy Wu:Anders Broman1-10/+25
- Show major and Minor version. - Correct SPI Name. svn path=/trunk/; revision=51206
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-1/+1
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-07-11From Tommy Wu:Anders Broman1-10/+10
Use terminology from RFC 4303 svn path=/trunk/; revision=50511
2013-07-03expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicableMichael Mann1-3/+1
svn path=/trunk/; revision=50337
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-2/+1
svn path=/trunk/; revision=49920
2013-06-10Batch of filterable expert infos.Michael Mann1-4/+21
svn path=/trunk/; revision=49868
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-7/+6
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-03-15From beroset:Anders Broman1-21/+22
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48333
2013-03-12From beroset:Anders Broman1-2/+2
remove C++ incompatibilities from UAT_VS_DEF macro and all uses https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48259
2013-02-21include the wsutil/wsgcrypt.h instead of including gcrypt.h directlyMartin Kaiser1-1/+1
svn path=/trunk/; revision=47802
2012-12-26Fix a bunch of warnings.Guy Harris1-4/+4
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-10-22From Matthias St. Pierre:Anders Broman1-5/+12
Add full rfc4868 support to both dissectors. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7873 svn path=/trunk/; revision=45708