aboutsummaryrefslogtreecommitdiffstats
path: root/extcap/ciscodump.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-02Use glib-compatAndersBroman1-5/+1
Change-Id: I510af18d433c4db360243dda72260e59eb84355f Reviewed-on: https://code.wireshark.org/review/20336 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-16g_slist_free_full requires glib 2.28AndersBroman1-0/+5
Change-Id: I4f9ce7f65da0349b962f6be317635c5acb2daf73 Reviewed-on: https://code.wireshark.org/review/20148 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-07extcap: fix memleak via data_file_urlPeter Wu1-1/+4
Commit v2.1.0rc0-2181-ga4e2263ac4 introduced a helppage parameter, but all callers were NULL. In a later change, callers would use the data_file_url() function, but this needs to be freed, so do that. Fixes: v2.3.0rc0-1825-ge5596b74bd ("extcap: set help page for all extcaps.") Change-Id: I967c0f8c6b50d9e78ac227575de24a81f97d376a Reviewed-on: https://code.wireshark.org/review/19570 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-12-20extcap: set help page for all extcaps.Dario Lombardo1-1/+2
They've been set to the manpage of the local filesystem. Ping-Bug: 13218 Change-Id: Iacd5d2ba7ae39ee1718b59747c245d1c07785e8f Reviewed-on: https://code.wireshark.org/review/19179 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: Michael Mann <mmann78@netscape.net> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-10-19extcap: put missed parameters into the helpMichal Labedzki1-1/+0
"--debug" and "--extcap-version" are part of extcap-base helper, do not hide them. Change-Id: I287b68dbed5344c188fede69d112ab007a6ee18b Reviewed-on: https://code.wireshark.org/review/18279 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: Roland Knall <rknall@gmail.com>
2016-09-16extcap: make extcap use the ws_strtoi/u functions.Dario Lombardo1-10/+13
Change-Id: Id75c72eba869c8a0f413ce8b5d6329ce172aed1f Reviewed-on: https://code.wireshark.org/review/17415 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
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 Lombardo1-4/+5
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 Lombardo1-1/+2
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: make extcaps use the version registered in config.Dario Lombardo1-1/+1
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-06extcap: move defines from sshdump & ciscodump to ssh-base.Dario Lombardo1-8/+0
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 Lombardo1-33/+27
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: restyle the output subsystem.Dario Lombardo1-42/+27
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-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-16Have extcap executables mirror the GTK's WinMain signature.Michael Mann1-2/+6
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-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-12sshdump,ciscodump: fix local addresses discoveryPeter Wu1-2/+2
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-03-29Another round of extcap memleak fixesPeter Wu1-15/+28
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-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 Harris1-1/+1
Change-Id: Ib89f345c072a38bc01f0513366a4bdae3bf6f08e Reviewed-on: https://code.wireshark.org/review/14615 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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 Lombardo1-0/+735
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>