aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-12-14Make init_progfile_dir() take a function pointer [-Wpedantic]João Valverde12-13/+17
Change-Id: I45f8ea5ee6ccc5a484c60ad6e686aaf30f6b0c98 Reviewed-on: https://code.wireshark.org/review/12557 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Create some more capture dissector tables.Michael Mann28-236/+199
These were created from capture dissector functions that had switch statements determine "next" protocol/dissector. The registration decreases the need for function declarations in header files. Added new capture dissection tables for IP, IPv6, TCP and UDP as that seems like the next logical place to expand Change-Id: I1ec0cd54eecda4f400669ee5b026bf6e2b46545a Reviewed-on: https://code.wireshark.org/review/12634 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-14Note why we do -Wno-variadic-macros.Guy Harris1-0/+4
Change-Id: Id57a6985eb37d9bf5246cf0f57cc24bb0ca153b9 Reviewed-on: https://code.wireshark.org/review/12639 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Note why we do -Wno-variadic-macros.Guy Harris1-0/+4
Change-Id: Icaa5c1e927d0984bd76d9d157166de359891d381 Reviewed-on: https://code.wireshark.org/review/12638 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Lua: Fix switch-case braces.Stig Bjørlykke1-2/+2
+ fixed a comment. Change-Id: Ib1a8449054afde3b4df7ad57f0c3da07016281c2 Reviewed-on: https://code.wireshark.org/review/12635 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-14Lua: Free Pref enum valuesStig Bjørlykke1-7/+24
Free the Pref enum values in Pref__gc(). Change-Id: I4d66dbe7ee4879f3b14094135887d78cba876ea3 Reviewed-on: https://code.wireshark.org/review/12628 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Add comments to explain what we're doing with strings.Guy Harris1-9/+47
Change-Id: I043d02092464ec8cbbec08d11b29dfee248116bf Reviewed-on: https://code.wireshark.org/review/12629 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Lua: Free Pref default stringStig Bjørlykke2-5/+8
Store the Pref default string value and ensure this is freed both when registering the pref and when not. Use g_malloc0 to allocate Pref and avoid several init's. Change-Id: I5f97a15d06068d7805f02f7c7feea61f9b2030f5 Reviewed-on: https://code.wireshark.org/review/12626 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-1464-bit constants need to be wrapped in G_GUINT64_CONSTANT().Guy Harris1-2/+2
When building for ILP32 platforms, they need to be appropriately marked so the compiler treats them as 64-bit. Change-Id: I7a463f88540c446f08a9137953276ed5a735c644 Reviewed-on: https://code.wireshark.org/review/12625 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14wslua: Change macro to avoid nuisance warning [-Wredundant-decls]João Valverde1-4/+4
Change-Id: I358735b5ff69e414a227ce8c69e75ff3e04ad3b3 Reviewed-on: https://code.wireshark.org/review/12624 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14[PPP] Dissect BCP NCP Options data.AndersBroman1-28/+80
Change-Id: Ic8bf173d3fded75da93c9c956827a7e250db351d Reviewed-on: https://code.wireshark.org/review/12623 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-14Create capture dissector tables.Michael Mann61-757/+530
They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility. They are intended to be much simpler/faster than full dissection. The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API. Others may be added in the future. The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet. The current application of this is capture functions returning TRUE if they affected a "type" of packet count. Returning FALSE ends up considering the packet an "other" type. Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd Reviewed-on: https://code.wireshark.org/review/12607 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-14PPP: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-8/+8
Change-Id: I85757acbc920288f7554e29a784ddf60b0446d88 Reviewed-on: https://code.wireshark.org/review/12499 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-14GTPv2 conversation adaptationGloria Pozuelo1-2/+196
Change-Id: I55356532619d4dbeb225fc8a1684c22630bd00bd Reviewed-on: https://code.wireshark.org/review/12501 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-14Lua: Cleanup ProtoField_timeStig Bjørlykke1-15/+10
Reverted some unneeded changes from 7f074364 because it's currently only used for FT_ABSOLUTE_TIME. Also fixed some small indent issues. Change-Id: I923e35bf8ad4e991518bee973b87d4be06137463 Reviewed-on: https://code.wireshark.org/review/12539 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-14No need to free the value of a string preference in the garbage collector.Guy Harris1-3/+10
The preference has already been deregistered at that point, so the value of the preference has been freed and the pointer to it has been set to null, so it's already been freed and its pointer no longer points to it and the free from Lua will do nothing. Change-Id: I11bf74932303151483cd3699659f67d64b466759 Reviewed-on: https://code.wireshark.org/review/12606 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-13recent.c: fix declaration of ‘value_string’ shadows a global declarationPascal Quantin1-2/+2
Change-Id: I7dff01e534094c27839476f322f88c2774bd9e62 Reviewed-on: https://code.wireshark.org/review/12605 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-13ULP: prettify dissectionPascal Quantin3-284/+2514
Bug: 11039 Change-Id: I1d39367818a0039bc3100cd464baa6268c8863dd Reviewed-on: https://code.wireshark.org/review/12603 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-13Use common code for Boolean and enumerated recent values.Guy Harris1-157/+109
Cleans up the code a bit, and means the comment written out for enumerated values will contain the write list of value strings. Change-Id: Iad484e5da9349ab48e3c55e69f671b0a68b5cc6d Reviewed-on: https://code.wireshark.org/review/12604 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-13Fix crash at startupPascal Quantin1-4/+4
Change-Id: I6d21fb06ace6186991f4e481bfc7452364e6c4f7 Reviewed-on: https://code.wireshark.org/review/12602 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-13ui: Read and write correct recent timestamp formatStig Bjørlykke1-34/+40
Rewrite to use value_string to ensure correct value strings used, to add backward compatibility and to avoid global-buffer-overflow in possible future inconsistencies. This bug was introduced in 2a088c1d when adding new timestamp formats. Change-Id: I1bf4ac8427db92bfb56b4e5b90809fe08eebed20 Reviewed-on: https://code.wireshark.org/review/12584 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-13Qt: Removed applyRecentColumnWidths from recentFilesReadStig Bjørlykke4-10/+13
Adjusting column widths from recent settings is only needed when columns has changed. Don't recreate the columns when changing timestamp options or name resolution, only reset columns. Change-Id: I4c9a9f63c34542935dd282188d98b2b5b013c5f3 Reviewed-on: https://code.wireshark.org/review/12579 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-13[ppi] initialize phdr to 0Martin Kaiser1-0/+1
to make sure that it's not used without prior initialisation Bug: 11876 Change-Id: Ic19279b01dfd7ac4be596b3aeb537e31604e4147 Reviewed-on: https://code.wireshark.org/review/12573 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-13Explicitly specify the template for the mktemp command.Guy Harris1-1/+1
Not all versions of mktemp support omitting the template; in particular, the one provided by some BSD-flavored OSes don't. Change-Id: I657e002559dce165c677a473aa10bb17cc506037 Reviewed-on: https://code.wireshark.org/review/12592 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-13Standardize the capture dissector function signature.Michael Mann39-114/+91
This will make it easier to mold into (capture) dissector tables. Change-Id: Iad63f2c2869782977992a3a072adb020be4b1818 Reviewed-on: https://code.wireshark.org/review/12587 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13Create the capture dissector hash table before registering capture dissectors.Guy Harris1-1/+1
Change-Id: I76efd64b4e6803db909203a66b35e1a50708ca90 Reviewed-on: https://code.wireshark.org/review/12591 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-13[Automatic update for 2015-12-13]Gerald Combs17-1408/+1839
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I690eec9b47df9bbc770773f8c7a8e1c4b4ef5415 Reviewed-on: https://code.wireshark.org/review/12588 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-13Create a way to register "capture" dissectors.Michael Mann67-761/+358
Capture dissectors could be architected like dissection dissectors, with tables and subtables and possibly using tvbs to pass there data instead of raw byte arrays. This is a first step towards that by refactoring capture_info_packet() to work off of a "capture dissector table" Registering the capture dissection functions instead of calling them directly also clears up a bunch of dissector header files who sole purpose was providing the capture dissection function definition. Change-Id: I10e9b79e061f32d2572f009823601d4f048d37aa Reviewed-on: https://code.wireshark.org/review/12581 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13NBAP : Verify conversation proto data exists before trying to access itAnish Bhatt2-36/+42
Bug 11841 Change-Id: Ic0dea6491a68a042ddc0f2dbee19739e4568b18c Reviewed-on: https://code.wireshark.org/review/12576 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13capture_dlg (gtk): The use of 'if (A) {...} else if (A) {...}' pattern was ↵Alexis La Goutte1-3/+1
detected found by PVS Studio (V517) MIN_PACKET_SIZE is define on caputils/capture-pcap-util.h to 1 Change-Id: Ib6486608cf3e0eac898ba859cf46e9d403d493d0 Reviewed-on: https://code.wireshark.org/review/12364 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13text_import: Argument with 'nonnull' attribute passed null found by Clang ↵Alexis La Goutte1-0/+4
Analyzer Change-Id: Ie070aa0f58cca156661ddd5689596e29ad56b128 Reviewed-on: https://code.wireshark.org/review/12412 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13Qt: Start with correct seconds formatStig Bjørlykke1-1/+1
Set seconds type from recent values at startup. Change-Id: I761f4e25f41cf9eae666196fe5cd69ef9f87556f Reviewed-on: https://code.wireshark.org/review/12582 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-13The variable is assigned values twice successively found by PVS Studio (V519)Alexis La Goutte3-3/+3
Change-Id: I063b0ee2dd4ed948f889c33ab458df20079a64ff Reviewed-on: https://code.wireshark.org/review/12370 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-13telnet: add more options, including START_TLSPeter Wu1-1/+51
Basic support of the option, no decryption support. Change-Id: I2556954dcb8b0e79d0e2ac9f3101ae0c423bcd36 Ping-Bug: 11874 Reviewed-on: https://code.wireshark.org/review/12548 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-13Register TCP ports 6000-6063 for X11 dissector.Michael Mann1-8/+26
This is done through a preference that defaults the range to 6000-6063, which corresponds to its IANA registered ports. Bug: 11869 Change-Id: Ifafcf598417cd44545b0b4b9ac883cf1b63c9b23 Reviewed-on: https://code.wireshark.org/review/12572 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>
2015-12-13Start deprecating the capture info API.Gerald Combs9-23/+20
The GTK+ UI has a capture info dialog which shows a summary of captured protocols, including IPX (!), NetBIOS (!!) and VINES (!!OMG!!). It's been disabled by default since 2006 (g59aa9e40). Remove the preference in the Qt UI capture pane. It's still available via the advanced prefs. Add comments in various parts of the code noting that the capture_info routines and structs are GTK+ only. Also note that if we *do* want to add a Qt capture info dialog we'll probably want to modernize the information we show. Change-Id: I3c63f6f01b60f0767fb33602a7f0c3b537dbde51 Reviewed-on: https://code.wireshark.org/review/10991 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-12Qt: validate format string before calling strftime()Pascal Quantin3-26/+83
According to https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx an invalid string will trigger invalid parameter handler Also check the validity of each field before activating import button Bug: 11873 Change-Id: I9fc1c6e061a02354690871410f0e2cf2e0dd86a7 Reviewed-on: https://code.wireshark.org/review/12537 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-12Qt: Apply recent column widths when columns changedStig Bjørlykke1-1/+1
When changing columns in the preferences or when removing a column from the packet list header menu we need to apply recent column widths to preserve the remaining columns widths. Change-Id: Ie5c074722424b5cee31af3b6953ab1b026ba7fa5 Reviewed-on: https://code.wireshark.org/review/12575 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-12[usb] update a commentMartin Kaiser1-1/+1
the byteswap function is now called pcap_byteswap_linux_usb_pseudoheader() Change-Id: Iefceaccf4eabb96228bf8ea53fc5814f9a0ae502 Reviewed-on: https://code.wireshark.org/review/12574 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-12Remove -Wwrite-strings compiler flagJoão Valverde29-109/+81
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-12[iso14443] dissect the PCB byte and payload of I, R and S-blocksMartin Kaiser1-46/+126
Change-Id: Ia7c3e09d147d8e46acaf4476b82acdde88a400b9 Reviewed-on: https://code.wireshark.org/review/12567 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-12[iso14443] dissect some more components of the ATQBMartin Kaiser1-45/+138
and move ATQB dissection into a separate function Change-Id: Iaa6b4aaaa70bb33ddd334ed4d5c39ffc15454e4c Reviewed-on: https://code.wireshark.org/review/12566 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-12Increase ZBEE_ZCL_APPL_EVTALT_NUM_STRUCT_ETT to match ↵Michael Mann1-1/+1
ZBEE_ZCL_APPL_EVTALT_COUNT_NUM_MASK, to prevent invalid ett_ array access. Change-Id: I67e79e97e13081a77bb5202cbbc1e4f1ee872c95 Reviewed-on: https://code.wireshark.org/review/12556 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-12Range check ett_ array access.Michael Mann1-1/+1
Bug: 11830 Change-Id: I010093f0ee6f876161de0aca24ea5037616d0039 Reviewed-on: https://code.wireshark.org/review/12555 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-12Avoid breaking output string mid-sentenceJoão Valverde1-2/+2
Change-Id: I463f93e515ebe12ed30b1f08cca7d29a7bd535ae Reviewed-on: https://code.wireshark.org/review/12552 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-12[RSL] Just return rest of packet if TLV type is unknownMichael Mann1-2/+1
Bug: 11829 Change-Id: Id31ec9ee970c3a1e1fe64e3bf823f9ab78f7cd9e Reviewed-on: https://code.wireshark.org/review/12558 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-12Update USBPcap installer packagedPascal Quantin4-9/+9
NSIS script modified to: - check for KB 3033929 presence on Windows 7 / 2008R2 (as we sign drivers with a SHA2 certificate) - do not delete the installation folder if not empty Bug: 11766 Change-Id: I5c7b6378b0775bb75c1b9e58e503997176c12213 Reviewed-on: https://code.wireshark.org/review/12546 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-12tfshark: Declare 'local_wtap_read' static [-Wmissing-prototypes]João Valverde1-1/+1
Change-Id: Iea791f656415e45fe1edfdd5179dbd277d69dac9 Reviewed-on: https://code.wireshark.org/review/12554 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-12cmake: Fix platform introspection for inet_aton() [-Wredundant-decls]João Valverde1-2/+2
Change-Id: Icd6b8de0a70dd33e70bb0ad4d5c39ffc15454e8c Reviewed-on: https://code.wireshark.org/review/12559 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-12Ping on Windows isn't necessarily IPv4-only.Gerald Combs1-5/+5
The default prefix policy on modern versions of Windows prefers IPv6. This in combination with the fact that our ping target (www.wireshark.org) currently has both A and AAAA records might result in ICMPv6 traffic instead of ICMPv4. Update the capture test suite accordingly. Change-Id: I5c88f24fb9458526ffd44c5003f09247b6999ce7 Reviewed-on: https://code.wireshark.org/review/12553 Reviewed-by: Gerald Combs <gerald@wireshark.org>