aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
AgeCommit message (Collapse)AuthorFilesLines
2016-09-06ciscodump: fix line parsing and fix memleak.Dario Lombardo1-1/+2
Change-Id: I4aee51d7def06317a543fdc8fa05120af0e68453 Reviewed-on: https://code.wireshark.org/review/17531 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-08-26extcap: improve interface print in help.Dario Lombardo4-13/+30
Change-Id: Ife8e73b6cb1756623e937452fc042d8b31e2554f Reviewed-on: https://code.wireshark.org/review/17321 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-08-25extcap: add binary name and version to help message.Dario Lombardo6-7/+16
Change-Id: I8f8083c817065cf66fd006a1caeb309d26209509 Reviewed-on: https://code.wireshark.org/review/17305 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-08-24extcap: remove unused #define from ssh-base.Dario Lombardo1-2/+0
Change-Id: I52d26cb1e60452f8fa4d79f988fde2268486fc1c Reviewed-on: https://code.wireshark.org/review/17306 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-08-24extcap: make extcaps use the version registered in config.Dario Lombardo5-5/+4
Change-Id: I12d0d0bec06e02af0a9d0877c0f0f1d86261d752 Reviewed-on: https://code.wireshark.org/review/17296 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-08-11androiddump: use socklen_t (32bit) instead of gssize (64bit) (CID 1293384).Dario Lombardo1-3/+4
Change-Id: Ia5b7bc190eb8af509a880bb23bc0879a2dcfd39c Reviewed-on: https://code.wireshark.org/review/16972 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: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-08-09androiddump: fix bug in socket retry (CID 1293391).Dario Lombardo1-4/+4
Change-Id: I61914d208e984d202506cdc885493e841e929990 Reviewed-on: https://code.wireshark.org/review/16948 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-08-06extcap: move defines from sshdump & ciscodump to ssh-base.Dario Lombardo3-16/+8
Change-Id: I51769e2427b0119aefe57ebcc08406434ffbfead Reviewed-on: https://code.wireshark.org/review/16918 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-04extcap: restyle the help function.Dario Lombardo6-121/+165
Change-Id: Ia742dffb1fd4cd5780b8ba44f7064d1874e473da Reviewed-on: https://code.wireshark.org/review/16842 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-08-04extcap: prevent registration of wrong version.Dario Lombardo1-0/+3
This prevents the user to run extcap_base_set_util_info(extcap, "1", NULL, "0", NULL); that would result in version = 1.0. Change-Id: I67532459c852bdceb16693553e90da88a1043435 Reviewed-on: https://code.wireshark.org/review/16858 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-08-04extcap: restyle the output subsystem.Dario Lombardo6-319/+255
Change-Id: I3e0674751eb97bf30ae6d70c4e51f347d63b1697 Reviewed-on: https://code.wireshark.org/review/16849 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-07-31extcap: fix indentation in extcap-base.Dario Lombardo1-69/+69
Change-Id: Ic8e9634c9568d32fdeca8cc84a9c2f5b9757a5ae Reviewed-on: https://code.wireshark.org/review/16806 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-22sshdump: Change ws_close to closesocketRoland Knall1-1/+1
ws_close just calls _close(); that doesn't close sockets. closesocket() is the API to close a socket on Windows, and is defined as close() on UN*X, so using closesocket() will close sockets on Windows and UN*X. This way, we close the pipe socket correctly on Windows. Change-Id: I6d50e26bfabac5618c74a180cbe94d444b591bd4 Reviewed-on: https://code.wireshark.org/review/16582 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-17Fix printf style parameters complaints from VS Code AnalysisMichael Mann2-3/+3
Change-Id: I5669e2442582f899643fae4a9f86ab6d505dde07 Reviewed-on: https://code.wireshark.org/review/16505 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17ciscodump.c - Address VS Code Analysis warnings.Michael Mann1-3/+12
1. Check sscanf return value 2. Take large "packet" byte array off of stack and onto heap. Change-Id: I8ade76359f1b0739ec31d7f3b688d212f21357ba Reviewed-on: https://code.wireshark.org/review/16498 Reviewed-by: Dario Lombardo <lomato@gmail.com> 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-07-16androiddump.c - Address VS Code Analysis warnings.Michael Mann1-3/+3
1. Take large "packet" byte arrays off of stack and onto heap. 2. Cast away an shift operation that should have been identified as safe anyway. Change-Id: I159c4a7452744763f667336cf4824d5ac3472343 Reviewed-on: https://code.wireshark.org/review/16500 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-16Have extcap executables mirror the GTK's WinMain signature.Michael Mann4-8/+24
This is for appeasing VS Code Analysis. Change-Id: Ib7b3d8a3025dd764da283335051d0f77b45f6dee Reviewed-on: https://code.wireshark.org/review/16499 Reviewed-by: Michael Mann <mmann78@netscape.net>
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>