aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
AgeCommit message (Collapse)AuthorFilesLines
2016-04-02androiddump: Register interfaces when list interfacesMichal Labedzki1-3/+3
Trying to find interfaces every androiddump run use a lot of system resources so Wireshark can hang for a while. Back to old behaviour and register interfaces only when list them. Change-Id: Ib63cad05fb47722d3b9de24abf28a86e614417cd Reviewed-on: https://code.wireshark.org/review/14764 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-01randpkt: restyle the list generation to get rid of the const compiler warning.Dario Lombardo1-16/+17
Change-Id: Id7c62ef18f919ba8a476898bc88c02fd3b6bf5a1 Reviewed-on: https://code.wireshark.org/review/14730 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-01extcap: fix const warningsDario Lombardo1-2/+2
Change-Id: Iac94349069485207d24ac1b8c1c5c09778c12e03 Reviewed-on: https://code.wireshark.org/review/14729 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-29Fix modeline definitionsPeter Wu1-2/+2
Fix mismatching emacs and vi modelines. Change-Id: I5cab8c5b7692746a5fa731c977cef903ad19a6f6 Reviewed-on: https://code.wireshark.org/review/14688 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-03-29Another round of extcap memleak fixesPeter Wu4-66/+96
Fix a bunch of memory leaks, mainly because extcap_base_cleanup is not called on most execution paths and because memory allocated for options were not freed. Additionally, randpkt will now fail if no option is given (it previously returned 0 if --capture was missing). Logic using "goto" is introduced with the idea that a program should fail (ret = EXIT_FAILURE) unless proven otherwise. Now none of the extcap programs are leaking: for what in ssh cisco; do for arg in '' --help --extcap-interfaces --extcap-interface=$what; do extcap/${what}dump $arg; done; done ./tshark -D Change-Id: I6df1027ed0c32bd53fe87e6c54d355bc8ddd01f5 Reviewed-on: https://code.wireshark.org/review/14671 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-26Fix nmake build for new extcap and writecap binaries.Michael Mann1-3/+3
Change-Id: Ic7f370cfe5e2a3aad81c77baab066e95a249238f Reviewed-on: https://code.wireshark.org/review/14631 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-25Add ax_lib_socket_nsl.m4 macroJoão Valverde1-8/+4
Add SOCKET_LIBS and NSL_LIBS to global LIBS variables on platforms where it is required. Make configure checks for getaddrinfo/gethostname unconditional, that is handled with #ifdefs if necessary. Change-Id: Ia874038454fb9cf3bdbf8e6fd829f319e331837e Reviewed-on: https://code.wireshark.org/review/14560 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-24First convert the string to a number, then convert it to network byte order.Guy Harris1-1/+2
That should squelch some warnings from the compiler on the OS X buildbot. Change-Id: I0da16469fb48e26677c5366d6fe290db2bf52a10 Reviewed-on: https://code.wireshark.org/review/14619 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-24Put pcapio.c into a writecap library, and use it.Guy Harris3-2/+3
Change-Id: Ib89f345c072a38bc01f0513366a4bdae3bf6f08e Reviewed-on: https://code.wireshark.org/review/14615 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-24sshdump: use arg define.Dario Lombardo1-9/+1
Change-Id: I49ccfc3f616d2d6660c46d6a47d2409e25ad842a Reviewed-on: https://code.wireshark.org/review/14512 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-24ciscodump: fix OSX compilation error.Dario Lombardo1-4/+4
Change-Id: I65d0c5bc6178ef3c2a7e9d5cf8e81d985f9d555a Reviewed-on: https://code.wireshark.org/review/14613 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>
2016-03-24extcap: add ciscodump.Dario Lombardo6-7/+813
Ciscodump is a new extcap that allows packet capture on Cisco routers (IOS 12.4 and later) through SSH. Change-Id: Ic9c5be01d3bd0112116f7fc9fa10e26c1552b007 Reviewed-on: https://code.wireshark.org/review/13886 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-23Add pkg.m4 and remove aclocal-flags scriptJoão Valverde1-2/+0
Add pkg-config 0.29.1 macros to our distribution. This makes the aclocal-flags script obsolete, since we are already not using GLib autoconf macros. ACLOCAL_AMFLAGS need only be defined on the top-level Makefile.am. Change-Id: Idd868dcfeb8f279517970d0f96d9d53e3a7e4d5c Reviewed-on: https://code.wireshark.org/review/14568 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-23Move extcap EditorConfig settings to source dirJoão Valverde2-0/+10
To comply with the procedure in README.developer. Change-Id: If68da7b5ff27c3b250200cd17c80a005d51c631d Reviewed-on: https://code.wireshark.org/review/14573 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-21Remove ADNS supportJoão Valverde1-1/+1
Relevant mailing list message: https://www.wireshark.org/lists/wireshark-dev/201503/msg00007.html Change-Id: I0cff6d4d64fb52a651bcf6b28c183e43653b1cc2 Reviewed-on: https://code.wireshark.org/review/14519 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-17extcap-base: remove print of version if no interfaces present.Dario Lombardo1-4/+6
When no interfaces are available (as with androiddump when adb is not running) version is not printed anymore, for a cleaner output. Change-Id: Ia150a58ff1c04e412ff29a540f18e1fe9612f633 Reviewed-on: https://code.wireshark.org/review/14289 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-12androiddump 1.0.2: Fix a lot of usage of recv()Michal Labedzki1-73/+171
recv() can return negative value or 0 in "error cases". There is need to check it. This also solved empty interfaces list if there is unauthenticated device. Bug: 12080 Change-Id: If6cd0e0933b64e9ac9bbb66b3b8138f7177451d1 Reviewed-on: https://code.wireshark.org/review/14316 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-03-07sshdump: minor changesDario Lombardo1-12/+10
Change-Id: I07bd2a95622187c6bacb3013998f93bfa07af87c Reviewed-on: https://code.wireshark.org/review/14338 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-04Clean up modelines and indentation.Jeff Morriss1-151/+151
To quote Icf0831717de10fc615971fa1cf75af2f1ea2d03d: HT tab stops are set every 8 spaces on UN*X; UN*X tools that treat an HT character as tabbing to 4-space tab stops, or that even are configurable but *default* to 4-space tab stops (I'm looking at *you*, Xcode!) are broken. tab-width: 4, tabstop=4, and tabSize=4 are errors if you ever expect anybody to look at your file with a UN*X tool, and every text file will probably be looked at by a UN*X tool at some point, so Don't Do That. Adjust indentation to reflect the mode lines. Change-Id: Ic829541c696e0ddbc45cc109009319859c799066 Reviewed-on: https://code.wireshark.org/review/14340 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2016-03-04androiddump: change first error message into verbose_print()Dario Lombardo1-1/+1
This error occurs every run of wireshark if adb is not running. This is a bit noisy, so androiddump is made less verbose. Bug: 12185 Change-Id: Ia7d0b0aba95e90a7f602c2e340f6344d09205b32 Reviewed-on: https://code.wireshark.org/review/14288 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-03-04extcap: move ssh common functions to ssh-base.Dario Lombardo5-129/+226
Change-Id: Ic06882a4f914b4f89d936d5d942b50552ae4abb3 Reviewed-on: https://code.wireshark.org/review/14264 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-04extcap: add local_interfaces_to_list() to wsutil.Dario Lombardo2-74/+30
This new function abstracts the creation of a list of the local interfaces that will be used by future extcaps to generate specific filters. Sshdump now uses it to create a pcap filter. Change-Id: I5b75a266f81104b3c9bcb3e51de246b7cc8785ce Reviewed-on: https://code.wireshark.org/review/14092 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-02nmake: add extcap-base to sshdump.Dario Lombardo1-2/+2
Change-Id: I3544c8e3937c3918b26da71430937a7eaa47990c Reviewed-on: https://code.wireshark.org/review/14287 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-29Fix randpktdump build in Windows.Michael Mann1-4/+4
Change-Id: If749635d771443542285a74f05f37156123b2991 Reviewed-on: https://code.wireshark.org/review/14238 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-29extcap: Move extcap handling to baseRoland Knall5-319/+374
Also add the extcap-version parameter to enable parsing of version and helppage separately Change-Id: I35ba5aa992940ffbb0cd9ebea8b7c3a1e8629d74 Reviewed-on: https://code.wireshark.org/review/14094 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-26Fix nmake build for extcap apps.Michael Mann1-4/+4
Change-Id: I09c4ae9a6b05f82b0fdc2271559d715148611e18 Reviewed-on: https://code.wireshark.org/review/14177 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-26extcap: Fix noinst headerRoland Knall1-1/+1
Change-Id: I2b4c6eda29a6a8198993f577c42741729ed39538 Reviewed-on: https://code.wireshark.org/review/14160 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-26extcap: move windows functions into extcap-baseDario Lombardo6-137/+99
Change-Id: Iec7fed027a24992afd673b09c32470af51739ae5 Reviewed-on: https://code.wireshark.org/review/14075 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-26extcap: Fix make distcheckJoão Valverde1-0/+4
Change-Id: I46ba924e4231ae0e59d9cd7870cde516df8f3c28 Reviewed-on: https://code.wireshark.org/review/14152 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-25Clean up modelines and indentation.Guy Harris3-16/+16
HT tab stops are set every 8 spaces on UN*X; UN*X tools that treat an HT character as tabbing to 4-space tab stops, or that even are configurable but *default* to 4-space tab stops (I'm looking at *you*, Xcode!) are broken. tab-width: 4, tabstop=4, and tabSize=4 are errors if you ever expect anybody to look at your file with a UN*X tool, and every text file will probably be looked at by a UN*X tool at some point, so Don't Do That. Adjust indentation to reflect the mode lines. Change-Id: Icf0831717de10fc615971fa1cf75af2f1ea2d03d Reviewed-on: https://code.wireshark.org/review/14150 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-25Put extcap-base.h into the release tarball.Guy Harris1-0/+3
Change-Id: I17213b20c26acfb9e5b3de251b3f90a8e23ce0a7 Reviewed-on: https://code.wireshark.org/review/14146 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-25extcap: move includes into extcap-base.Dario Lombardo4-106/+37
Change-Id: I802cc3a3bb3989411216ed070ecc018345e0d54f Reviewed-on: https://code.wireshark.org/review/14073 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-25extcap: move common code into extcap-base filesDario Lombardo4-335/+253
Change-Id: Ia4a73c7df39426c8773fce04cac223bda3c6ef1c Reviewed-on: https://code.wireshark.org/review/14071 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-23Have "make maintainer-clean" remove extcap/Makefile.in.Guy Harris1-0/+3
(Is there some reason why automake doesn't make this happen by default?) Change-Id: I1a4fff32696012d0fd83faf86a2f40df4ea5fa80 Reviewed-on: https://code.wireshark.org/review/14085 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-21autotools: Use pkg-config autoconf macros for GLib/GTKJoão Valverde1-0/+2
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add dependency flags explicitly instead of using WS_CPPFLAGS. Some minor improvements and fixes for missing/unnecessary variables (no impact on our test builds). Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671 Reviewed-on: https://code.wireshark.org/review/14005 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-18Don't add the wiretap directory to the list of include directories.Guy Harris2-3/+1
If you include something from the wiretap directory, always precede it with wiretap/. Fix some includes of files in the top-level directory to use a path relative to the current directory, not relative to the wiretap directory. This makes it a bit clearer what's being included. Change-Id: Ib99655a13c6006cf6c3112e9d4db6f47df9aff54 Reviewed-on: https://code.wireshark.org/review/13990 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-18Fix compilation of extcap programs with NMakePascal Quantin1-5/+7
Change-Id: I80e17aeeab5bf747c6ba06168245d38d6d78efa9 Reviewed-on: https://code.wireshark.org/review/13986 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-15Build the extcap programs in the extcap directory.Guy Harris4-1/+252
That lets the version of Wireshark built with autotools find the extcap programs. Don't install the extcap programs under ${datadir} - that puts it under a share directory, and share directories are for platform-independent files, which executable images aren't (they're instruction-set dependent, hence platform-dependent). Change-Id: I992eeb984bdbe6b3476777f7114628c83df6080f Reviewed-on: https://code.wireshark.org/review/13943 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-13androiddump: fix logical ‘or’ of equal expressions [-Werror=logical-op] ↵Alexis La Goutte1-9/+9
found by gcc6 EAGAIN and EWOULDBLOCK is the same value (now) http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html Change-Id: Ia8101d05194910f306e8439507ae5bde3ccd00ce Reviewed-on: https://code.wireshark.org/review/13905 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-11randpktdump: change error messages.Dario Lombardo1-13/+13
Change-Id: Icf020d92cb2bef22afac2c74d3a719e54d36f95d Reviewed-on: https://code.wireshark.org/review/13887 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> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-02-08sshdump: fix default value for capture filter.Dario Lombardo1-1/+4
Change-Id: I21c4d6fa6726165882ed104262b1e2b22557d8cd Reviewed-on: https://code.wireshark.org/review/13522 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-05Fix some Coverity issueMichal Labedzki1-0/+4
>>> CID 1349726: Incorrect expression (COPY_PASTE_ERROR) >>> "tvb_reported_length_remaining" in "tvb_reported_length_remaining(tvb, offset)" looks like a copy-paste error. >>> CID 1349727: Incorrect expression (COPY_PASTE_ERROR) >>> "tree" in "dissector_try_uint_new(bluetooth_eir_ad_manufacturer_company_id, company_id, new_tvb, pinfo, >>> CID 1349728: (DEADCODE) >>> Execution cannot reach this expression "0" inside statement "(0 && ((__s1_len = __builti...". >>> CID 1306904: Logically dead code (DEADCODE) >>> Execution cannot reach this statement "tap_hci_summary->interface_...". Change-Id: I5f99e37e6d5fac39da7082649caa8373d06bb808 Reviewed-on: https://code.wireshark.org/review/13739 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-01androiddump: fix printf format warning.Dario Lombardo1-3/+6
Found by clang. Compiler warning: warning: format specifies type 'void *' but the argument has type 'char *' [-Wformat-pedantic] Change-Id: I7f370b06f98490cd6e363a9679a449420c8c8021 Reviewed-on: https://code.wireshark.org/review/13602 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-01-27sshdump: fix error in extcap sentence.Dario Lombardo1-2/+2
Change-Id: Ibbabd4d160661985d9a7d8caeb577845f45b847e Reviewed-on: https://code.wireshark.org/review/13561 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-22sshdump: fix leak in ssh_open_remote_connection() (CID 1349731)Dario Lombardo1-10/+12
Change-Id: I55656d4600edb800fd93532345f7ea2c7fc16f7d Reviewed-on: https://code.wireshark.org/review/13466 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-19sshdump: fix typo in extcap-config.Dario Lombardo1-1/+1
Change-Id: Ie6e60244e9ec6f80d37db9e46342c363825bc9ce Reviewed-on: https://code.wireshark.org/review/13415 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-01-18androiddump: There is no need to make full copy optargMichal Labedzki1-4/+4
Copy pointer is enough. Change-Id: I51188a8434f6e4ba1d9bf3456bd29e027dd40f35 Reviewed-on: https://code.wireshark.org/review/13393 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-18extcap: add masked to options.Dario Lombardo1-1/+1
This allows an option to be masked (like a password), by using the argument-type password. Change-Id: I2eae1be2e6672bff28ba5f749d7a3f687ebd4631 Reviewed-on: https://code.wireshark.org/review/13385 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-16fix spelling-error-in-binary found by lintianAlexis La Goutte1-4/+4
Change-Id: I2bdb40d287b2c19d40679fb73a8bae5f1debdd98 Reviewed-on: https://code.wireshark.org/review/13330 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: Dario Lombardo <lomato@gmail.com>
2016-01-15sshdump: change message to error.Dario Lombardo1-1/+1
Change-Id: I6f3df909b2cb20a869dd1b812cdf6cdf8946e83c Reviewed-on: https://code.wireshark.org/review/13313 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>