summaryrefslogtreecommitdiff
path: root/extcap/randpktdump.c
AgeCommit message (Collapse)AuthorFilesLines
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-5/+9
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-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-04extcap: restyle the help function.Dario Lombardo1-28/+25
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-25/+12
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-17Fix printf style parameters complaints from VS Code AnalysisMichael Mann1-1/+1
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-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-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-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-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 Wu1-21/+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-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 Knall1-88/+25
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-43/+0
Change-Id: Iec7fed027a24992afd673b09c32470af51739ae5 Reviewed-on: https://code.wireshark.org/review/14075 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-25Clean up modelines and indentation.Guy Harris1-4/+4
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-25extcap: move includes into extcap-base.Dario Lombardo1-37/+0
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 Lombardo1-38/+22
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-15Build the extcap programs in the extcap directory.Guy Harris1-1/+1
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-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-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-14ssh/randpktdump: Add version to extcap utilityRoland Knall1-0/+1
Add a version to each utility, displayed in the about dialog of Wireshark Change-Id: I64936072b13116b3e173c50411e9fff45d5fbf4c Reviewed-on: https://code.wireshark.org/review/13290 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-02Moved variable declaration top, to be C89 compliantThomas Wiens1-2/+4
Change-Id: I83b96f8cdabbb3ae67172659492f5992c95fbe73 Reviewed-on: https://code.wireshark.org/review/13004 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-22extcap: add randpktdump, a random packet generator.Dario Lombardo1-0/+505
This new extcap is for testing and educational purpose. It relies on rankpkt-core functions to generate random packets. Change-Id: If6890f0673545682995a2079458108edc0913b30 Reviewed-on: https://code.wireshark.org/review/11764 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>