aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-04-25Move GSM guint8 to unicode conversion functions to charsets.cJakub Zawadzki3-61/+68
charsets.c is already place with huge number of conversion tables. Also make gsm_default_alphabet gunichar2, all values fits in 2 bytes. Change-Id: Ia5ab6c176b4fec21ec76b06513c1d00794ba10ef Reviewed-on: https://code.wireshark.org/review/1328 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25Move mktime_utc() from tvbuff.c to wsutil/time_util.cJakub Zawadzki5-40/+99
Also do little cleanup in mktime_utc (one big #ifndef) Change-Id: I8f721ba76cad856cfef0a2d78e7f98686f8e4e3f Reviewed-on: https://code.wireshark.org/review/1327 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25Cleanup "excess" from trying to support sequence of "native types". Last ↵Michael Mann5-2014/+1097
installment of bug 9532. Cleaned up wireshark_gen.py so that it no longer generates duplicate fields and greatly minimized the number of useless hf_ variables generated. Change-Id: I26b2ddb5b65fcde99787cc2771348aa1b37f919f Reviewed-on: https://code.wireshark.org/review/1329 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25Convert "4 space tabs" to spaces;Bill Meier1-92/+105
Add editor modelines. Change-Id: I360a557a1e9753c4ae7ab95213aa8d44000f7dfd Reviewed-on: https://code.wireshark.org/review/1335 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-04-24Consistently use the macro PROTO_REGISTRAR_GET_NTH in proto.cAndersBroman1-9/+19
Change-Id: Iecfdd9463bec7958e8ede764bf5e09f6c29ac895 Reviewed-on: https://code.wireshark.org/review/1326 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Improve Instance ID LCAF type handlingLorand Jakab1-19/+95
Change-Id: I66b1f4746b67ff88c56c4127647c4baa2d504a93 Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu> Reviewed-on: https://code.wireshark.org/review/1325 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Fix warning: declaration of 'address' shadows a global declaration.AndersBroman1-4/+4
Change-Id: I0be594aca0e8fac3c55492f6c168b0b8c13e63e5 Reviewed-on: https://code.wireshark.org/review/1324 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Add support for Geo Coordinates LCAF typeLorand Jakab1-12/+253
Additionally, improve the way LCAF top-level tree item shows details from the information gathered later, including for AFI List LCAF types. For someone interested just in the summary from an LCAF type, this can save one or two clicks opening subrees. Change-Id: I40ea05ddf922bcb2a2a934f5e791f87133ca32cc Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu> Reviewed-on: https://code.wireshark.org/review/1323 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Adding two well known OAM related multicast address ranges.Jaap Keuter1-0/+2
Change-Id: I8fb840e7422b5fe7cd3072d8332de659598ebd3d Reviewed-on: https://code.wireshark.org/review/1313 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Fix packet-ospf.c:1181:33: warning: code will never be executed ↵Alexis La Goutte1-2/+0
[-Wunreachable-code] found by Clang with extra compiler flags Change-Id: I6a923d85cb5cc947a7e96c1845bde72059d92118 Reviewed-on: https://code.wireshark.org/review/1322 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Fix packet-netlink-sock_diag.c:653:4: warning: code will never be executed ↵Alexis La Goutte1-1/+0
[-Wunreachable-code] found by Clang with extra compiler flags Change-Id: Ie3917cee669cfe71f0967e132dd73145a55f0aad Reviewed-on: https://code.wireshark.org/review/1321 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Fix packet-ospf.c:1181:33: warning: code will never be executed ↵Alexis La Goutte1-1/+0
[-Wunreachable-code] found by Clang with extra compiler flags Change-Id: Ia08e01eee4b0829074f65d50c6ba51ef32dc64b9 Reviewed-on: https://code.wireshark.org/review/1320 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Fix warning: extra ‘;’ [-Wpedantic]Alexis La Goutte1-1/+1
Change-Id: Ib2f52d28dce0f64bf56ff0df7b4ed7d091670620 Reviewed-on: https://code.wireshark.org/review/1319 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-24Fix Warning: Found soft-deprecated APIs in epan/dissectors/packet-lisp.c: ↵Alexis La Goutte1-4/+4
tvb_length and also fix warning found by fix-encodings-args Change-Id: I20193d9f2700e8ede439dcc848390ff7672239b3 Reviewed-on: https://code.wireshark.org/review/1318 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-24Fix counting/ checking for leap years in mktime_utc()Jakub Zawadzki1-4/+9
When HAVE_TIMEGM is undefined mktime_utc() might output one day shift (+86400s) for (years <= 1967 or years >= 2100) && month >= 3 { .tm_mday = 1 .tm_mon = 2 .tm_year = 67 } mktime_utc() = -89436590 // Thu Mar 2 00:00:00 UTC 1967 gmtime() = -89596800 // Wed Mar 1 00:00:00 UTC 1967 { .tm_mday = 1 .tm_mon = 2 .tm_year = 200 } mktime_utc() = 4107628800 // Tue Mar 2 00:00:00 UTC 2100 gmtime() = 4107542400 // Mon Mar 1 00:00:00 UTC 2100 Change-Id: I1a544762fa5178c8798496d7dc30a2e767919149 Reviewed-on: https://code.wireshark.org/review/1287 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24Improve LCAF handlingLorand Jakab1-55/+130
Also, remove some more proto_tree_add_text() occurrences. Change-Id: Ie46e16308b95f190229c22d06c5235ea3464394a Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu> Reviewed-on: https://code.wireshark.org/review/1317 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24JXTA: ask for one more segment, not one more byteEvan Huus1-1/+1
Otherwise we end up doing reassembly of long messages one painful byte at a time even when all of those bytes are in the same TCP payload. This results in ridiculous memory usage. Change-Id: Ie28d5ade1fec54e6ebc225341582270651d7371c Closes-Bug: 10018 Reviewed-on: https://code.wireshark.org/review/1312 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-24Revert "Move kerberos to dirty list in CMake"Evan Huus1-1/+1
it no longer has any warnings This reverts commit 30c9f421c024266d0fd6a9d981f28b83d8b363ba. Change-Id: I5cc71f905ffa4f00ffb44ad7d03b2684c2e44e38 Reviewed-on: https://code.wireshark.org/review/1316 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-24Revert "Move kerberos to dirty dissector list"Evan Huus1-1/+1
it no longer has any warnings This reverts commit 3ff57c86adb373eedaf0295ce20d4f1c4445921a. Change-Id: I655f4cf682eb6784340799c54d2f9a6cc5321812 Reviewed-on: https://code.wireshark.org/review/1315 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Kerberos: use dissect_kerberos_ADDR_TYPE (removes an unused function warning)Pascal Quantin2-21/+9
Change-Id: I87d9c88d9db06c8f7dedd6e39152c39c13f8d32d Reviewed-on: https://code.wireshark.org/review/1314 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-23Fix typo in comment (parameterts => parameter)Alexis La Goutte2-2/+2
Change-Id: Ie1fefc27d249929f0f5108b0757768e7e23a9dbe Reviewed-on: https://code.wireshark.org/review/1310 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Add check for no kerberos keytab file.Stig Bjørlykke2-5/+19
Avoid printf warnings when loading a capture with kerberos packets when not having configured a keytab file. Change-Id: I0950daa18c42f4687d29101fac74f6f6bd6071b1 Reviewed-on: https://code.wireshark.org/review/1300 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Move kerberos to dirty list in CMakeEvan Huus1-1/+1
As pointed out by David Ameiss, I only did automake the first time round. Change-Id: Ie72ab5014d8f21d194d15af430c6c0a8a612f5f7 Reviewed-on: https://code.wireshark.org/review/1309 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Fix format warning.Evan Huus1-1/+1
Change-Id: I6627af8d90299d599db779bde0061191fc514fb3 Reviewed-on: https://code.wireshark.org/review/1307 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Move kerberos to dirty dissector listEvan Huus1-1/+1
It currently generates some unused functions. Change-Id: I59e2ffefbf66975d35f2a89c2c49c3ab61f41a84 Reviewed-on: https://code.wireshark.org/review/1306 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23MBIM: fix dissection of GSM SMS messagesPascal Quantin1-12/+17
Change-Id: I07e753e50a42513daa704e56ee5c9b399a91fec9 Reviewed-on: https://code.wireshark.org/review/1305 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-23packet-mqtt.c: Minor cleanupBill Meier1-73/+71
- Create/use an extended value string; - Use ...add_text() instead of ..._add_string() for a packet details "header" line (Removes a filter named "mqtt" (not the 'protocol' filter)); - Fix what is (IMO) a slightly misleading display of "Connect Flags"; - Remove two lines of duplicate code; - Localize some variables; - Remove some unneeded initializers; - Set tab-stops, etc in editor mode-lines to 8; - 'offset++' ==> 'offset += 1'; - Do some minor whitespace changes. Change-Id: Ia891c6893643790dbb26510f060c4fb6dfe1fe3a Reviewed-on: https://code.wireshark.org/review/1304 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-04-23Don't throw for offset at end of TVB with len -1.Evan Huus3-1/+25
g867a1827e7dc88896ee27a107eb35c4b3973d270 introduced a change to cleanup/fix handling of bounds checks for -1 length fields, but it ended up guaranteeing a throw for 0-length tvbs, which isn't good; we ought to be able to add 0-length FT_PROTOCOL items at the very least. Better names for the function than _cheat are welcome, but I want to shut up the buildbot. Change-Id: I24610f947d03dac32766e2a0ffa0ff7bcc74c3e8 Reviewed-on: https://code.wireshark.org/review/1303 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Continuation of bug 9532.Michael Mann3-648/+1162
Ie4d1edfd67a8e6f02834573f29f07baf79058534 created a several duplicate hf_ registrations. That led to the exposure of some other potential problems with generating sequences. Still not quite complete, but want to pacify the buildbots, so there is a small amount of manual editing to comment out a few duplicated hfs in packet-parlay.c. Change-Id: I0ff8a9795e213ab966db8d6333b9477bad06250b Reviewed-on: https://code.wireshark.org/review/1302 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-23Conversation/memory scope fixes for LBM dissectors. See bug 9718.David Ameiss7-164/+154
Change-Id: I58aa249d73ab44f5f56b1559b38b216cdb542ecb Reviewed-on: https://code.wireshark.org/review/1280 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Kerberos: use auto generated code for ADDR-TYPE instead of a hand made ↵Pascal Quantin3-84/+83
value_string array Change-Id: I74089fe609368fdd582aef1f2cb00a3905e0641b Reviewed-on: https://code.wireshark.org/review/1301 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Revert "Create the HTTP tree after we're assured it's HTTP. Otherwise a ↵Evan Huus1-6/+5
bogus tree is created when HTTP2 traffic is found." It causes the DTLS decryption test suite to fail for some reason, and I don't have time/energy to investigate further, so we should probably revert it until that gets resolved. This reverts commit fc5d8db74dc473610b9fc6c0c4b571d4aa65264a. Change-Id: Iac9a7592047d2e080e380a70752efa076303e442 Reviewed-on: https://code.wireshark.org/review/1297 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Add a cast to satisfy mac buildbot.Evan Huus1-1/+1
Change-Id: I625b025d3f8a57812512497c6104977ae5d10232 Reviewed-on: https://code.wireshark.org/review/1298 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Hash map implementation for wmem.Evan Huus8-2/+563
This has two expected uses: - Many current users of wmem_tree don't actually need the predecessor lookup it provides (the lookup_le function family). A hash map provides straight insertion and lookup much more efficiently than a wmem_tree when predecessor lookup isn't needed. - Many current users of glib's hash table and hash functions use untrusted data for keys, making them vulnerable to algorithmic complexity attacks. Care has been taken to make this implementation secure against such attacks, so it should be used whenever data is untrusted. In my benchmarks it is measurably slower than GHashTable, but not excessively so. Given the additional security it provides this seems like a reasonable trade-off (and it is still faster than a wmem_tree). Change-Id: I2d67a0d06029f14c153eaa42d5cfc774aefd9918 Reviewed-on: https://code.wireshark.org/review/1272 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23CaptureDialog: Fix IF type for user created pipeRoland Knall1-0/+1
- If a user adds a pipe via "Capture Options"->"Manage Interfaces" ->"Pipes" the device.if_type.type is either not filled out (in the case if no other interfaces exist), or will be set to the last set if_type of the device queried by the iteration in line 3537. - One could argue, that this is just a fixup, as still the issue remains, that the device structure will not be resetted, after the search for an already existing pipe element. Maybe a separate variable should be used for searching as it is used for adding the pipe Change-Id: Ia727bf3ce270a62d065e8c524a13768af389c346 Reviewed-on: https://code.wireshark.org/review/1296 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-23Kerberos: put PDU dissection under Kerberos tree and remove duplicate PDU namePascal Quantin2-4/+4
Change-Id: Id4824ad3a7bca1959579e5fd0a17a67c6bcda174 Reviewed-on: https://code.wireshark.org/review/1293 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-23Fix LISP dissectior regressions introduced in 1.11Lorand Jakab1-63/+73
This patch fixes dissection of some fields and restores some of the output before the dissector was updated not to use proto_tree_add_text() calls. While at it improve the consistency in the code. Change-Id: Ic30e60de1382f4325bd75e814444205f2fc5a359 Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu> Reviewed-on: https://code.wireshark.org/review/1283 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-23Bugfix generating a sequence of "native" types. Bug 9532.Michael Mann3-21/+427
Previously a sequence of "native" types (int, float, etc) generated a proto_tree_add_uint (for the loop over the sequence) and a proto_tree_add_XXX (for the "native" type), but only 1 hf variable was created for the "loop" field, so DISSECTOR_ASSERT_NOT_REACHED would be generated if "native" type != uint. Now a separate hf_ variable is generated for the "loop" and "native" type. Also update existing IDL dissectors with new generator logic. Change-Id: Ie4d1edfd67a8e6f02834573f29f07baf79058534 Reviewed-on: https://code.wireshark.org/review/1274 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Another cut-and-pasteo - UCS-4/UTF-32 should fetch 4-byte characters.Guy Harris1-2/+2
Change-Id: Iff4a659cb0d0062cc149f451e49474c8db4143cd Reviewed-on: https://code.wireshark.org/review/1292 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-23Fix generator to remove Dead Store (Dead assignement/Dead increment) warning ↵Michael Mann2-750/+758
found by Clang. (not sure why, but regeneration also "moved" some hf_ variables from previous version) Change-Id: I197eacbb3f892dbdca6e6bc354fc88240c1bfb34 Reviewed-on: https://code.wireshark.org/review/1291 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Fix up get_hfi_length():Jeff Morriss1-24/+16
Treat FT_BYTES and a few others the same as FT_PROTOCOL: allow a zero length but throw an exception if the offset is already beyond the end of the TVB (prior to this change it would assert out). This (when manually applied to master-1.10) fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9999 . While we're at it: tvb_captured_length_remaining() no longer returns -1 (see r52571) so don't expect it to. Instead just use tvb_ensure_captured_length_remaining() to throw an exception if the offset is bad. Change-Id: I686722a4fed46b86139466afcf64ff02f319c702 Reviewed-on: https://code.wireshark.org/review/1289 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Fix copy & paste error in tvb_extract_utf_16_string, tvb_extract_ucs_4_string.Jakub Zawadzki1-3/+3
Use proper p{le,n}toh16 macro depending on endianess. Change-Id: I8323e4296ec88e2cb24f54a1d8dc89328edb1957 Reviewed-on: https://code.wireshark.org/review/1285 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-22Kerberos: define HostAddress/addr-type as a FT_UINT32 fieldPascal Quantin3-39/+38
Fixes part of bug 10019 Change-Id: Id367d6c86533c840ea2ff40ef96b1c1854b96150 Reviewed-on: https://code.wireshark.org/review/1288 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-22Fix ASAN error due to invalid typePeter Wu1-7/+5
ei_array is supposed to be an array of expert_entry items. However, it was initialized of an array of expert_info_t items which is much larger. This caused an ASAN error when running `tshark -z expert` because expert_stat_packet wants to read past the stack. Fix this by correcting the type. While at it, reduce the size of expert_entry for 64-bit systems (reduces initial memory usage by 8 kilobytes) and avoid a redundant g_array_index call. Change-Id: I2e08676a5e242743ed502dd2836806604ea75cc0 Reviewed-on: https://code.wireshark.org/review/1275 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-22Minor cleanupBill Meier12-293/+220
- Remove unneeded #includes; - Move proto_reg_handoff...(() to the end of the file as per convention; - Use dissector_add_handle() instead of using dissector_add_uint(..., 0, ...); - #if 0 an unused global function (which caused a [-Wmissing-prototypes] warning); - Remove an empty proto_reg-handoff...(); - 'if (already_registered)' not required in one case. Change-Id: I74f267c2721df13eb4d52d7f19a6ded423218a39 Reviewed-on: https://code.wireshark.org/review/1277 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-04-22Fix gcc "warning: no previous prototype ... [-Wmissing-prototypes]Bill Meier1-0/+1
Change-Id: Icdbc626dca876244b603c58cba05d0847d5d6a6f Reviewed-on: https://code.wireshark.org/review/1276 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-22Cache the "tcp_tree" with p_add_proto_data. Bug 9518.Michael Mann1-2/+4
This is more reliable than doing "tree math" and corrects the intention of 5470356154bec50b607e071606f49696429a0c7c which made the incorrect assumption that tcp_dissect_pdus will be called with the tree that is passed into a protocol's main dissection function (directly from TCP). Change-Id: I6ffc2188420ab74784c7bc2c69aa79ff071c90b6 Reviewed-on: https://code.wireshark.org/review/1214 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-22Add Length for Mobility Header Link-Layer Address Option (Type 7)Alexis La Goutte1-0/+2
Change-Id: I8e5a254d25a63c18753a2d6a4da4bfc470191304 Reviewed-on: https://code.wireshark.org/review/1204 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-22Fix display of AVP: 3GPP-MS-TimeZone(23), oct is owerwritten.AndersBroman1-4/+6
Change-Id: I12caa4b612bb98459899054841317361bf4af215 Reviewed-on: https://code.wireshark.org/review/1273 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-22Manual fix of Dead Store (Dead assignement/Dead increment) warning found by ↵Alexis La Goutte1-2/+2
Clang No found how to fix the generator... Change-Id: Ic49e8904b44ff733cca0df916b6677e6fb86d9ba Reviewed-on: https://code.wireshark.org/review/1209 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>