aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
AgeCommit message (Collapse)AuthorFilesLines
2016-07-14androiddump.c: Use preprocessor directive to distinguish E_AGAIN and ↵Michael Mann1-9/+60
E_WOULDBLOCK. VS Code analysis considers them hardcoded values so the if statement is either always true or always false. Change-Id: Iad04add9391c515873e2e00d2c6cbd682fbf5b3f Reviewed-on: https://code.wireshark.org/review/16419 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: Anders Broman <a.broman58@gmail.com>
2016-07-09randpkt_core: change rand() to g_rand_int (CID 1355360).Dario Lombardo1-2/+0
Change-Id: I48560cbb6007eb16aa545a3e8e6a0e8e3b206930 Reviewed-on: https://code.wireshark.org/review/16326 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-07-04androiddump: fix leak (CID 1293387).Dario Lombardo1-0/+1
Change-Id: I27e167368575dfddf78c237723d20c8b790e5f15 Reviewed-on: https://code.wireshark.org/review/16268 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-06-30Remove Makefile.common filesJoão Valverde2-53/+25
Now that nmake build system has been removed they are not needed anymore. Change-Id: I88075f955bb4349185859c1af4be22e53de5850f Reviewed-on: https://code.wireshark.org/review/16050 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-15Remove Nmake build systemPascal Quantin1-165/+0
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-15androiddump: fix leak on --extcap-interfacesPeter Wu1-0/+2
extcap_base_register_interface duplicates the memory, so there is no need to keep it around. Change-Id: I2bac8be519b659504c512d4eb29be8f7ef6dbd59 Reviewed-on: https://code.wireshark.org/review/15919 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-06*_stdup_printf -> strdup for "single string only" formatting.Michael Mann1-2/+2
Done for performance improvements. This could probably be done in checkAPIs.pl, but this was just a quick manual check with grepping. Change-Id: I91ff102cb528bb00fa2f65489de53890e7e46f2d Reviewed-on: https://code.wireshark.org/review/15751 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: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-05-18androiddump: Add model name to user-friendly interface nameMichal Labedzki1-21/+40
This can speed up searching for interface specified to model of Android device - in most cases it is its market name. Change-Id: Ib5a3b96d9a2a8cf325f62614d395508b4ec58199 Reviewed-on: https://code.wireshark.org/review/15454 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.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-05-03ssh-base(.h) : fix no newline at end of file [-Wnewline-eof]Alexis La Goutte1-1/+1
Change-Id: I0e5898a0b0a48dd777c3ac249a23c872ff45df80 Reviewed-on: https://code.wireshark.org/review/15253 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-05-03ssh-base : fix no newline at end of file [-Wnewline-eof]Alexis La Goutte1-1/+1
Change-Id: Id9a132f9cec7df451c8fbed851ed560ba45747bb Reviewed-on: https://code.wireshark.org/review/15250 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-04-25Compile sshdump and ciscodump for WindowsPascal Quantin3-7/+10
Use libSSH 0.7.2 compiled with MinGW(32|64) and linked with zlib and gcrypt support Change-Id: I7c17d1ba3dd1890e2f83c119f5ea851834807e43 Reviewed-on: https://code.wireshark.org/review/12117 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-19androiddump 1.0.3: Return more specific error codesMichal Labedzki1-149/+199
There is 68 generic error exit codes + 45 specific error codes. Total: 113 error codes, so it is possible to have all specific exit codes in future - max is 254 (UNIX limitation). Change-Id: I798bf77b03031a701e90272d01e90b04e7e31940 Reviewed-on: https://code.wireshark.org/review/14763 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> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-18g_list_free_full() only exists since 2.28AndersBroman1-1/+3
Change-Id: I41f8b0b27390788b76919791ba03bf97d699a623 Reviewed-on: https://code.wireshark.org/review/14992 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-04-14ciscodump: bugfixDario Lombardo1-1/+1
Change-Id: I4b2012fd23524485b24064707316d4e58a838660 Reviewed-on: https://code.wireshark.org/review/14914 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-04-14extcap-base: There is no need to register interfaces everytimeMichal Labedzki1-6/+0
If extcap tool run on not existing interfaces it will fail. There is no need to register ALL interfaces while only one is needed. Extcap tool check it in other way (aka try to capture but cannot for some reasons). Change-Id: I6d60da97ce4175f19656d8c18ad8cacd25b0e99a Reviewed-on: https://code.wireshark.org/review/14765 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-04-12sshdump,ciscodump: fix local addresses discoveryPeter Wu2-4/+4
Fixes a NULL-deref when no interface addresses are discovered. Remove NULL interface from list (an empty GSList is represented by NULL while g_slist_alloc returns a list with a single NULL data). Change-Id: I2eded40bb697e051445a526d1f34d8a50ef9ccd4 Reviewed-on: https://code.wireshark.org/review/14888 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-04-06androiddump: Change insecure sprint into g_snprintfMichal Labedzki1-20/+140
This avoid potential overflows. Bug: 12093 Change-Id: Icbfe4a9f04c5f8d4e0284e4800d4775773246abf Reviewed-on: https://code.wireshark.org/review/14762 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-04-04androiddump: Fix crash on start capturingMichal Labedzki1-0/+6
Wiretap require registration right now. Do it. Change-Id: I7ec4c4a4c6d3fa6625fff970f7f39f1ab74e3ef5 Reviewed-on: https://code.wireshark.org/review/14761 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: Anders Broman <a.broman58@gmail.com>
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>