aboutsummaryrefslogtreecommitdiffstats
path: root/extcap/extcap-base.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-19extcap: put missed parameters into the helpMichal Labedzki1-0/+2
"--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-10extcap-base: fix memleak from help optionsPeter Wu1-4/+5
Also correct modelines, this file really uses 4 spaces and not tabs. Change-Id: I828d0249cc7637275e5a04e9117b22e9eea6bd8c Reviewed-on: https://code.wireshark.org/review/17625 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-08-25extcap: add binary name and version to help message.Dario Lombardo1-2/+6
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/+0
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-04extcap: restyle the help function.Dario Lombardo1-0/+53
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 Lombardo1-3/+10
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-17Fix printf style parameters complaints from VS Code AnalysisMichael Mann1-2/+2
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-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-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-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-29Another round of extcap memleak fixesPeter Wu1-1/+4
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-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-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-02-29extcap: Move extcap handling to baseRoland Knall1-0/+191
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-26extcap: move windows functions into extcap-baseDario Lombardo1-0/+85
Change-Id: Iec7fed027a24992afd673b09c32470af51739ae5 Reviewed-on: https://code.wireshark.org/review/14075 Reviewed-by: Roland Knall <rknall@gmail.com>