tcpreplay_opts.c 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439
  1. /* -*- buffer-read-only: t -*- vi: set ro:
  2. *
  3. * DO NOT EDIT THIS FILE (tcpreplay_opts.c)
  4. *
  5. * It has been AutoGen-ed
  6. * From the definitions tcpreplay_opts.def
  7. * and the template file options
  8. *
  9. * Generated from AutoOpts 41:1:16 templates.
  10. *
  11. * AutoOpts is a copyrighted work. This source file is not encumbered
  12. * by AutoOpts licensing, but is provided under the licensing terms chosen
  13. * by the tcpreplay author or copyright holder. AutoOpts is
  14. * licensed under the terms of the LGPL. The redistributable library
  15. * (``libopts'') is licensed under the terms of either the LGPL or, at the
  16. * users discretion, the BSD license. See the AutoOpts and/or libopts sources
  17. * for details.
  18. *
  19. * The tcpreplay program is copyrighted and licensed
  20. * under the following terms:
  21. *
  22. * Copyright (C) 2000-2018 Aaron Turner and Fred Klassen, all rights reserved.
  23. * This is free software. It is licensed for use, modification and
  24. * redistribution under the terms of the GNU General Public License,
  25. * version 3 or later <http://gnu.org/licenses/gpl.html>
  26. *
  27. * tcpreplay is free software: you can redistribute it and/or modify it
  28. * under the terms of the GNU General Public License as published by the
  29. * Free Software Foundation, either version 3 of the License, or
  30. * (at your option) any later version.
  31. *
  32. * tcpreplay is distributed in the hope that it will be useful, but
  33. * WITHOUT ANY WARRANTY; without even the implied warranty of
  34. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  35. * See the GNU General Public License for more details.
  36. *
  37. * You should have received a copy of the GNU General Public License along
  38. * with this program. If not, see <http://www.gnu.org/licenses/>.
  39. */
  40. #ifndef __doxygen__
  41. #define OPTION_CODE_COMPILE 1
  42. #include "tcpreplay_opts.h"
  43. #include <sys/types.h>
  44. #include <limits.h>
  45. #include <stdio.h>
  46. #include <stdlib.h>
  47. #include <errno.h>
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51. extern FILE * option_usage_fp;
  52. #define zCopyright (tcpreplay_opt_strs+0)
  53. #define zLicenseDescrip (tcpreplay_opt_strs+283)
  54. /*
  55. * global included definitions
  56. */
  57. #include "defines.h"
  58. #include "tcpreplay.h"
  59. #include "common.h"
  60. #include "config.h"
  61. #include <stdlib.h>
  62. #include <sys/types.h>
  63. #include <unistd.h>
  64. #ifndef NULL
  65. # define NULL 0
  66. #endif
  67. /**
  68. * static const strings for tcpreplay options
  69. */
  70. static char const tcpreplay_opt_strs[3882] =
  71. /* 0 */ "tcpreplay (tcpreplay)\n"
  72. "Copyright (C) 2000-2018 Aaron Turner and Fred Klassen, all rights reserved.\n"
  73. "This is free software. It is licensed for use, modification and\n"
  74. "redistribution under the terms of the GNU General Public License,\n"
  75. "version 3 or later <http://gnu.org/licenses/gpl.html>\n\0"
  76. /* 283 */ "tcpreplay is free software: you can redistribute it and/or modify it under\n"
  77. "the terms of the GNU General Public License as published by the Free\n"
  78. "Software Foundation, either version 3 of the License, or (at your option)\n"
  79. "any later version.\n\n"
  80. "tcpreplay is distributed in the hope that it will be useful, but WITHOUT\n"
  81. "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
  82. "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n"
  83. "more details.\n\n"
  84. "You should have received a copy of the GNU General Public License along\n"
  85. "with this program. If not, see <http://www.gnu.org/licenses/>.\n\0"
  86. /* 890 */ "Enable debugging output\0"
  87. /* 914 */ "DBUG\0"
  88. /* 919 */ "dbug\0"
  89. /* 924 */ "Quiet mode\0"
  90. /* 935 */ "QUIET\0"
  91. /* 941 */ "quiet\0"
  92. /* 947 */ "Select packet timing mode: select, ioport, gtod, nano\0"
  93. /* 1001 */ "TIMER\0"
  94. /* 1007 */ "timer\0"
  95. /* 1013 */ "gtod\0"
  96. /* 1018 */ "Sleep for no more then X milliseconds between packets\0"
  97. /* 1072 */ "MAXSLEEP\0"
  98. /* 1081 */ "maxsleep\0"
  99. /* 1090 */ "Print decoded packets via tcpdump to STDOUT\0"
  100. /* 1134 */ "VERBOSE\0"
  101. /* 1142 */ "verbose\0"
  102. /* 1150 */ "Arguments passed to tcpdump decoder\0"
  103. /* 1186 */ "DECODE\0"
  104. /* 1193 */ "decode\0"
  105. /* 1200 */ "Preloads packets into RAM before sending\0"
  106. /* 1241 */ "PRELOAD_PCAP\0"
  107. /* 1254 */ "preload-pcap\0"
  108. /* 1267 */ "Split traffic via a tcpprep cache file\0"
  109. /* 1306 */ "CACHEFILE\0"
  110. /* 1316 */ "cachefile\0"
  111. /* 1326 */ "Replay two files at a time from a network tap\0"
  112. /* 1372 */ "DUALFILE\0"
  113. /* 1381 */ "dualfile\0"
  114. /* 1390 */ "Client to server/RX/primary traffic output interface\0"
  115. /* 1443 */ "INTF1\0"
  116. /* 1449 */ "intf1\0"
  117. /* 1455 */ "Server to client/TX/secondary traffic output interface\0"
  118. /* 1510 */ "INTF2\0"
  119. /* 1516 */ "intf2\0"
  120. /* 1522 */ "List available network interfaces and exit\0"
  121. /* 1565 */ "LISTNICS\0"
  122. /* 1574 */ "listnics\0"
  123. /* 1583 */ "Loop through the capture file X times\0"
  124. /* 1621 */ "LOOP\0"
  125. /* 1626 */ "loop\0"
  126. /* 1631 */ "Delay between loops in milliseconds\0"
  127. /* 1667 */ "LOOPDELAY_MS\0"
  128. /* 1680 */ "loopdelay-ms\0"
  129. /* 1693 */ "Override the snaplen and use the actual packet len\0"
  130. /* 1744 */ "PKTLEN\0"
  131. /* 1751 */ "pktlen\0"
  132. /* 1758 */ "Limit the number of packets to send\0"
  133. /* 1794 */ "LIMIT\0"
  134. /* 1800 */ "limit\0"
  135. /* 1806 */ "Limit the number of seconds to send\0"
  136. /* 1842 */ "DURATION\0"
  137. /* 1851 */ "duration\0"
  138. /* 1860 */ "Modify replay speed to a given multiple\0"
  139. /* 1900 */ "MULTIPLIER\0"
  140. /* 1911 */ "multiplier\0"
  141. /* 1922 */ "Replay packets at a given packets/sec\0"
  142. /* 1960 */ "PPS\0"
  143. /* 1964 */ "pps\0"
  144. /* 1968 */ "Replay packets at a given Mbps\0"
  145. /* 1999 */ "MBPS\0"
  146. /* 2004 */ "mbps\0"
  147. /* 2009 */ "Replay packets as fast as possible\0"
  148. /* 2044 */ "TOPSPEED\0"
  149. /* 2053 */ "topspeed\0"
  150. /* 2062 */ "Replay one packet at a time for each user input\0"
  151. /* 2110 */ "ONEATATIME\0"
  152. /* 2121 */ "oneatatime\0"
  153. /* 2132 */ "Number of packets to send for each time interval\0"
  154. /* 2181 */ "PPS_MULTI\0"
  155. /* 2191 */ "pps-multi\0"
  156. /* 2201 */ "Modify IP addresses each loop iteration to generate unique flows\0"
  157. /* 2266 */ "UNIQUE_IP\0"
  158. /* 2276 */ "unique-ip\0"
  159. /* 2286 */ "Number of times to loop before assigning new unique ip\0"
  160. /* 2341 */ "UNIQUE_IP_LOOPS\0"
  161. /* 2357 */ "unique-ip-loops\0"
  162. /* 2373 */ "Write packets directly to netmap enabled network adapter\0"
  163. /* 2430 */ "NETMAP\0"
  164. /* 2437 */ "netmap\0"
  165. /* 2444 */ "Netmap startup delay\0"
  166. /* 2465 */ "NM_DELAY\0"
  167. /* 2474 */ "nm-delay\0"
  168. /* 2483 */ "Suppress printing and tracking flow count, rates and expirations\0"
  169. /* 2548 */ "NO_FLOW_STATS\0"
  170. /* 2562 */ "no-flow-stats\0"
  171. /* 2576 */ "Number of inactive seconds before a flow is considered expired\0"
  172. /* 2639 */ "FLOW_EXPIRY\0"
  173. /* 2651 */ "flow-expiry\0"
  174. /* 2663 */ "Print the PID of tcpreplay at startup\0"
  175. /* 2701 */ "PID\0"
  176. /* 2705 */ "pid\0"
  177. /* 2709 */ "Print statistics every X seconds, or every loop if '0'\0"
  178. /* 2764 */ "STATS\0"
  179. /* 2770 */ "stats\0"
  180. /* 2776 */ "Print version information\0"
  181. /* 2802 */ "VERSION\0"
  182. /* 2810 */ "version\0"
  183. /* 2818 */ "Display less usage information and exit\0"
  184. /* 2858 */ "LESS_HELP\0"
  185. /* 2868 */ "less-help\0"
  186. /* 2878 */ "display extended usage information and exit\0"
  187. /* 2922 */ "help\0"
  188. /* 2927 */ "extended usage information passed thru pager\0"
  189. /* 2972 */ "more-help\0"
  190. /* 2982 */ "save the option state to a config file\0"
  191. /* 3021 */ "save-opts\0"
  192. /* 3031 */ "load options from a config file\0"
  193. /* 3063 */ "LOAD_OPTS\0"
  194. /* 3073 */ "no-load-opts\0"
  195. /* 3086 */ "no\0"
  196. /* 3089 */ "TCPREPLAY\0"
  197. /* 3099 */ "tcpreplay (tcpreplay) - Replay network traffic stored in pcap files\n"
  198. "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... <pcap_file(s)>\n\0"
  199. /* 3240 */ "$$/\0"
  200. /* 3244 */ ".tcpreplayrc\0"
  201. /* 3257 */ "tcpreplay-users@lists.sourceforge.net\0"
  202. /* 3295 */ "tcpreplay is a tool for replaying network traffic from files saved with\n"
  203. "tcpdump or other tools which write pcap(3) files.\n\0"
  204. /* 3418 */ "The basic operation of tcpreplay is to resend all packets from the input\n"
  205. "file(s) at the speed at which they were recorded, or a specified data rate,\n"
  206. "up to as fast as the hardware is capable.\n\n"
  207. "Optionally, the traffic can be split between two interfaces, written to\n"
  208. "files, filtered and edited in various ways, providing the means to test\n"
  209. "firewalls, NIDS and other network devices.\n\n"
  210. "For more details, please see the Tcpreplay Manual at:\n"
  211. "http://tcpreplay.appneta.com\n";
  212. /**
  213. * dbug option description:
  214. */
  215. #ifdef DEBUG
  216. /** Descriptive text for the dbug option */
  217. #define DBUG_DESC (tcpreplay_opt_strs+890)
  218. /** Upper-cased name for the dbug option */
  219. #define DBUG_NAME (tcpreplay_opt_strs+914)
  220. /** Name string for the dbug option */
  221. #define DBUG_name (tcpreplay_opt_strs+919)
  222. /** The compiled in default value for the dbug option argument */
  223. #define DBUG_DFT_ARG ((char const*)0)
  224. /** Compiled in flag settings for the dbug option */
  225. #define DBUG_FLAGS (OPTST_DISABLED | OPTST_IMM \
  226. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  227. #else /* disable dbug */
  228. #define DBUG_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  229. #define DBUG_DFT_ARG NULL
  230. #define DBUG_NAME NULL
  231. #define DBUG_DESC NULL
  232. #define DBUG_name NULL
  233. #endif /* DEBUG */
  234. /**
  235. * quiet option description:
  236. */
  237. /** Descriptive text for the quiet option */
  238. #define QUIET_DESC (tcpreplay_opt_strs+924)
  239. /** Upper-cased name for the quiet option */
  240. #define QUIET_NAME (tcpreplay_opt_strs+935)
  241. /** Name string for the quiet option */
  242. #define QUIET_name (tcpreplay_opt_strs+941)
  243. /** Compiled in flag settings for the quiet option */
  244. #define QUIET_FLAGS (OPTST_DISABLED)
  245. /**
  246. * timer option description:
  247. */
  248. /** Descriptive text for the timer option */
  249. #define TIMER_DESC (tcpreplay_opt_strs+947)
  250. /** Upper-cased name for the timer option */
  251. #define TIMER_NAME (tcpreplay_opt_strs+1001)
  252. /** Name string for the timer option */
  253. #define TIMER_name (tcpreplay_opt_strs+1007)
  254. /** The compiled in default value for the timer option argument */
  255. #define TIMER_DFT_ARG (tcpreplay_opt_strs+1013)
  256. /** Compiled in flag settings for the timer option */
  257. #define TIMER_FLAGS (OPTST_DISABLED \
  258. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  259. /**
  260. * maxsleep option description:
  261. */
  262. /** Descriptive text for the maxsleep option */
  263. #define MAXSLEEP_DESC (tcpreplay_opt_strs+1018)
  264. /** Upper-cased name for the maxsleep option */
  265. #define MAXSLEEP_NAME (tcpreplay_opt_strs+1072)
  266. /** Name string for the maxsleep option */
  267. #define MAXSLEEP_name (tcpreplay_opt_strs+1081)
  268. /** The compiled in default value for the maxsleep option argument */
  269. #define MAXSLEEP_DFT_ARG ((char const*)0)
  270. /** Compiled in flag settings for the maxsleep option */
  271. #define MAXSLEEP_FLAGS (OPTST_DISABLED \
  272. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  273. /**
  274. * verbose option description:
  275. */
  276. #ifdef ENABLE_VERBOSE
  277. /** Descriptive text for the verbose option */
  278. #define VERBOSE_DESC (tcpreplay_opt_strs+1090)
  279. /** Upper-cased name for the verbose option */
  280. #define VERBOSE_NAME (tcpreplay_opt_strs+1134)
  281. /** Name string for the verbose option */
  282. #define VERBOSE_name (tcpreplay_opt_strs+1142)
  283. /** Compiled in flag settings for the verbose option */
  284. #define VERBOSE_FLAGS (OPTST_DISABLED | OPTST_IMM)
  285. #else /* disable verbose */
  286. #define VERBOSE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  287. #define VERBOSE_NAME NULL
  288. #define VERBOSE_DESC NULL
  289. #define VERBOSE_name NULL
  290. #endif /* ENABLE_VERBOSE */
  291. /**
  292. * decode option description with
  293. * "Must also have options" and "Incompatible options":
  294. */
  295. #ifdef ENABLE_VERBOSE
  296. /** Descriptive text for the decode option */
  297. #define DECODE_DESC (tcpreplay_opt_strs+1150)
  298. /** Upper-cased name for the decode option */
  299. #define DECODE_NAME (tcpreplay_opt_strs+1186)
  300. /** Name string for the decode option */
  301. #define DECODE_name (tcpreplay_opt_strs+1193)
  302. /** Other options that are required by the decode option */
  303. static int const aDecodeMustList[] = {
  304. INDEX_OPT_VERBOSE, NO_EQUIVALENT };
  305. /** Compiled in flag settings for the decode option */
  306. #define DECODE_FLAGS (OPTST_DISABLED \
  307. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  308. #else /* disable decode */
  309. #define DECODE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  310. #define aDecodeMustList NULL
  311. #define DECODE_NAME NULL
  312. #define DECODE_DESC NULL
  313. #define DECODE_name NULL
  314. #endif /* ENABLE_VERBOSE */
  315. /**
  316. * preload_pcap option description:
  317. */
  318. /** Descriptive text for the preload_pcap option */
  319. #define PRELOAD_PCAP_DESC (tcpreplay_opt_strs+1200)
  320. /** Upper-cased name for the preload_pcap option */
  321. #define PRELOAD_PCAP_NAME (tcpreplay_opt_strs+1241)
  322. /** Name string for the preload_pcap option */
  323. #define PRELOAD_PCAP_name (tcpreplay_opt_strs+1254)
  324. /** Compiled in flag settings for the preload_pcap option */
  325. #define PRELOAD_PCAP_FLAGS (OPTST_DISABLED)
  326. /**
  327. * cachefile option description with
  328. * "Must also have options" and "Incompatible options":
  329. */
  330. /** Descriptive text for the cachefile option */
  331. #define CACHEFILE_DESC (tcpreplay_opt_strs+1267)
  332. /** Upper-cased name for the cachefile option */
  333. #define CACHEFILE_NAME (tcpreplay_opt_strs+1306)
  334. /** Name string for the cachefile option */
  335. #define CACHEFILE_name (tcpreplay_opt_strs+1316)
  336. /** Other options that are required by the cachefile option */
  337. static int const aCachefileMustList[] = {
  338. INDEX_OPT_INTF2, NO_EQUIVALENT };
  339. /** Other options that appear in conjunction with the cachefile option */
  340. static int const aCachefileCantList[] = {
  341. INDEX_OPT_DUALFILE, NO_EQUIVALENT };
  342. /** Compiled in flag settings for the cachefile option */
  343. #define CACHEFILE_FLAGS (OPTST_DISABLED \
  344. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  345. /**
  346. * dualfile option description with
  347. * "Must also have options" and "Incompatible options":
  348. */
  349. /** Descriptive text for the dualfile option */
  350. #define DUALFILE_DESC (tcpreplay_opt_strs+1326)
  351. /** Upper-cased name for the dualfile option */
  352. #define DUALFILE_NAME (tcpreplay_opt_strs+1372)
  353. /** Name string for the dualfile option */
  354. #define DUALFILE_name (tcpreplay_opt_strs+1381)
  355. /** Other options that are required by the dualfile option */
  356. static int const aDualfileMustList[] = {
  357. INDEX_OPT_INTF2, NO_EQUIVALENT };
  358. /** Other options that appear in conjunction with the dualfile option */
  359. static int const aDualfileCantList[] = {
  360. INDEX_OPT_CACHEFILE, NO_EQUIVALENT };
  361. /** Compiled in flag settings for the dualfile option */
  362. #define DUALFILE_FLAGS (OPTST_DISABLED)
  363. /**
  364. * intf1 option description:
  365. */
  366. /** Descriptive text for the intf1 option */
  367. #define INTF1_DESC (tcpreplay_opt_strs+1390)
  368. /** Upper-cased name for the intf1 option */
  369. #define INTF1_NAME (tcpreplay_opt_strs+1443)
  370. /** Name string for the intf1 option */
  371. #define INTF1_name (tcpreplay_opt_strs+1449)
  372. /** Compiled in flag settings for the intf1 option */
  373. #define INTF1_FLAGS (OPTST_DISABLED | OPTST_MUST_SET \
  374. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  375. /**
  376. * intf2 option description:
  377. */
  378. /** Descriptive text for the intf2 option */
  379. #define INTF2_DESC (tcpreplay_opt_strs+1455)
  380. /** Upper-cased name for the intf2 option */
  381. #define INTF2_NAME (tcpreplay_opt_strs+1510)
  382. /** Name string for the intf2 option */
  383. #define INTF2_name (tcpreplay_opt_strs+1516)
  384. /** Compiled in flag settings for the intf2 option */
  385. #define INTF2_FLAGS (OPTST_DISABLED \
  386. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  387. /**
  388. * listnics option description:
  389. */
  390. #ifdef ENABLE_PCAP_FINDALLDEVS
  391. /** Descriptive text for the listnics option */
  392. #define LISTNICS_DESC (tcpreplay_opt_strs+1522)
  393. /** Upper-cased name for the listnics option */
  394. #define LISTNICS_NAME (tcpreplay_opt_strs+1565)
  395. /** Name string for the listnics option */
  396. #define LISTNICS_name (tcpreplay_opt_strs+1574)
  397. /** Compiled in flag settings for the listnics option */
  398. #define LISTNICS_FLAGS (OPTST_DISABLED | OPTST_IMM)
  399. #else /* disable listnics */
  400. #define LISTNICS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  401. #define LISTNICS_NAME NULL
  402. #define LISTNICS_DESC NULL
  403. #define LISTNICS_name NULL
  404. #endif /* ENABLE_PCAP_FINDALLDEVS */
  405. /**
  406. * loop option description:
  407. */
  408. /** Descriptive text for the loop option */
  409. #define LOOP_DESC (tcpreplay_opt_strs+1583)
  410. /** Upper-cased name for the loop option */
  411. #define LOOP_NAME (tcpreplay_opt_strs+1621)
  412. /** Name string for the loop option */
  413. #define LOOP_name (tcpreplay_opt_strs+1626)
  414. /** The compiled in default value for the loop option argument */
  415. #define LOOP_DFT_ARG ((char const*)1)
  416. /** Compiled in flag settings for the loop option */
  417. #define LOOP_FLAGS (OPTST_DISABLED \
  418. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  419. /**
  420. * loopdelay-ms option description with
  421. * "Must also have options" and "Incompatible options":
  422. */
  423. /** Descriptive text for the loopdelay-ms option */
  424. #define LOOPDELAY_MS_DESC (tcpreplay_opt_strs+1631)
  425. /** Upper-cased name for the loopdelay-ms option */
  426. #define LOOPDELAY_MS_NAME (tcpreplay_opt_strs+1667)
  427. /** Name string for the loopdelay-ms option */
  428. #define LOOPDELAY_MS_name (tcpreplay_opt_strs+1680)
  429. /** The compiled in default value for the loopdelay-ms option argument */
  430. #define LOOPDELAY_MS_DFT_ARG ((char const*)0)
  431. /** Other options that are required by the loopdelay-ms option */
  432. static int const aLoopdelay_MsMustList[] = {
  433. INDEX_OPT_LOOP, NO_EQUIVALENT };
  434. /** Compiled in flag settings for the loopdelay-ms option */
  435. #define LOOPDELAY_MS_FLAGS (OPTST_DISABLED \
  436. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  437. /**
  438. * pktlen option description:
  439. */
  440. /** Descriptive text for the pktlen option */
  441. #define PKTLEN_DESC (tcpreplay_opt_strs+1693)
  442. /** Upper-cased name for the pktlen option */
  443. #define PKTLEN_NAME (tcpreplay_opt_strs+1744)
  444. /** Name string for the pktlen option */
  445. #define PKTLEN_name (tcpreplay_opt_strs+1751)
  446. /** Compiled in flag settings for the pktlen option */
  447. #define PKTLEN_FLAGS (OPTST_DISABLED)
  448. /**
  449. * limit option description:
  450. */
  451. /** Descriptive text for the limit option */
  452. #define LIMIT_DESC (tcpreplay_opt_strs+1758)
  453. /** Upper-cased name for the limit option */
  454. #define LIMIT_NAME (tcpreplay_opt_strs+1794)
  455. /** Name string for the limit option */
  456. #define LIMIT_name (tcpreplay_opt_strs+1800)
  457. /** The compiled in default value for the limit option argument */
  458. #define LIMIT_DFT_ARG ((char const*)-1)
  459. /** Compiled in flag settings for the limit option */
  460. #define LIMIT_FLAGS (OPTST_DISABLED \
  461. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  462. /**
  463. * duration option description:
  464. */
  465. /** Descriptive text for the duration option */
  466. #define DURATION_DESC (tcpreplay_opt_strs+1806)
  467. /** Upper-cased name for the duration option */
  468. #define DURATION_NAME (tcpreplay_opt_strs+1842)
  469. /** Name string for the duration option */
  470. #define DURATION_name (tcpreplay_opt_strs+1851)
  471. /** The compiled in default value for the duration option argument */
  472. #define DURATION_DFT_ARG ((char const*)-1)
  473. /** Compiled in flag settings for the duration option */
  474. #define DURATION_FLAGS (OPTST_DISABLED \
  475. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  476. /**
  477. * multiplier option description with
  478. * "Must also have options" and "Incompatible options":
  479. */
  480. /** Descriptive text for the multiplier option */
  481. #define MULTIPLIER_DESC (tcpreplay_opt_strs+1860)
  482. /** Upper-cased name for the multiplier option */
  483. #define MULTIPLIER_NAME (tcpreplay_opt_strs+1900)
  484. /** Name string for the multiplier option */
  485. #define MULTIPLIER_name (tcpreplay_opt_strs+1911)
  486. /** Other options that appear in conjunction with the multiplier option */
  487. static int const aMultiplierCantList[] = {
  488. INDEX_OPT_PPS,
  489. INDEX_OPT_MBPS,
  490. INDEX_OPT_ONEATATIME,
  491. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  492. /** Compiled in flag settings for the multiplier option */
  493. #define MULTIPLIER_FLAGS (OPTST_DISABLED \
  494. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  495. /**
  496. * pps option description with
  497. * "Must also have options" and "Incompatible options":
  498. */
  499. /** Descriptive text for the pps option */
  500. #define PPS_DESC (tcpreplay_opt_strs+1922)
  501. /** Upper-cased name for the pps option */
  502. #define PPS_NAME (tcpreplay_opt_strs+1960)
  503. /** Name string for the pps option */
  504. #define PPS_name (tcpreplay_opt_strs+1964)
  505. /** Other options that appear in conjunction with the pps option */
  506. static int const aPpsCantList[] = {
  507. INDEX_OPT_MULTIPLIER,
  508. INDEX_OPT_MBPS,
  509. INDEX_OPT_ONEATATIME,
  510. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  511. /** Compiled in flag settings for the pps option */
  512. #define PPS_FLAGS (OPTST_DISABLED \
  513. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  514. /**
  515. * mbps option description with
  516. * "Must also have options" and "Incompatible options":
  517. */
  518. /** Descriptive text for the mbps option */
  519. #define MBPS_DESC (tcpreplay_opt_strs+1968)
  520. /** Upper-cased name for the mbps option */
  521. #define MBPS_NAME (tcpreplay_opt_strs+1999)
  522. /** Name string for the mbps option */
  523. #define MBPS_name (tcpreplay_opt_strs+2004)
  524. /** Other options that appear in conjunction with the mbps option */
  525. static int const aMbpsCantList[] = {
  526. INDEX_OPT_MULTIPLIER,
  527. INDEX_OPT_PPS,
  528. INDEX_OPT_ONEATATIME,
  529. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  530. /** Compiled in flag settings for the mbps option */
  531. #define MBPS_FLAGS (OPTST_DISABLED \
  532. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  533. /**
  534. * topspeed option description with
  535. * "Must also have options" and "Incompatible options":
  536. */
  537. /** Descriptive text for the topspeed option */
  538. #define TOPSPEED_DESC (tcpreplay_opt_strs+2009)
  539. /** Upper-cased name for the topspeed option */
  540. #define TOPSPEED_NAME (tcpreplay_opt_strs+2044)
  541. /** Name string for the topspeed option */
  542. #define TOPSPEED_name (tcpreplay_opt_strs+2053)
  543. /** Other options that appear in conjunction with the topspeed option */
  544. static int const aTopspeedCantList[] = {
  545. INDEX_OPT_MBPS,
  546. INDEX_OPT_MULTIPLIER,
  547. INDEX_OPT_PPS,
  548. INDEX_OPT_ONEATATIME, NO_EQUIVALENT };
  549. /** Compiled in flag settings for the topspeed option */
  550. #define TOPSPEED_FLAGS (OPTST_DISABLED)
  551. /**
  552. * oneatatime option description with
  553. * "Must also have options" and "Incompatible options":
  554. */
  555. /** Descriptive text for the oneatatime option */
  556. #define ONEATATIME_DESC (tcpreplay_opt_strs+2062)
  557. /** Upper-cased name for the oneatatime option */
  558. #define ONEATATIME_NAME (tcpreplay_opt_strs+2110)
  559. /** Name string for the oneatatime option */
  560. #define ONEATATIME_name (tcpreplay_opt_strs+2121)
  561. /** Other options that appear in conjunction with the oneatatime option */
  562. static int const aOneatatimeCantList[] = {
  563. INDEX_OPT_MBPS,
  564. INDEX_OPT_PPS,
  565. INDEX_OPT_MULTIPLIER,
  566. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  567. /** Compiled in flag settings for the oneatatime option */
  568. #define ONEATATIME_FLAGS (OPTST_DISABLED)
  569. /**
  570. * pps-multi option description with
  571. * "Must also have options" and "Incompatible options":
  572. */
  573. /** Descriptive text for the pps-multi option */
  574. #define PPS_MULTI_DESC (tcpreplay_opt_strs+2132)
  575. /** Upper-cased name for the pps-multi option */
  576. #define PPS_MULTI_NAME (tcpreplay_opt_strs+2181)
  577. /** Name string for the pps-multi option */
  578. #define PPS_MULTI_name (tcpreplay_opt_strs+2191)
  579. /** The compiled in default value for the pps-multi option argument */
  580. #define PPS_MULTI_DFT_ARG ((char const*)1)
  581. /** Other options that are required by the pps-multi option */
  582. static int const aPps_MultiMustList[] = {
  583. INDEX_OPT_PPS, NO_EQUIVALENT };
  584. /** Compiled in flag settings for the pps-multi option */
  585. #define PPS_MULTI_FLAGS (OPTST_DISABLED \
  586. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  587. /**
  588. * unique-ip option description with
  589. * "Must also have options" and "Incompatible options":
  590. */
  591. /** Descriptive text for the unique-ip option */
  592. #define UNIQUE_IP_DESC (tcpreplay_opt_strs+2201)
  593. /** Upper-cased name for the unique-ip option */
  594. #define UNIQUE_IP_NAME (tcpreplay_opt_strs+2266)
  595. /** Name string for the unique-ip option */
  596. #define UNIQUE_IP_name (tcpreplay_opt_strs+2276)
  597. /** Other options that are required by the unique-ip option */
  598. static int const aUnique_IpMustList[] = {
  599. INDEX_OPT_LOOP, NO_EQUIVALENT };
  600. /** Compiled in flag settings for the unique-ip option */
  601. #define UNIQUE_IP_FLAGS (OPTST_DISABLED)
  602. /**
  603. * unique-ip-loops option description with
  604. * "Must also have options" and "Incompatible options":
  605. */
  606. /** Descriptive text for the unique-ip-loops option */
  607. #define UNIQUE_IP_LOOPS_DESC (tcpreplay_opt_strs+2286)
  608. /** Upper-cased name for the unique-ip-loops option */
  609. #define UNIQUE_IP_LOOPS_NAME (tcpreplay_opt_strs+2341)
  610. /** Name string for the unique-ip-loops option */
  611. #define UNIQUE_IP_LOOPS_name (tcpreplay_opt_strs+2357)
  612. /** Other options that are required by the unique-ip-loops option */
  613. static int const aUnique_Ip_LoopsMustList[] = {
  614. INDEX_OPT_UNIQUE_IP, NO_EQUIVALENT };
  615. /** Compiled in flag settings for the unique-ip-loops option */
  616. #define UNIQUE_IP_LOOPS_FLAGS (OPTST_DISABLED \
  617. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  618. /**
  619. * netmap option description:
  620. */
  621. #ifdef HAVE_NETMAP
  622. /** Descriptive text for the netmap option */
  623. #define NETMAP_DESC (tcpreplay_opt_strs+2373)
  624. /** Upper-cased name for the netmap option */
  625. #define NETMAP_NAME (tcpreplay_opt_strs+2430)
  626. /** Name string for the netmap option */
  627. #define NETMAP_name (tcpreplay_opt_strs+2437)
  628. /** Compiled in flag settings for the netmap option */
  629. #define NETMAP_FLAGS (OPTST_DISABLED)
  630. #else /* disable netmap */
  631. #define NETMAP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  632. #define NETMAP_NAME NULL
  633. #define NETMAP_DESC NULL
  634. #define NETMAP_name NULL
  635. #endif /* HAVE_NETMAP */
  636. /**
  637. * nm-delay option description:
  638. */
  639. #ifdef HAVE_NETMAP
  640. /** Descriptive text for the nm-delay option */
  641. #define NM_DELAY_DESC (tcpreplay_opt_strs+2444)
  642. /** Upper-cased name for the nm-delay option */
  643. #define NM_DELAY_NAME (tcpreplay_opt_strs+2465)
  644. /** Name string for the nm-delay option */
  645. #define NM_DELAY_name (tcpreplay_opt_strs+2474)
  646. /** The compiled in default value for the nm-delay option argument */
  647. #define NM_DELAY_DFT_ARG ((char const*)10)
  648. /** Compiled in flag settings for the nm-delay option */
  649. #define NM_DELAY_FLAGS (OPTST_DISABLED \
  650. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  651. #else /* disable nm-delay */
  652. #define NM_DELAY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  653. #define NM_DELAY_DFT_ARG NULL
  654. #define NM_DELAY_NAME NULL
  655. #define NM_DELAY_DESC NULL
  656. #define NM_DELAY_name NULL
  657. #endif /* HAVE_NETMAP */
  658. /**
  659. * no-flow-stats option description:
  660. */
  661. /** Descriptive text for the no-flow-stats option */
  662. #define NO_FLOW_STATS_DESC (tcpreplay_opt_strs+2483)
  663. /** Upper-cased name for the no-flow-stats option */
  664. #define NO_FLOW_STATS_NAME (tcpreplay_opt_strs+2548)
  665. /** Name string for the no-flow-stats option */
  666. #define NO_FLOW_STATS_name (tcpreplay_opt_strs+2562)
  667. /** Compiled in flag settings for the no-flow-stats option */
  668. #define NO_FLOW_STATS_FLAGS (OPTST_DISABLED)
  669. /**
  670. * flow-expiry option description with
  671. * "Must also have options" and "Incompatible options":
  672. */
  673. /** Descriptive text for the flow-expiry option */
  674. #define FLOW_EXPIRY_DESC (tcpreplay_opt_strs+2576)
  675. /** Upper-cased name for the flow-expiry option */
  676. #define FLOW_EXPIRY_NAME (tcpreplay_opt_strs+2639)
  677. /** Name string for the flow-expiry option */
  678. #define FLOW_EXPIRY_name (tcpreplay_opt_strs+2651)
  679. /** The compiled in default value for the flow-expiry option argument */
  680. #define FLOW_EXPIRY_DFT_ARG ((char const*)0)
  681. /** Other options that appear in conjunction with the flow-expiry option */
  682. static int const aFlow_ExpiryCantList[] = {
  683. INDEX_OPT_NO_FLOW_STATS, NO_EQUIVALENT };
  684. /** Compiled in flag settings for the flow-expiry option */
  685. #define FLOW_EXPIRY_FLAGS (OPTST_DISABLED \
  686. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  687. /**
  688. * pid option description:
  689. */
  690. /** Descriptive text for the pid option */
  691. #define PID_DESC (tcpreplay_opt_strs+2663)
  692. /** Upper-cased name for the pid option */
  693. #define PID_NAME (tcpreplay_opt_strs+2701)
  694. /** Name string for the pid option */
  695. #define PID_name (tcpreplay_opt_strs+2705)
  696. /** Compiled in flag settings for the pid option */
  697. #define PID_FLAGS (OPTST_DISABLED)
  698. /**
  699. * stats option description:
  700. */
  701. /** Descriptive text for the stats option */
  702. #define STATS_DESC (tcpreplay_opt_strs+2709)
  703. /** Upper-cased name for the stats option */
  704. #define STATS_NAME (tcpreplay_opt_strs+2764)
  705. /** Name string for the stats option */
  706. #define STATS_name (tcpreplay_opt_strs+2770)
  707. /** Compiled in flag settings for the stats option */
  708. #define STATS_FLAGS (OPTST_DISABLED \
  709. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  710. /**
  711. * version option description:
  712. */
  713. /** Descriptive text for the version option */
  714. #define VERSION_DESC (tcpreplay_opt_strs+2776)
  715. /** Upper-cased name for the version option */
  716. #define VERSION_NAME (tcpreplay_opt_strs+2802)
  717. /** Name string for the version option */
  718. #define VERSION_name (tcpreplay_opt_strs+2810)
  719. /** Compiled in flag settings for the version option */
  720. #define VERSION_FLAGS (OPTST_DISABLED)
  721. /**
  722. * less-help option description:
  723. */
  724. /** Descriptive text for the less-help option */
  725. #define LESS_HELP_DESC (tcpreplay_opt_strs+2818)
  726. /** Upper-cased name for the less-help option */
  727. #define LESS_HELP_NAME (tcpreplay_opt_strs+2858)
  728. /** Name string for the less-help option */
  729. #define LESS_HELP_name (tcpreplay_opt_strs+2868)
  730. /** Compiled in flag settings for the less-help option */
  731. #define LESS_HELP_FLAGS (OPTST_DISABLED | OPTST_IMM)
  732. /*
  733. * Help/More_Help option descriptions:
  734. */
  735. #define HELP_DESC (tcpreplay_opt_strs+2878)
  736. #define HELP_name (tcpreplay_opt_strs+2922)
  737. #ifdef HAVE_WORKING_FORK
  738. #define MORE_HELP_DESC (tcpreplay_opt_strs+2927)
  739. #define MORE_HELP_name (tcpreplay_opt_strs+2972)
  740. #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
  741. #else
  742. #define MORE_HELP_DESC HELP_DESC
  743. #define MORE_HELP_name HELP_name
  744. #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  745. #endif
  746. #define SAVE_OPTS_DESC (tcpreplay_opt_strs+2982)
  747. #define SAVE_OPTS_name (tcpreplay_opt_strs+3021)
  748. #define LOAD_OPTS_DESC (tcpreplay_opt_strs+3031)
  749. #define LOAD_OPTS_NAME (tcpreplay_opt_strs+3063)
  750. #define NO_LOAD_OPTS_name (tcpreplay_opt_strs+3073)
  751. #define LOAD_OPTS_pfx (tcpreplay_opt_strs+3086)
  752. #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
  753. /**
  754. * Declare option callback procedures
  755. */
  756. #ifdef DEBUG
  757. static tOptProc doOptDbug;
  758. #else /* not DEBUG */
  759. # define doOptDbug NULL
  760. #endif /* def/not DEBUG */
  761. #ifdef ENABLE_PCAP_FINDALLDEVS
  762. static tOptProc doOptListnics;
  763. #else /* not ENABLE_PCAP_FINDALLDEVS */
  764. # define doOptListnics NULL
  765. #endif /* def/not ENABLE_PCAP_FINDALLDEVS */
  766. extern tOptProc
  767. optionBooleanVal, optionNestedVal, optionNumericVal,
  768. optionPagedUsage, optionPrintVersion, optionResetOpt,
  769. optionStackArg, optionTimeDate, optionTimeVal,
  770. optionUnstackArg, optionVendorOption;
  771. static tOptProc
  772. doOptDuration, doOptFlow_Expiry, doOptLess_Help,
  773. doOptLimit, doOptLoop, doOptLoopdelay_Ms,
  774. doOptPid, doOptPps_Multi, doOptStats,
  775. doOptVersion, doUsageOpt;
  776. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  777. /**
  778. * Define the tcpreplay Option Descriptions.
  779. * This is an array of OPTION_CT entries, one for each
  780. * option that the tcpreplay program responds to.
  781. */
  782. static tOptDesc optDesc[OPTION_CT] = {
  783. { /* entry idx, value */ 0, VALUE_OPT_DBUG,
  784. /* equiv idx, value */ 0, VALUE_OPT_DBUG,
  785. /* equivalenced to */ NO_EQUIVALENT,
  786. /* min, max, act ct */ 0, 1, 0,
  787. /* opt state flags */ DBUG_FLAGS, 0,
  788. /* last opt argumnt */ { DBUG_DFT_ARG },
  789. /* arg list/cookie */ NULL,
  790. /* must/cannot opts */ NULL, NULL,
  791. /* option proc */ doOptDbug,
  792. /* desc, NAME, name */ DBUG_DESC, DBUG_NAME, DBUG_name,
  793. /* disablement strs */ NULL, NULL },
  794. { /* entry idx, value */ 1, VALUE_OPT_QUIET,
  795. /* equiv idx, value */ 1, VALUE_OPT_QUIET,
  796. /* equivalenced to */ NO_EQUIVALENT,
  797. /* min, max, act ct */ 0, 1, 0,
  798. /* opt state flags */ QUIET_FLAGS, 0,
  799. /* last opt argumnt */ { NULL }, /* --quiet */
  800. /* arg list/cookie */ NULL,
  801. /* must/cannot opts */ NULL, NULL,
  802. /* option proc */ NULL,
  803. /* desc, NAME, name */ QUIET_DESC, QUIET_NAME, QUIET_name,
  804. /* disablement strs */ NULL, NULL },
  805. { /* entry idx, value */ 2, VALUE_OPT_TIMER,
  806. /* equiv idx, value */ 2, VALUE_OPT_TIMER,
  807. /* equivalenced to */ NO_EQUIVALENT,
  808. /* min, max, act ct */ 0, 1, 0,
  809. /* opt state flags */ TIMER_FLAGS, 0,
  810. /* last opt argumnt */ { TIMER_DFT_ARG },
  811. /* arg list/cookie */ NULL,
  812. /* must/cannot opts */ NULL, NULL,
  813. /* option proc */ NULL,
  814. /* desc, NAME, name */ TIMER_DESC, TIMER_NAME, TIMER_name,
  815. /* disablement strs */ NULL, NULL },
  816. { /* entry idx, value */ 3, VALUE_OPT_MAXSLEEP,
  817. /* equiv idx, value */ 3, VALUE_OPT_MAXSLEEP,
  818. /* equivalenced to */ NO_EQUIVALENT,
  819. /* min, max, act ct */ 0, 1, 0,
  820. /* opt state flags */ MAXSLEEP_FLAGS, 0,
  821. /* last opt argumnt */ { MAXSLEEP_DFT_ARG },
  822. /* arg list/cookie */ NULL,
  823. /* must/cannot opts */ NULL, NULL,
  824. /* option proc */ optionNumericVal,
  825. /* desc, NAME, name */ MAXSLEEP_DESC, MAXSLEEP_NAME, MAXSLEEP_name,
  826. /* disablement strs */ NULL, NULL },
  827. { /* entry idx, value */ 4, VALUE_OPT_VERBOSE,
  828. /* equiv idx, value */ 4, VALUE_OPT_VERBOSE,
  829. /* equivalenced to */ NO_EQUIVALENT,
  830. /* min, max, act ct */ 0, 1, 0,
  831. /* opt state flags */ VERBOSE_FLAGS, 0,
  832. /* last opt argumnt */ { NULL }, /* --verbose */
  833. /* arg list/cookie */ NULL,
  834. /* must/cannot opts */ NULL, NULL,
  835. /* option proc */ NULL,
  836. /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
  837. /* disablement strs */ NULL, NULL },
  838. { /* entry idx, value */ 5, VALUE_OPT_DECODE,
  839. /* equiv idx, value */ 5, VALUE_OPT_DECODE,
  840. /* equivalenced to */ NO_EQUIVALENT,
  841. /* min, max, act ct */ 0, 1, 0,
  842. /* opt state flags */ DECODE_FLAGS, 0,
  843. /* last opt argumnt */ { NULL }, /* --decode */
  844. /* arg list/cookie */ NULL,
  845. /* must/cannot opts */ aDecodeMustList, NULL,
  846. /* option proc */ NULL,
  847. /* desc, NAME, name */ DECODE_DESC, DECODE_NAME, DECODE_name,
  848. /* disablement strs */ NULL, NULL },
  849. { /* entry idx, value */ 6, VALUE_OPT_PRELOAD_PCAP,
  850. /* equiv idx, value */ 6, VALUE_OPT_PRELOAD_PCAP,
  851. /* equivalenced to */ NO_EQUIVALENT,
  852. /* min, max, act ct */ 0, 1, 0,
  853. /* opt state flags */ PRELOAD_PCAP_FLAGS, 0,
  854. /* last opt argumnt */ { NULL }, /* --preload_pcap */
  855. /* arg list/cookie */ NULL,
  856. /* must/cannot opts */ NULL, NULL,
  857. /* option proc */ NULL,
  858. /* desc, NAME, name */ PRELOAD_PCAP_DESC, PRELOAD_PCAP_NAME, PRELOAD_PCAP_name,
  859. /* disablement strs */ NULL, NULL },
  860. { /* entry idx, value */ 7, VALUE_OPT_CACHEFILE,
  861. /* equiv idx, value */ 7, VALUE_OPT_CACHEFILE,
  862. /* equivalenced to */ NO_EQUIVALENT,
  863. /* min, max, act ct */ 0, 1, 0,
  864. /* opt state flags */ CACHEFILE_FLAGS, 0,
  865. /* last opt argumnt */ { NULL }, /* --cachefile */
  866. /* arg list/cookie */ NULL,
  867. /* must/cannot opts */ aCachefileMustList, aCachefileCantList,
  868. /* option proc */ NULL,
  869. /* desc, NAME, name */ CACHEFILE_DESC, CACHEFILE_NAME, CACHEFILE_name,
  870. /* disablement strs */ NULL, NULL },
  871. { /* entry idx, value */ 8, VALUE_OPT_DUALFILE,
  872. /* equiv idx, value */ 8, VALUE_OPT_DUALFILE,
  873. /* equivalenced to */ NO_EQUIVALENT,
  874. /* min, max, act ct */ 0, 1, 0,
  875. /* opt state flags */ DUALFILE_FLAGS, 0,
  876. /* last opt argumnt */ { NULL }, /* --dualfile */
  877. /* arg list/cookie */ NULL,
  878. /* must/cannot opts */ aDualfileMustList, aDualfileCantList,
  879. /* option proc */ NULL,
  880. /* desc, NAME, name */ DUALFILE_DESC, DUALFILE_NAME, DUALFILE_name,
  881. /* disablement strs */ NULL, NULL },
  882. { /* entry idx, value */ 9, VALUE_OPT_INTF1,
  883. /* equiv idx, value */ 9, VALUE_OPT_INTF1,
  884. /* equivalenced to */ NO_EQUIVALENT,
  885. /* min, max, act ct */ 1, 1, 0,
  886. /* opt state flags */ INTF1_FLAGS, 0,
  887. /* last opt argumnt */ { NULL }, /* --intf1 */
  888. /* arg list/cookie */ NULL,
  889. /* must/cannot opts */ NULL, NULL,
  890. /* option proc */ NULL,
  891. /* desc, NAME, name */ INTF1_DESC, INTF1_NAME, INTF1_name,
  892. /* disablement strs */ NULL, NULL },
  893. { /* entry idx, value */ 10, VALUE_OPT_INTF2,
  894. /* equiv idx, value */ 10, VALUE_OPT_INTF2,
  895. /* equivalenced to */ NO_EQUIVALENT,
  896. /* min, max, act ct */ 0, 1, 0,
  897. /* opt state flags */ INTF2_FLAGS, 0,
  898. /* last opt argumnt */ { NULL }, /* --intf2 */
  899. /* arg list/cookie */ NULL,
  900. /* must/cannot opts */ NULL, NULL,
  901. /* option proc */ NULL,
  902. /* desc, NAME, name */ INTF2_DESC, INTF2_NAME, INTF2_name,
  903. /* disablement strs */ NULL, NULL },
  904. { /* entry idx, value */ 11, VALUE_OPT_LISTNICS,
  905. /* equiv idx, value */ 11, VALUE_OPT_LISTNICS,
  906. /* equivalenced to */ NO_EQUIVALENT,
  907. /* min, max, act ct */ 0, 1, 0,
  908. /* opt state flags */ LISTNICS_FLAGS, 0,
  909. /* last opt argumnt */ { NULL }, /* --listnics */
  910. /* arg list/cookie */ NULL,
  911. /* must/cannot opts */ NULL, NULL,
  912. /* option proc */ doOptListnics,
  913. /* desc, NAME, name */ LISTNICS_DESC, LISTNICS_NAME, LISTNICS_name,
  914. /* disablement strs */ NULL, NULL },
  915. { /* entry idx, value */ 12, VALUE_OPT_LOOP,
  916. /* equiv idx, value */ 12, VALUE_OPT_LOOP,
  917. /* equivalenced to */ NO_EQUIVALENT,
  918. /* min, max, act ct */ 0, 1, 0,
  919. /* opt state flags */ LOOP_FLAGS, 0,
  920. /* last opt argumnt */ { LOOP_DFT_ARG },
  921. /* arg list/cookie */ NULL,
  922. /* must/cannot opts */ NULL, NULL,
  923. /* option proc */ doOptLoop,
  924. /* desc, NAME, name */ LOOP_DESC, LOOP_NAME, LOOP_name,
  925. /* disablement strs */ NULL, NULL },
  926. { /* entry idx, value */ 13, VALUE_OPT_LOOPDELAY_MS,
  927. /* equiv idx, value */ 13, VALUE_OPT_LOOPDELAY_MS,
  928. /* equivalenced to */ NO_EQUIVALENT,
  929. /* min, max, act ct */ 0, 1, 0,
  930. /* opt state flags */ LOOPDELAY_MS_FLAGS, 0,
  931. /* last opt argumnt */ { LOOPDELAY_MS_DFT_ARG },
  932. /* arg list/cookie */ NULL,
  933. /* must/cannot opts */ aLoopdelay_MsMustList, NULL,
  934. /* option proc */ doOptLoopdelay_Ms,
  935. /* desc, NAME, name */ LOOPDELAY_MS_DESC, LOOPDELAY_MS_NAME, LOOPDELAY_MS_name,
  936. /* disablement strs */ NULL, NULL },
  937. { /* entry idx, value */ 14, VALUE_OPT_PKTLEN,
  938. /* equiv idx, value */ 14, VALUE_OPT_PKTLEN,
  939. /* equivalenced to */ NO_EQUIVALENT,
  940. /* min, max, act ct */ 0, 1, 0,
  941. /* opt state flags */ PKTLEN_FLAGS, 0,
  942. /* last opt argumnt */ { NULL }, /* --pktlen */
  943. /* arg list/cookie */ NULL,
  944. /* must/cannot opts */ NULL, NULL,
  945. /* option proc */ NULL,
  946. /* desc, NAME, name */ PKTLEN_DESC, PKTLEN_NAME, PKTLEN_name,
  947. /* disablement strs */ NULL, NULL },
  948. { /* entry idx, value */ 15, VALUE_OPT_LIMIT,
  949. /* equiv idx, value */ 15, VALUE_OPT_LIMIT,
  950. /* equivalenced to */ NO_EQUIVALENT,
  951. /* min, max, act ct */ 0, 1, 0,
  952. /* opt state flags */ LIMIT_FLAGS, 0,
  953. /* last opt argumnt */ { LIMIT_DFT_ARG },
  954. /* arg list/cookie */ NULL,
  955. /* must/cannot opts */ NULL, NULL,
  956. /* option proc */ doOptLimit,
  957. /* desc, NAME, name */ LIMIT_DESC, LIMIT_NAME, LIMIT_name,
  958. /* disablement strs */ NULL, NULL },
  959. { /* entry idx, value */ 16, VALUE_OPT_DURATION,
  960. /* equiv idx, value */ 16, VALUE_OPT_DURATION,
  961. /* equivalenced to */ NO_EQUIVALENT,
  962. /* min, max, act ct */ 0, 1, 0,
  963. /* opt state flags */ DURATION_FLAGS, 0,
  964. /* last opt argumnt */ { DURATION_DFT_ARG },
  965. /* arg list/cookie */ NULL,
  966. /* must/cannot opts */ NULL, NULL,
  967. /* option proc */ doOptDuration,
  968. /* desc, NAME, name */ DURATION_DESC, DURATION_NAME, DURATION_name,
  969. /* disablement strs */ NULL, NULL },
  970. { /* entry idx, value */ 17, VALUE_OPT_MULTIPLIER,
  971. /* equiv idx, value */ 17, VALUE_OPT_MULTIPLIER,
  972. /* equivalenced to */ NO_EQUIVALENT,
  973. /* min, max, act ct */ 0, 1, 0,
  974. /* opt state flags */ MULTIPLIER_FLAGS, 0,
  975. /* last opt argumnt */ { NULL }, /* --multiplier */
  976. /* arg list/cookie */ NULL,
  977. /* must/cannot opts */ NULL, aMultiplierCantList,
  978. /* option proc */ NULL,
  979. /* desc, NAME, name */ MULTIPLIER_DESC, MULTIPLIER_NAME, MULTIPLIER_name,
  980. /* disablement strs */ NULL, NULL },
  981. { /* entry idx, value */ 18, VALUE_OPT_PPS,
  982. /* equiv idx, value */ 18, VALUE_OPT_PPS,
  983. /* equivalenced to */ NO_EQUIVALENT,
  984. /* min, max, act ct */ 0, 1, 0,
  985. /* opt state flags */ PPS_FLAGS, 0,
  986. /* last opt argumnt */ { NULL }, /* --pps */
  987. /* arg list/cookie */ NULL,
  988. /* must/cannot opts */ NULL, aPpsCantList,
  989. /* option proc */ NULL,
  990. /* desc, NAME, name */ PPS_DESC, PPS_NAME, PPS_name,
  991. /* disablement strs */ NULL, NULL },
  992. { /* entry idx, value */ 19, VALUE_OPT_MBPS,
  993. /* equiv idx, value */ 19, VALUE_OPT_MBPS,
  994. /* equivalenced to */ NO_EQUIVALENT,
  995. /* min, max, act ct */ 0, 1, 0,
  996. /* opt state flags */ MBPS_FLAGS, 0,
  997. /* last opt argumnt */ { NULL }, /* --mbps */
  998. /* arg list/cookie */ NULL,
  999. /* must/cannot opts */ NULL, aMbpsCantList,
  1000. /* option proc */ NULL,
  1001. /* desc, NAME, name */ MBPS_DESC, MBPS_NAME, MBPS_name,
  1002. /* disablement strs */ NULL, NULL },
  1003. { /* entry idx, value */ 20, VALUE_OPT_TOPSPEED,
  1004. /* equiv idx, value */ 20, VALUE_OPT_TOPSPEED,
  1005. /* equivalenced to */ NO_EQUIVALENT,
  1006. /* min, max, act ct */ 0, 1, 0,
  1007. /* opt state flags */ TOPSPEED_FLAGS, 0,
  1008. /* last opt argumnt */ { NULL }, /* --topspeed */
  1009. /* arg list/cookie */ NULL,
  1010. /* must/cannot opts */ NULL, aTopspeedCantList,
  1011. /* option proc */ NULL,
  1012. /* desc, NAME, name */ TOPSPEED_DESC, TOPSPEED_NAME, TOPSPEED_name,
  1013. /* disablement strs */ NULL, NULL },
  1014. { /* entry idx, value */ 21, VALUE_OPT_ONEATATIME,
  1015. /* equiv idx, value */ 21, VALUE_OPT_ONEATATIME,
  1016. /* equivalenced to */ NO_EQUIVALENT,
  1017. /* min, max, act ct */ 0, 1, 0,
  1018. /* opt state flags */ ONEATATIME_FLAGS, 0,
  1019. /* last opt argumnt */ { NULL }, /* --oneatatime */
  1020. /* arg list/cookie */ NULL,
  1021. /* must/cannot opts */ NULL, aOneatatimeCantList,
  1022. /* option proc */ NULL,
  1023. /* desc, NAME, name */ ONEATATIME_DESC, ONEATATIME_NAME, ONEATATIME_name,
  1024. /* disablement strs */ NULL, NULL },
  1025. { /* entry idx, value */ 22, VALUE_OPT_PPS_MULTI,
  1026. /* equiv idx, value */ 22, VALUE_OPT_PPS_MULTI,
  1027. /* equivalenced to */ NO_EQUIVALENT,
  1028. /* min, max, act ct */ 0, 1, 0,
  1029. /* opt state flags */ PPS_MULTI_FLAGS, 0,
  1030. /* last opt argumnt */ { PPS_MULTI_DFT_ARG },
  1031. /* arg list/cookie */ NULL,
  1032. /* must/cannot opts */ aPps_MultiMustList, NULL,
  1033. /* option proc */ doOptPps_Multi,
  1034. /* desc, NAME, name */ PPS_MULTI_DESC, PPS_MULTI_NAME, PPS_MULTI_name,
  1035. /* disablement strs */ NULL, NULL },
  1036. { /* entry idx, value */ 23, VALUE_OPT_UNIQUE_IP,
  1037. /* equiv idx, value */ 23, VALUE_OPT_UNIQUE_IP,
  1038. /* equivalenced to */ NO_EQUIVALENT,
  1039. /* min, max, act ct */ 0, 1, 0,
  1040. /* opt state flags */ UNIQUE_IP_FLAGS, 0,
  1041. /* last opt argumnt */ { NULL }, /* --unique-ip */
  1042. /* arg list/cookie */ NULL,
  1043. /* must/cannot opts */ aUnique_IpMustList, NULL,
  1044. /* option proc */ NULL,
  1045. /* desc, NAME, name */ UNIQUE_IP_DESC, UNIQUE_IP_NAME, UNIQUE_IP_name,
  1046. /* disablement strs */ NULL, NULL },
  1047. { /* entry idx, value */ 24, VALUE_OPT_UNIQUE_IP_LOOPS,
  1048. /* equiv idx, value */ 24, VALUE_OPT_UNIQUE_IP_LOOPS,
  1049. /* equivalenced to */ NO_EQUIVALENT,
  1050. /* min, max, act ct */ 0, 1, 0,
  1051. /* opt state flags */ UNIQUE_IP_LOOPS_FLAGS, 0,
  1052. /* last opt argumnt */ { NULL }, /* --unique-ip-loops */
  1053. /* arg list/cookie */ NULL,
  1054. /* must/cannot opts */ aUnique_Ip_LoopsMustList, NULL,
  1055. /* option proc */ NULL,
  1056. /* desc, NAME, name */ UNIQUE_IP_LOOPS_DESC, UNIQUE_IP_LOOPS_NAME, UNIQUE_IP_LOOPS_name,
  1057. /* disablement strs */ NULL, NULL },
  1058. { /* entry idx, value */ 25, VALUE_OPT_NETMAP,
  1059. /* equiv idx, value */ 25, VALUE_OPT_NETMAP,
  1060. /* equivalenced to */ NO_EQUIVALENT,
  1061. /* min, max, act ct */ 0, 1, 0,
  1062. /* opt state flags */ NETMAP_FLAGS, 0,
  1063. /* last opt argumnt */ { NULL }, /* --netmap */
  1064. /* arg list/cookie */ NULL,
  1065. /* must/cannot opts */ NULL, NULL,
  1066. /* option proc */ NULL,
  1067. /* desc, NAME, name */ NETMAP_DESC, NETMAP_NAME, NETMAP_name,
  1068. /* disablement strs */ NULL, NULL },
  1069. { /* entry idx, value */ 26, VALUE_OPT_NM_DELAY,
  1070. /* equiv idx, value */ 26, VALUE_OPT_NM_DELAY,
  1071. /* equivalenced to */ NO_EQUIVALENT,
  1072. /* min, max, act ct */ 0, 1, 0,
  1073. /* opt state flags */ NM_DELAY_FLAGS, 0,
  1074. /* last opt argumnt */ { NM_DELAY_DFT_ARG },
  1075. /* arg list/cookie */ NULL,
  1076. /* must/cannot opts */ NULL, NULL,
  1077. /* option proc */ optionNumericVal,
  1078. /* desc, NAME, name */ NM_DELAY_DESC, NM_DELAY_NAME, NM_DELAY_name,
  1079. /* disablement strs */ NULL, NULL },
  1080. { /* entry idx, value */ 27, VALUE_OPT_NO_FLOW_STATS,
  1081. /* equiv idx, value */ 27, VALUE_OPT_NO_FLOW_STATS,
  1082. /* equivalenced to */ NO_EQUIVALENT,
  1083. /* min, max, act ct */ 0, 1, 0,
  1084. /* opt state flags */ NO_FLOW_STATS_FLAGS, 0,
  1085. /* last opt argumnt */ { NULL }, /* --no-flow-stats */
  1086. /* arg list/cookie */ NULL,
  1087. /* must/cannot opts */ NULL, NULL,
  1088. /* option proc */ NULL,
  1089. /* desc, NAME, name */ NO_FLOW_STATS_DESC, NO_FLOW_STATS_NAME, NO_FLOW_STATS_name,
  1090. /* disablement strs */ NULL, NULL },
  1091. { /* entry idx, value */ 28, VALUE_OPT_FLOW_EXPIRY,
  1092. /* equiv idx, value */ 28, VALUE_OPT_FLOW_EXPIRY,
  1093. /* equivalenced to */ NO_EQUIVALENT,
  1094. /* min, max, act ct */ 0, 1, 0,
  1095. /* opt state flags */ FLOW_EXPIRY_FLAGS, 0,
  1096. /* last opt argumnt */ { FLOW_EXPIRY_DFT_ARG },
  1097. /* arg list/cookie */ NULL,
  1098. /* must/cannot opts */ NULL, aFlow_ExpiryCantList,
  1099. /* option proc */ doOptFlow_Expiry,
  1100. /* desc, NAME, name */ FLOW_EXPIRY_DESC, FLOW_EXPIRY_NAME, FLOW_EXPIRY_name,
  1101. /* disablement strs */ NULL, NULL },
  1102. { /* entry idx, value */ 29, VALUE_OPT_PID,
  1103. /* equiv idx, value */ 29, VALUE_OPT_PID,
  1104. /* equivalenced to */ NO_EQUIVALENT,
  1105. /* min, max, act ct */ 0, 1, 0,
  1106. /* opt state flags */ PID_FLAGS, 0,
  1107. /* last opt argumnt */ { NULL }, /* --pid */
  1108. /* arg list/cookie */ NULL,
  1109. /* must/cannot opts */ NULL, NULL,
  1110. /* option proc */ doOptPid,
  1111. /* desc, NAME, name */ PID_DESC, PID_NAME, PID_name,
  1112. /* disablement strs */ NULL, NULL },
  1113. { /* entry idx, value */ 30, VALUE_OPT_STATS,
  1114. /* equiv idx, value */ 30, VALUE_OPT_STATS,
  1115. /* equivalenced to */ NO_EQUIVALENT,
  1116. /* min, max, act ct */ 0, 1, 0,
  1117. /* opt state flags */ STATS_FLAGS, 0,
  1118. /* last opt argumnt */ { NULL }, /* --stats */
  1119. /* arg list/cookie */ NULL,
  1120. /* must/cannot opts */ NULL, NULL,
  1121. /* option proc */ doOptStats,
  1122. /* desc, NAME, name */ STATS_DESC, STATS_NAME, STATS_name,
  1123. /* disablement strs */ NULL, NULL },
  1124. { /* entry idx, value */ 31, VALUE_OPT_VERSION,
  1125. /* equiv idx, value */ 31, VALUE_OPT_VERSION,
  1126. /* equivalenced to */ NO_EQUIVALENT,
  1127. /* min, max, act ct */ 0, 1, 0,
  1128. /* opt state flags */ VERSION_FLAGS, 0,
  1129. /* last opt argumnt */ { NULL }, /* --version */
  1130. /* arg list/cookie */ NULL,
  1131. /* must/cannot opts */ NULL, NULL,
  1132. /* option proc */ doOptVersion,
  1133. /* desc, NAME, name */ VERSION_DESC, VERSION_NAME, VERSION_name,
  1134. /* disablement strs */ NULL, NULL },
  1135. { /* entry idx, value */ 32, VALUE_OPT_LESS_HELP,
  1136. /* equiv idx, value */ 32, VALUE_OPT_LESS_HELP,
  1137. /* equivalenced to */ NO_EQUIVALENT,
  1138. /* min, max, act ct */ 0, 1, 0,
  1139. /* opt state flags */ LESS_HELP_FLAGS, 0,
  1140. /* last opt argumnt */ { NULL }, /* --less-help */
  1141. /* arg list/cookie */ NULL,
  1142. /* must/cannot opts */ NULL, NULL,
  1143. /* option proc */ doOptLess_Help,
  1144. /* desc, NAME, name */ LESS_HELP_DESC, LESS_HELP_NAME, LESS_HELP_name,
  1145. /* disablement strs */ NULL, NULL },
  1146. { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
  1147. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
  1148. /* equivalenced to */ NO_EQUIVALENT,
  1149. /* min, max, act ct */ 0, 1, 0,
  1150. /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
  1151. /* last opt argumnt */ { NULL },
  1152. /* arg list/cookie */ NULL,
  1153. /* must/cannot opts */ NULL, NULL,
  1154. /* option proc */ doUsageOpt,
  1155. /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
  1156. /* disablement strs */ NULL, NULL },
  1157. { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
  1158. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
  1159. /* equivalenced to */ NO_EQUIVALENT,
  1160. /* min, max, act ct */ 0, 1, 0,
  1161. /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
  1162. /* last opt argumnt */ { NULL },
  1163. /* arg list/cookie */ NULL,
  1164. /* must/cannot opts */ NULL, NULL,
  1165. /* option proc */ optionPagedUsage,
  1166. /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
  1167. /* disablement strs */ NULL, NULL },
  1168. { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
  1169. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
  1170. /* equivalenced to */ NO_EQUIVALENT,
  1171. /* min, max, act ct */ 0, 1, 0,
  1172. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
  1173. | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
  1174. /* last opt argumnt */ { NULL },
  1175. /* arg list/cookie */ NULL,
  1176. /* must/cannot opts */ NULL, NULL,
  1177. /* option proc */ NULL,
  1178. /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
  1179. /* disablement strs */ NULL, NULL },
  1180. { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
  1181. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
  1182. /* equivalenced to */ NO_EQUIVALENT,
  1183. /* min, max, act ct */ 0, NOLIMIT, 0,
  1184. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
  1185. | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
  1186. /* last opt argumnt */ { NULL },
  1187. /* arg list/cookie */ NULL,
  1188. /* must/cannot opts */ NULL, NULL,
  1189. /* option proc */ optionLoadOpt,
  1190. /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
  1191. /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
  1192. };
  1193. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1194. /** Reference to the upper cased version of tcpreplay. */
  1195. #define zPROGNAME (tcpreplay_opt_strs+3089)
  1196. /** Reference to the title line for tcpreplay usage. */
  1197. #define zUsageTitle (tcpreplay_opt_strs+3099)
  1198. /** tcpreplay configuration file name. */
  1199. #define zRcName (tcpreplay_opt_strs+3244)
  1200. /** Directories to search for tcpreplay config files. */
  1201. static char const * const apzHomeList[2] = {
  1202. tcpreplay_opt_strs+3240,
  1203. NULL };
  1204. /** The tcpreplay program bug email address. */
  1205. #define zBugsAddr (tcpreplay_opt_strs+3257)
  1206. /** Clarification/explanation of what tcpreplay does. */
  1207. #define zExplain (tcpreplay_opt_strs+3295)
  1208. /** Extra detail explaining what tcpreplay does. */
  1209. #define zDetail (tcpreplay_opt_strs+3418)
  1210. /** The full version string for tcpreplay. */
  1211. #define zFullVersion (NULL)
  1212. /* extracted from optcode.tlib near line 364 */
  1213. #if defined(ENABLE_NLS)
  1214. # define OPTPROC_BASE OPTPROC_TRANSLATE
  1215. static tOptionXlateProc translate_option_strings;
  1216. #else
  1217. # define OPTPROC_BASE OPTPROC_NONE
  1218. # define translate_option_strings NULL
  1219. #endif /* ENABLE_NLS */
  1220. #define tcpreplay_full_usage (NULL)
  1221. #define tcpreplay_short_usage (NULL)
  1222. #endif /* not defined __doxygen__ */
  1223. /*
  1224. * Create the static procedure(s) declared above.
  1225. */
  1226. /**
  1227. * The callout function that invokes the optionUsage function.
  1228. *
  1229. * @param[in] opts the AutoOpts option description structure
  1230. * @param[in] od the descriptor for the "help" (usage) option.
  1231. * @noreturn
  1232. */
  1233. static void
  1234. doUsageOpt(tOptions * opts, tOptDesc * od)
  1235. {
  1236. int ex_code;
  1237. ex_code = TCPREPLAY_EXIT_SUCCESS;
  1238. optionUsage(&tcpreplayOptions, ex_code);
  1239. /* NOTREACHED */
  1240. exit(TCPREPLAY_EXIT_FAILURE);
  1241. (void)opts;
  1242. (void)od;
  1243. }
  1244. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1245. /**
  1246. * Code to handle the dbug option, when DEBUG is #define-d.
  1247. * If configured with --enable-debug, then you can specify a verbosity
  1248. * level for debugging output. Higher numbers increase verbosity.
  1249. * @param[in] pOptions the tcpreplay options data structure
  1250. * @param[in,out] pOptDesc the option descriptor for this option.
  1251. */
  1252. #ifdef DEBUG
  1253. static void
  1254. doOptDbug(tOptions* pOptions, tOptDesc* pOptDesc)
  1255. {
  1256. static struct {long rmin, rmax;} const rng[1] = {
  1257. { 0, 5 } };
  1258. int ix;
  1259. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1260. goto emit_ranges;
  1261. optionNumericVal(pOptions, pOptDesc);
  1262. for (ix = 0; ix < 1; ix++) {
  1263. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1264. continue; /* ranges need not be ordered. */
  1265. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1266. return;
  1267. if (rng[ix].rmax == LONG_MIN)
  1268. continue;
  1269. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1270. return;
  1271. }
  1272. option_usage_fp = stderr;
  1273. emit_ranges:
  1274. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1275. }
  1276. #endif /* defined DEBUG */
  1277. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1278. /**
  1279. * Code to handle the listnics option, when ENABLE_PCAP_FINDALLDEVS is #define-d.
  1280. *
  1281. * @param[in] pOptions the tcpreplay options data structure
  1282. * @param[in,out] pOptDesc the option descriptor for this option.
  1283. */
  1284. #ifdef ENABLE_PCAP_FINDALLDEVS
  1285. static void
  1286. doOptListnics(tOptions* pOptions, tOptDesc* pOptDesc)
  1287. {
  1288. /*
  1289. * Be sure the flag-code[0] handles special values for the options pointer
  1290. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  1291. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  1292. * reset its state.
  1293. */
  1294. /* extracted from tcpreplay_opts.def, line 297 */
  1295. interface_list_t *list = get_interface_list();
  1296. list_interfaces(list);
  1297. free(list);
  1298. exit(0);
  1299. (void)pOptDesc;
  1300. (void)pOptions;
  1301. }
  1302. #endif /* defined ENABLE_PCAP_FINDALLDEVS */
  1303. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1304. /**
  1305. * Code to handle the loop option.
  1306. *
  1307. * @param[in] pOptions the tcpreplay options data structure
  1308. * @param[in,out] pOptDesc the option descriptor for this option.
  1309. */
  1310. static void
  1311. doOptLoop(tOptions* pOptions, tOptDesc* pOptDesc)
  1312. {
  1313. static struct {long rmin, rmax;} const rng[1] = {
  1314. { 0, LONG_MAX } };
  1315. int ix;
  1316. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1317. goto emit_ranges;
  1318. optionNumericVal(pOptions, pOptDesc);
  1319. for (ix = 0; ix < 1; ix++) {
  1320. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1321. continue; /* ranges need not be ordered. */
  1322. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1323. return;
  1324. if (rng[ix].rmax == LONG_MIN)
  1325. continue;
  1326. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1327. return;
  1328. }
  1329. option_usage_fp = stderr;
  1330. emit_ranges:
  1331. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1332. }
  1333. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1334. /**
  1335. * Code to handle the loopdelay-ms option.
  1336. *
  1337. * @param[in] pOptions the tcpreplay options data structure
  1338. * @param[in,out] pOptDesc the option descriptor for this option.
  1339. */
  1340. static void
  1341. doOptLoopdelay_Ms(tOptions* pOptions, tOptDesc* pOptDesc)
  1342. {
  1343. static struct {long rmin, rmax;} const rng[1] = {
  1344. { 0, LONG_MAX } };
  1345. int ix;
  1346. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1347. goto emit_ranges;
  1348. optionNumericVal(pOptions, pOptDesc);
  1349. for (ix = 0; ix < 1; ix++) {
  1350. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1351. continue; /* ranges need not be ordered. */
  1352. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1353. return;
  1354. if (rng[ix].rmax == LONG_MIN)
  1355. continue;
  1356. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1357. return;
  1358. }
  1359. option_usage_fp = stderr;
  1360. emit_ranges:
  1361. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1362. }
  1363. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1364. /**
  1365. * Code to handle the limit option.
  1366. * By default, tcpreplay will send all the packets. Alternatively, you can
  1367. * specify a maximum number of packets to send.
  1368. * @param[in] pOptions the tcpreplay options data structure
  1369. * @param[in,out] pOptDesc the option descriptor for this option.
  1370. */
  1371. static void
  1372. doOptLimit(tOptions* pOptions, tOptDesc* pOptDesc)
  1373. {
  1374. static struct {long rmin, rmax;} const rng[1] = {
  1375. { 1, LONG_MAX } };
  1376. int ix;
  1377. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1378. goto emit_ranges;
  1379. optionNumericVal(pOptions, pOptDesc);
  1380. for (ix = 0; ix < 1; ix++) {
  1381. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1382. continue; /* ranges need not be ordered. */
  1383. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1384. return;
  1385. if (rng[ix].rmax == LONG_MIN)
  1386. continue;
  1387. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1388. return;
  1389. }
  1390. option_usage_fp = stderr;
  1391. emit_ranges:
  1392. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1393. }
  1394. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1395. /**
  1396. * Code to handle the duration option.
  1397. * By default, tcpreplay will send all the packets. Alternatively, you can
  1398. * specify a maximum number of seconds to transmit.
  1399. * @param[in] pOptions the tcpreplay options data structure
  1400. * @param[in,out] pOptDesc the option descriptor for this option.
  1401. */
  1402. static void
  1403. doOptDuration(tOptions* pOptions, tOptDesc* pOptDesc)
  1404. {
  1405. static struct {long rmin, rmax;} const rng[1] = {
  1406. { 1, LONG_MAX } };
  1407. int ix;
  1408. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1409. goto emit_ranges;
  1410. optionNumericVal(pOptions, pOptDesc);
  1411. for (ix = 0; ix < 1; ix++) {
  1412. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1413. continue; /* ranges need not be ordered. */
  1414. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1415. return;
  1416. if (rng[ix].rmax == LONG_MIN)
  1417. continue;
  1418. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1419. return;
  1420. }
  1421. option_usage_fp = stderr;
  1422. emit_ranges:
  1423. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1424. }
  1425. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1426. /**
  1427. * Code to handle the pps-multi option.
  1428. * When trying to send packets at very high rates, the time between each packet
  1429. * can be so short that it is impossible to accurately sleep for the required
  1430. * period of time. This option allows you to send multiple packets at a time,
  1431. * thus allowing for longer sleep times which can be more accurately implemented.
  1432. * @param[in] pOptions the tcpreplay options data structure
  1433. * @param[in,out] pOptDesc the option descriptor for this option.
  1434. */
  1435. static void
  1436. doOptPps_Multi(tOptions* pOptions, tOptDesc* pOptDesc)
  1437. {
  1438. static struct {long rmin, rmax;} const rng[1] = {
  1439. { 1, LONG_MAX } };
  1440. int ix;
  1441. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1442. goto emit_ranges;
  1443. optionNumericVal(pOptions, pOptDesc);
  1444. for (ix = 0; ix < 1; ix++) {
  1445. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1446. continue; /* ranges need not be ordered. */
  1447. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1448. return;
  1449. if (rng[ix].rmax == LONG_MIN)
  1450. continue;
  1451. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1452. return;
  1453. }
  1454. option_usage_fp = stderr;
  1455. emit_ranges:
  1456. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1457. }
  1458. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1459. /**
  1460. * Code to handle the flow-expiry option.
  1461. * This option will track and report flow expirations based on the flow idle
  1462. * times. The timestamps within the pcap file are used to determine the expiry,
  1463. * not the actual timestamp of the packets are replayed. For example, a value of
  1464. * 30 suggests that if no traffic is seen on a flow for 30 seconds, any
  1465. * subsequent traffic would be considered a new flow, and thereby will increment
  1466. * the flows and flows per second (fps) statistics.
  1467. *
  1468. * This option can be used to optimize flow timeout settings for flow products.
  1469. * Setting the timeout low may lead to flows being dropped when in fact the flow
  1470. * is simply slow to respond. Configuring your flow timeouts too high may
  1471. * increase resources required by your flow product.
  1472. *
  1473. * Note that using this option while replaying at higher than original speeds
  1474. * can lead to inflated flows and fps counts.
  1475. *
  1476. * Default is 0 (no expiry) and a typical value is 30-120 seconds.
  1477. * @param[in] pOptions the tcpreplay options data structure
  1478. * @param[in,out] pOptDesc the option descriptor for this option.
  1479. */
  1480. static void
  1481. doOptFlow_Expiry(tOptions* pOptions, tOptDesc* pOptDesc)
  1482. {
  1483. static struct {long rmin, rmax;} const rng[1] = {
  1484. { 0, LONG_MAX } };
  1485. int ix;
  1486. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1487. goto emit_ranges;
  1488. optionNumericVal(pOptions, pOptDesc);
  1489. for (ix = 0; ix < 1; ix++) {
  1490. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1491. continue; /* ranges need not be ordered. */
  1492. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1493. return;
  1494. if (rng[ix].rmax == LONG_MIN)
  1495. continue;
  1496. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1497. return;
  1498. }
  1499. option_usage_fp = stderr;
  1500. emit_ranges:
  1501. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1502. }
  1503. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1504. /**
  1505. * Code to handle the pid option.
  1506. *
  1507. * @param[in] pOptions the tcpreplay options data structure
  1508. * @param[in,out] pOptDesc the option descriptor for this option.
  1509. */
  1510. static void
  1511. doOptPid(tOptions* pOptions, tOptDesc* pOptDesc)
  1512. {
  1513. /*
  1514. * Be sure the flag-code[0] handles special values for the options pointer
  1515. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  1516. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  1517. * reset its state.
  1518. */
  1519. /* extracted from tcpreplay_opts.def, line 582 */
  1520. fprintf(stderr, "PID: %d\n", getpid());
  1521. (void)pOptDesc;
  1522. (void)pOptions;
  1523. }
  1524. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1525. /**
  1526. * Code to handle the stats option.
  1527. * Note that timed delays are a "best effort" and long delays between
  1528. * sending packets may cause equally long delays between printing statistics.
  1529. * @param[in] pOptions the tcpreplay options data structure
  1530. * @param[in,out] pOptDesc the option descriptor for this option.
  1531. */
  1532. static void
  1533. doOptStats(tOptions* pOptions, tOptDesc* pOptDesc)
  1534. {
  1535. static struct {long rmin, rmax;} const rng[1] = {
  1536. { 0, LONG_MAX } };
  1537. int ix;
  1538. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1539. goto emit_ranges;
  1540. optionNumericVal(pOptions, pOptDesc);
  1541. for (ix = 0; ix < 1; ix++) {
  1542. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1543. continue; /* ranges need not be ordered. */
  1544. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1545. return;
  1546. if (rng[ix].rmax == LONG_MIN)
  1547. continue;
  1548. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1549. return;
  1550. }
  1551. option_usage_fp = stderr;
  1552. emit_ranges:
  1553. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1554. }
  1555. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1556. /**
  1557. * Code to handle the version option.
  1558. *
  1559. * @param[in] pOptions the tcpreplay options data structure
  1560. * @param[in,out] pOptDesc the option descriptor for this option.
  1561. */
  1562. static void
  1563. doOptVersion(tOptions* pOptions, tOptDesc* pOptDesc)
  1564. {
  1565. /*
  1566. * Be sure the flag-code[0] handles special values for the options pointer
  1567. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  1568. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  1569. * reset its state.
  1570. */
  1571. /* extracted from tcpreplay_opts.def, line 605 */
  1572. fprintf(stderr, "tcpreplay version: %s (build %s)", VERSION, git_version());
  1573. #ifdef DEBUG
  1574. fprintf(stderr, " (debug)");
  1575. #endif
  1576. #ifdef TIMESTAMP_TRACE
  1577. fprintf(stderr, " (timestamp-trace)");
  1578. #endif
  1579. fprintf(stderr, "\n");
  1580. fprintf(stderr, "Copyright 2013-2018 by Fred Klassen <tcpreplay at appneta dot com> - AppNeta\n");
  1581. fprintf(stderr, "Copyright 2000-2012 by Aaron Turner <aturner at synfin dot net>\n");
  1582. fprintf(stderr, "The entire Tcpreplay Suite is licensed under the GPLv3\n");
  1583. fprintf(stderr, "Cache file supported: %s\n", CACHEVERSION);
  1584. #ifdef HAVE_LIBDNET
  1585. fprintf(stderr, "Compiled against libdnet: %s\n", LIBDNET_VERSION);
  1586. #else
  1587. fprintf(stderr, "Not compiled with libdnet.\n");
  1588. #endif
  1589. #ifdef HAVE_WINPCAP
  1590. fprintf(stderr, "Compiled against winpcap: %s\n", get_pcap_version());
  1591. #elif defined HAVE_PF_RING_PCAP
  1592. fprintf(stderr, "Compiled against PF_RING libpcap: %s\n", get_pcap_version());
  1593. #else
  1594. fprintf(stderr, "Compiled against libpcap: %s\n", get_pcap_version());
  1595. #endif
  1596. #ifdef ENABLE_64BITS
  1597. fprintf(stderr, "64 bit packet counters: enabled\n");
  1598. #else
  1599. fprintf(stderr, "64 bit packet counters: disabled\n");
  1600. #endif
  1601. #ifdef ENABLE_VERBOSE
  1602. fprintf(stderr, "Verbose printing via tcpdump: enabled\n");
  1603. #else
  1604. fprintf(stderr, "Verbose printing via tcpdump: disabled\n");
  1605. #endif
  1606. #ifdef TCPREPLAY_EDIT
  1607. fprintf(stderr, "Packet editing: enabled\n");
  1608. #else
  1609. fprintf(stderr, "Packet editing: disabled\n");
  1610. #endif
  1611. #ifdef ENABLE_FRAGROUTE
  1612. fprintf(stderr, "Fragroute engine: enabled\n");
  1613. #else
  1614. fprintf(stderr, "Fragroute engine: disabled\n");
  1615. #endif
  1616. #if defined HAVE_NETMAP
  1617. fprintf(stderr, "Default injection method: %s\n", sendpacket_get_method(NULL));
  1618. #else
  1619. fprintf(stderr, "Injection method: %s\n", sendpacket_get_method(NULL));
  1620. #endif
  1621. #ifdef HAVE_NETMAP
  1622. fprintf(stderr, "Optional injection method: netmap\n");
  1623. #else
  1624. fprintf(stderr, "Not compiled with netmap\n");
  1625. #endif
  1626. exit(0);
  1627. (void)pOptDesc;
  1628. (void)pOptions;
  1629. }
  1630. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1631. /**
  1632. * Code to handle the less-help option.
  1633. *
  1634. * @param[in] pOptions the tcpreplay options data structure
  1635. * @param[in,out] pOptDesc the option descriptor for this option.
  1636. */
  1637. static void
  1638. doOptLess_Help(tOptions* pOptions, tOptDesc* pOptDesc)
  1639. {
  1640. /*
  1641. * Be sure the flag-code[0] handles special values for the options pointer
  1642. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  1643. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  1644. * reset its state.
  1645. */
  1646. /* extracted from tcpreplay_opts.def, line 672 */
  1647. USAGE(EXIT_FAILURE);
  1648. (void)pOptDesc;
  1649. (void)pOptions;
  1650. }
  1651. /* extracted from optmain.tlib near line 1250 */
  1652. /**
  1653. * The directory containing the data associated with tcpreplay.
  1654. */
  1655. #ifndef PKGDATADIR
  1656. # define PKGDATADIR ""
  1657. #endif
  1658. /**
  1659. * Information about the person or institution that packaged tcpreplay
  1660. * for the current distribution.
  1661. */
  1662. #ifndef WITH_PACKAGER
  1663. # define tcpreplay_packager_info NULL
  1664. #else
  1665. /** Packager information for tcpreplay. */
  1666. static char const tcpreplay_packager_info[] =
  1667. "Packaged by " WITH_PACKAGER
  1668. # ifdef WITH_PACKAGER_VERSION
  1669. " ("WITH_PACKAGER_VERSION")"
  1670. # endif
  1671. # ifdef WITH_PACKAGER_BUG_REPORTS
  1672. "\nReport tcpreplay bugs to " WITH_PACKAGER_BUG_REPORTS
  1673. # endif
  1674. "\n";
  1675. #endif
  1676. #ifndef __doxygen__
  1677. #endif /* __doxygen__ */
  1678. /**
  1679. * The option definitions for tcpreplay. The one structure that
  1680. * binds them all.
  1681. */
  1682. tOptions tcpreplayOptions = {
  1683. OPTIONS_STRUCT_VERSION,
  1684. 0, NULL, /* original argc + argv */
  1685. ( OPTPROC_BASE
  1686. + OPTPROC_ERRSTOP
  1687. + OPTPROC_SHORTOPT
  1688. + OPTPROC_LONGOPT
  1689. + OPTPROC_NO_REQ_OPT
  1690. + OPTPROC_ARGS_REQ
  1691. + OPTPROC_GNUUSAGE ),
  1692. 0, NULL, /* current option index, current option */
  1693. NULL, NULL, zPROGNAME,
  1694. zRcName, zCopyright, zLicenseDescrip,
  1695. zFullVersion, apzHomeList, zUsageTitle,
  1696. zExplain, zDetail, optDesc,
  1697. zBugsAddr, /* address to send bugs to */
  1698. NULL, NULL, /* extensions/saved state */
  1699. optionUsage, /* usage procedure */
  1700. translate_option_strings, /* translation procedure */
  1701. /*
  1702. * Indexes to special options
  1703. */
  1704. { INDEX_OPT_MORE_HELP, /* more-help option index */
  1705. INDEX_OPT_SAVE_OPTS, /* save option index */
  1706. NO_EQUIVALENT, /* '-#' option index */
  1707. NO_EQUIVALENT /* index of default opt */
  1708. },
  1709. 37 /* full option count */, 33 /* user option count */,
  1710. tcpreplay_full_usage, tcpreplay_short_usage,
  1711. NULL, NULL,
  1712. PKGDATADIR, tcpreplay_packager_info
  1713. };
  1714. #if ENABLE_NLS
  1715. /**
  1716. * This code is designed to translate translatable option text for the
  1717. * tcpreplay program. These translations happen upon entry
  1718. * to optionProcess().
  1719. */
  1720. #include <stdio.h>
  1721. #include <stdlib.h>
  1722. #include <string.h>
  1723. #include <unistd.h>
  1724. #ifdef HAVE_DCGETTEXT
  1725. # include <gettext.h>
  1726. #endif
  1727. #include <autoopts/usage-txt.h>
  1728. static char * AO_gettext(char const * pz);
  1729. static void coerce_it(void ** s);
  1730. /**
  1731. * AutoGen specific wrapper function for gettext. It relies on the macro _()
  1732. * to convert from English to the target language, then strdup-duplicates the
  1733. * result string. It tries the "libopts" domain first, then whatever has been
  1734. * set via the \a textdomain(3) call.
  1735. *
  1736. * @param[in] pz the input text used as a lookup key.
  1737. * @returns the translated text (if there is one),
  1738. * or the original text (if not).
  1739. */
  1740. static char *
  1741. AO_gettext(char const * pz)
  1742. {
  1743. char * res;
  1744. if (pz == NULL)
  1745. return NULL;
  1746. #ifdef HAVE_DCGETTEXT
  1747. /*
  1748. * While processing the option_xlateable_txt data, try to use the
  1749. * "libopts" domain. Once we switch to the option descriptor data,
  1750. * do *not* use that domain.
  1751. */
  1752. if (option_xlateable_txt.field_ct != 0) {
  1753. res = dgettext("libopts", pz);
  1754. if (res == pz)
  1755. res = (char *)VOIDP(_(pz));
  1756. } else
  1757. res = (char *)VOIDP(_(pz));
  1758. #else
  1759. res = (char *)VOIDP(_(pz));
  1760. #endif
  1761. if (res == pz)
  1762. return res;
  1763. res = strdup(res);
  1764. if (res == NULL) {
  1765. fputs(_("No memory for duping translated strings\n"), stderr);
  1766. exit(TCPREPLAY_EXIT_FAILURE);
  1767. }
  1768. return res;
  1769. }
  1770. /**
  1771. * All the pointers we use are marked "* const", but they are stored in
  1772. * writable memory. Coerce the mutability and set the pointer.
  1773. */
  1774. static void coerce_it(void ** s) { *s = AO_gettext(*s);
  1775. }
  1776. /**
  1777. * Translate all the translatable strings in the tcpreplayOptions
  1778. * structure defined above. This is done only once.
  1779. */
  1780. static void
  1781. translate_option_strings(void)
  1782. {
  1783. tOptions * const opts = &tcpreplayOptions;
  1784. /*
  1785. * Guard against re-translation. It won't work. The strings will have
  1786. * been changed by the first pass through this code. One shot only.
  1787. */
  1788. if (option_xlateable_txt.field_ct != 0) {
  1789. /*
  1790. * Do the translations. The first pointer follows the field count
  1791. * field. The field count field is the size of a pointer.
  1792. */
  1793. char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
  1794. int ix = option_xlateable_txt.field_ct;
  1795. do {
  1796. ppz++; /* skip over field_ct */
  1797. *ppz = AO_gettext(*ppz);
  1798. } while (--ix > 0);
  1799. /* prevent re-translation and disable "libopts" domain lookup */
  1800. option_xlateable_txt.field_ct = 0;
  1801. coerce_it(VOIDP(&(opts->pzCopyright)));
  1802. coerce_it(VOIDP(&(opts->pzCopyNotice)));
  1803. coerce_it(VOIDP(&(opts->pzFullVersion)));
  1804. coerce_it(VOIDP(&(opts->pzUsageTitle)));
  1805. coerce_it(VOIDP(&(opts->pzExplain)));
  1806. coerce_it(VOIDP(&(opts->pzDetail)));
  1807. {
  1808. tOptDesc * od = opts->pOptDesc;
  1809. for (ix = opts->optCt; ix > 0; ix--, od++)
  1810. coerce_it(VOIDP(&(od->pzText)));
  1811. }
  1812. }
  1813. }
  1814. #endif /* ENABLE_NLS */
  1815. #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
  1816. /** I18N function strictly for xgettext. Do not compile. */
  1817. static void bogus_function(void) {
  1818. /* TRANSLATORS:
  1819. The following dummy function was crated solely so that xgettext can
  1820. extract the correct strings. These strings are actually referenced
  1821. by a field name in the tcpreplayOptions structure noted in the
  1822. comments below. The literal text is defined in tcpreplay_opt_strs.
  1823. NOTE: the strings below are segmented with respect to the source string
  1824. tcpreplay_opt_strs. The strings above are handed off for translation
  1825. at run time a paragraph at a time. Consequently, they are presented here
  1826. for translation a paragraph at a time.
  1827. ALSO: often the description for an option will reference another option
  1828. by name. These are set off with apostrophe quotes (I hope). Do not
  1829. translate option names.
  1830. */
  1831. /* referenced via tcpreplayOptions.pzCopyright */
  1832. puts(_("tcpreplay (tcpreplay)\n\
  1833. Copyright (C) 2000-2018 Aaron Turner and Fred Klassen, all rights reserved.\n\
  1834. This is free software. It is licensed for use, modification and\n\
  1835. redistribution under the terms of the GNU General Public License,\n\
  1836. version 3 or later <http://gnu.org/licenses/gpl.html>\n"));
  1837. /* referenced via tcpreplayOptions.pzCopyNotice */
  1838. puts(_("tcpreplay is free software: you can redistribute it and/or modify it under\n\
  1839. the terms of the GNU General Public License as published by the Free\n\
  1840. Software Foundation, either version 3 of the License, or (at your option)\n\
  1841. any later version.\n\n"));
  1842. puts(_("tcpreplay is distributed in the hope that it will be useful, but WITHOUT\n\
  1843. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
  1844. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n\
  1845. more details.\n\n"));
  1846. puts(_("You should have received a copy of the GNU General Public License along\n\
  1847. with this program. If not, see <http://www.gnu.org/licenses/>.\n"));
  1848. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1849. puts(_("Enable debugging output"));
  1850. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1851. puts(_("Quiet mode"));
  1852. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1853. puts(_("Select packet timing mode: select, ioport, gtod, nano"));
  1854. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1855. puts(_("Sleep for no more then X milliseconds between packets"));
  1856. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1857. puts(_("Print decoded packets via tcpdump to STDOUT"));
  1858. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1859. puts(_("Arguments passed to tcpdump decoder"));
  1860. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1861. puts(_("Preloads packets into RAM before sending"));
  1862. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1863. puts(_("Split traffic via a tcpprep cache file"));
  1864. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1865. puts(_("Replay two files at a time from a network tap"));
  1866. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1867. puts(_("Client to server/RX/primary traffic output interface"));
  1868. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1869. puts(_("Server to client/TX/secondary traffic output interface"));
  1870. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1871. puts(_("List available network interfaces and exit"));
  1872. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1873. puts(_("Loop through the capture file X times"));
  1874. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1875. puts(_("Delay between loops in milliseconds"));
  1876. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1877. puts(_("Override the snaplen and use the actual packet len"));
  1878. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1879. puts(_("Limit the number of packets to send"));
  1880. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1881. puts(_("Limit the number of seconds to send"));
  1882. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1883. puts(_("Modify replay speed to a given multiple"));
  1884. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1885. puts(_("Replay packets at a given packets/sec"));
  1886. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1887. puts(_("Replay packets at a given Mbps"));
  1888. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1889. puts(_("Replay packets as fast as possible"));
  1890. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1891. puts(_("Replay one packet at a time for each user input"));
  1892. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1893. puts(_("Number of packets to send for each time interval"));
  1894. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1895. puts(_("Modify IP addresses each loop iteration to generate unique flows"));
  1896. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1897. puts(_("Number of times to loop before assigning new unique ip"));
  1898. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1899. puts(_("Write packets directly to netmap enabled network adapter"));
  1900. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1901. puts(_("Netmap startup delay"));
  1902. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1903. puts(_("Suppress printing and tracking flow count, rates and expirations"));
  1904. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1905. puts(_("Number of inactive seconds before a flow is considered expired"));
  1906. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1907. puts(_("Print the PID of tcpreplay at startup"));
  1908. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1909. puts(_("Print statistics every X seconds, or every loop if '0'"));
  1910. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1911. puts(_("Print version information"));
  1912. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1913. puts(_("Display less usage information and exit"));
  1914. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1915. puts(_("display extended usage information and exit"));
  1916. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1917. puts(_("extended usage information passed thru pager"));
  1918. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1919. puts(_("save the option state to a config file"));
  1920. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  1921. puts(_("load options from a config file"));
  1922. /* referenced via tcpreplayOptions.pzUsageTitle */
  1923. puts(_("tcpreplay (tcpreplay) - Replay network traffic stored in pcap files\n\
  1924. Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... <pcap_file(s)>\n"));
  1925. /* referenced via tcpreplayOptions.pzExplain */
  1926. puts(_("tcpreplay is a tool for replaying network traffic from files saved with\n\
  1927. tcpdump or other tools which write pcap(3) files.\n"));
  1928. /* referenced via tcpreplayOptions.pzDetail */
  1929. puts(_("The basic operation of tcpreplay is to resend all packets from the input\n\
  1930. file(s) at the speed at which they were recorded, or a specified data rate,\n\
  1931. up to as fast as the hardware is capable.\n\n"));
  1932. puts(_("Optionally, the traffic can be split between two interfaces, written to\n\
  1933. files, filtered and edited in various ways, providing the means to test\n\
  1934. firewalls, NIDS and other network devices.\n\n"));
  1935. puts(_("For more details, please see the Tcpreplay Manual at:\n\
  1936. http://tcpreplay.appneta.com\n"));
  1937. /* referenced via tcpreplayOptions.pzFullUsage */
  1938. puts(_("<<<NOT-FOUND>>>"));
  1939. /* referenced via tcpreplayOptions.pzShortUsage */
  1940. puts(_("<<<NOT-FOUND>>>"));
  1941. /* LIBOPTS-MESSAGES: */
  1942. #line 67 "../autoopts.c"
  1943. puts(_("allocation of %d bytes failed\n"));
  1944. #line 93 "../autoopts.c"
  1945. puts(_("allocation of %d bytes failed\n"));
  1946. #line 53 "../init.c"
  1947. puts(_("AutoOpts function called without option descriptor\n"));
  1948. #line 86 "../init.c"
  1949. puts(_("\tThis exceeds the compiled library version: "));
  1950. #line 84 "../init.c"
  1951. puts(_("Automated Options Processing Error!\n"
  1952. "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
  1953. #line 80 "../autoopts.c"
  1954. puts(_("realloc of %d bytes at 0x%p failed\n"));
  1955. #line 88 "../init.c"
  1956. puts(_("\tThis is less than the minimum library version: "));
  1957. #line 121 "../version.c"
  1958. puts(_("Automated Options version %s\n"
  1959. "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
  1960. #line 87 "../makeshell.c"
  1961. puts(_("(AutoOpts bug): %s.\n"));
  1962. #line 90 "../reset.c"
  1963. puts(_("optionResetOpt() called, but reset-option not configured"));
  1964. #line 295 "../usage.c"
  1965. puts(_("could not locate the 'help' option"));
  1966. #line 336 "../autoopts.c"
  1967. puts(_("optionProcess() was called with invalid data"));
  1968. #line 751 "../usage.c"
  1969. puts(_("invalid argument type specified"));
  1970. #line 598 "../find.c"
  1971. puts(_("defaulted to option with optional arg"));
  1972. #line 76 "../alias.c"
  1973. puts(_("aliasing option is out of range."));
  1974. #line 235 "../enum.c"
  1975. puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
  1976. #line 108 "../find.c"
  1977. puts(_(" The following options match:\n"));
  1978. #line 293 "../find.c"
  1979. puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
  1980. #line 161 "../check.c"
  1981. puts(_("%s: Command line arguments required\n"));
  1982. #line 43 "../alias.c"
  1983. puts(_("%d %s%s options allowed\n"));
  1984. #line 94 "../makeshell.c"
  1985. puts(_("%s error %d (%s) calling %s for '%s'\n"));
  1986. #line 306 "../makeshell.c"
  1987. puts(_("interprocess pipe"));
  1988. #line 168 "../version.c"
  1989. puts(_("error: version option argument '%c' invalid. Use:\n"
  1990. "\t'v' - version only\n"
  1991. "\t'c' - version and copyright\n"
  1992. "\t'n' - version and full copyright notice\n"));
  1993. #line 58 "../check.c"
  1994. puts(_("%s error: the '%s' and '%s' options conflict\n"));
  1995. #line 217 "../find.c"
  1996. puts(_("%s: The '%s' option has been disabled."));
  1997. #line 430 "../find.c"
  1998. puts(_("%s: The '%s' option has been disabled."));
  1999. #line 38 "../alias.c"
  2000. puts(_("-equivalence"));
  2001. #line 469 "../find.c"
  2002. puts(_("%s: illegal option -- %c\n"));
  2003. #line 110 "../reset.c"
  2004. puts(_("%s: illegal option -- %c\n"));
  2005. #line 271 "../find.c"
  2006. puts(_("%s: illegal option -- %s\n"));
  2007. #line 755 "../find.c"
  2008. puts(_("%s: illegal option -- %s\n"));
  2009. #line 118 "../reset.c"
  2010. puts(_("%s: illegal option -- %s\n"));
  2011. #line 335 "../find.c"
  2012. puts(_("%s: unknown vendor extension option -- %s\n"));
  2013. #line 160 "../enum.c"
  2014. puts(_(" or an integer from %d through %d\n"));
  2015. #line 170 "../enum.c"
  2016. puts(_(" or an integer from %d through %d\n"));
  2017. #line 750 "../usage.c"
  2018. puts(_("%s error: invalid option descriptor for %s\n"));
  2019. #line 1084 "../usage.c"
  2020. puts(_("%s error: invalid option descriptor for %s\n"));
  2021. #line 385 "../find.c"
  2022. puts(_("%s: invalid option name: %s\n"));
  2023. #line 527 "../find.c"
  2024. puts(_("%s: The '%s' option requires an argument.\n"));
  2025. #line 156 "../autoopts.c"
  2026. puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
  2027. "\t'%s' and '%s'."));
  2028. #line 94 "../check.c"
  2029. puts(_("%s error: The %s option is required\n"));
  2030. #line 632 "../find.c"
  2031. puts(_("%s: The '%s' option cannot have an argument.\n"));
  2032. #line 151 "../check.c"
  2033. puts(_("%s: Command line arguments are not allowed.\n"));
  2034. #line 536 "../save.c"
  2035. puts(_("error %d (%s) creating %s\n"));
  2036. #line 235 "../enum.c"
  2037. puts(_("%s error: '%s' does not match any %s keywords.\n"));
  2038. #line 93 "../reset.c"
  2039. puts(_("%s error: The '%s' option requires an argument.\n"));
  2040. #line 186 "../save.c"
  2041. puts(_("error %d (%s) stat-ing %s\n"));
  2042. #line 239 "../save.c"
  2043. puts(_("error %d (%s) stat-ing %s\n"));
  2044. #line 143 "../restore.c"
  2045. puts(_("%s error: no saved option state\n"));
  2046. #line 231 "../autoopts.c"
  2047. puts(_("'%s' is not a command line option.\n"));
  2048. #line 113 "../time.c"
  2049. puts(_("%s error: '%s' is not a recognizable date/time.\n"));
  2050. #line 131 "../save.c"
  2051. puts(_("'%s' not defined\n"));
  2052. #line 50 "../time.c"
  2053. puts(_("%s error: '%s' is not a recognizable time duration.\n"));
  2054. #line 92 "../check.c"
  2055. puts(_("%s error: The %s option must appear %d times.\n"));
  2056. #line 165 "../numeric.c"
  2057. puts(_("%s error: '%s' is not a recognizable number.\n"));
  2058. #line 201 "../enum.c"
  2059. puts(_("%s error: %s exceeds %s keyword count\n"));
  2060. #line 333 "../usage.c"
  2061. puts(_("Try '%s %s' for more information.\n"));
  2062. #line 45 "../alias.c"
  2063. puts(_("one %s%s option allowed\n"));
  2064. #line 208 "../makeshell.c"
  2065. puts(_("standard output"));
  2066. #line 943 "../makeshell.c"
  2067. puts(_("standard output"));
  2068. #line 277 "../usage.c"
  2069. puts(_("standard output"));
  2070. #line 418 "../usage.c"
  2071. puts(_("standard output"));
  2072. #line 628 "../usage.c"
  2073. puts(_("standard output"));
  2074. #line 175 "../version.c"
  2075. puts(_("standard output"));
  2076. #line 277 "../usage.c"
  2077. puts(_("standard error"));
  2078. #line 418 "../usage.c"
  2079. puts(_("standard error"));
  2080. #line 628 "../usage.c"
  2081. puts(_("standard error"));
  2082. #line 175 "../version.c"
  2083. puts(_("standard error"));
  2084. #line 208 "../makeshell.c"
  2085. puts(_("write"));
  2086. #line 943 "../makeshell.c"
  2087. puts(_("write"));
  2088. #line 276 "../usage.c"
  2089. puts(_("write"));
  2090. #line 417 "../usage.c"
  2091. puts(_("write"));
  2092. #line 627 "../usage.c"
  2093. puts(_("write"));
  2094. #line 174 "../version.c"
  2095. puts(_("write"));
  2096. #line 60 "../numeric.c"
  2097. puts(_("%s error: %s option value %ld is out of range.\n"));
  2098. #line 44 "../check.c"
  2099. puts(_("%s error: %s option requires the %s option\n"));
  2100. #line 130 "../save.c"
  2101. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2102. #line 185 "../save.c"
  2103. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2104. #line 238 "../save.c"
  2105. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2106. #line 257 "../save.c"
  2107. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2108. #line 535 "../save.c"
  2109. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2110. /* END-LIBOPTS-MESSAGES */
  2111. /* USAGE-TEXT: */
  2112. #line 876 "../usage.c"
  2113. puts(_("\t\t\t\t- an alternate for '%s'\n"));
  2114. #line 1151 "../usage.c"
  2115. puts(_("Version, usage and configuration options:"));
  2116. #line 927 "../usage.c"
  2117. puts(_("\t\t\t\t- default option for unnamed options\n"));
  2118. #line 840 "../usage.c"
  2119. puts(_("\t\t\t\t- disabled as '--%s'\n"));
  2120. #line 1120 "../usage.c"
  2121. puts(_(" --- %-14s %s\n"));
  2122. #line 1118 "../usage.c"
  2123. puts(_("This option has been disabled"));
  2124. #line 867 "../usage.c"
  2125. puts(_("\t\t\t\t- enabled by default\n"));
  2126. #line 40 "../alias.c"
  2127. puts(_("%s error: only "));
  2128. #line 1197 "../usage.c"
  2129. puts(_(" - examining environment variables named %s_*\n"));
  2130. #line 168 "../file.c"
  2131. puts(_("\t\t\t\t- file must not pre-exist\n"));
  2132. #line 172 "../file.c"
  2133. puts(_("\t\t\t\t- file must pre-exist\n"));
  2134. #line 383 "../usage.c"
  2135. puts(_("Options are specified by doubled hyphens and their name or by a single\n"
  2136. "hyphen and the flag character.\n"));
  2137. #line 921 "../makeshell.c"
  2138. puts(_("\n"
  2139. "= = = = = = = =\n\n"
  2140. "This incarnation of genshell will produce\n"
  2141. "a shell script to parse the options for %s:\n\n"));
  2142. #line 167 "../enum.c"
  2143. puts(_(" or an integer mask with any of the lower %d bits set\n"));
  2144. #line 900 "../usage.c"
  2145. puts(_("\t\t\t\t- is a set membership option\n"));
  2146. #line 921 "../usage.c"
  2147. puts(_("\t\t\t\t- must appear between %d and %d times\n"));
  2148. #line 385 "../usage.c"
  2149. puts(_("Options are specified by single or double hyphens and their name.\n"));
  2150. #line 907 "../usage.c"
  2151. puts(_("\t\t\t\t- may appear multiple times\n"));
  2152. #line 894 "../usage.c"
  2153. puts(_("\t\t\t\t- may not be preset\n"));
  2154. #line 1312 "../usage.c"
  2155. puts(_(" Arg Option-Name Description\n"));
  2156. #line 1248 "../usage.c"
  2157. puts(_(" Flg Arg Option-Name Description\n"));
  2158. #line 1306 "../usage.c"
  2159. puts(_(" Flg Arg Option-Name Description\n"));
  2160. #line 1307 "../usage.c"
  2161. puts(_(" %3s %s"));
  2162. #line 1313 "../usage.c"
  2163. puts(_(" %3s %s"));
  2164. #line 390 "../usage.c"
  2165. puts(_("The '-#<number>' option may omit the hash char\n"));
  2166. #line 386 "../usage.c"
  2167. puts(_("All arguments are named options.\n"));
  2168. #line 974 "../usage.c"
  2169. puts(_(" - reading file %s"));
  2170. #line 412 "../usage.c"
  2171. puts(_("\n"
  2172. "Please send bug reports to: <%s>\n"));
  2173. #line 100 "../version.c"
  2174. puts(_("\n"
  2175. "Please send bug reports to: <%s>\n"));
  2176. #line 129 "../version.c"
  2177. puts(_("\n"
  2178. "Please send bug reports to: <%s>\n"));
  2179. #line 906 "../usage.c"
  2180. puts(_("\t\t\t\t- may NOT appear - preset only\n"));
  2181. #line 947 "../usage.c"
  2182. puts(_("\n"
  2183. "The following option preset mechanisms are supported:\n"));
  2184. #line 1195 "../usage.c"
  2185. puts(_("\n"
  2186. "The following option preset mechanisms are supported:\n"));
  2187. #line 685 "../usage.c"
  2188. puts(_("prohibits these options:\n"));
  2189. #line 680 "../usage.c"
  2190. puts(_("prohibits the option '%s'\n"));
  2191. #line 81 "../numeric.c"
  2192. puts(_("%s%ld to %ld"));
  2193. #line 79 "../numeric.c"
  2194. puts(_("%sgreater than or equal to %ld"));
  2195. #line 75 "../numeric.c"
  2196. puts(_("%s%ld exactly"));
  2197. #line 68 "../numeric.c"
  2198. puts(_("%sit must lie in one of the ranges:\n"));
  2199. #line 68 "../numeric.c"
  2200. puts(_("%sit must be in the range:\n"));
  2201. #line 88 "../numeric.c"
  2202. puts(_(", or\n"));
  2203. #line 66 "../numeric.c"
  2204. puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
  2205. #line 77 "../numeric.c"
  2206. puts(_("%sless than or equal to %ld"));
  2207. #line 393 "../usage.c"
  2208. puts(_("Operands and options may be intermixed. They will be reordered.\n"));
  2209. #line 655 "../usage.c"
  2210. puts(_("requires the option '%s'\n"));
  2211. #line 658 "../usage.c"
  2212. puts(_("requires these options:\n"));
  2213. #line 1324 "../usage.c"
  2214. puts(_(" Arg Option-Name Req? Description\n"));
  2215. #line 1318 "../usage.c"
  2216. puts(_(" Flg Arg Option-Name Req? Description\n"));
  2217. #line 168 "../enum.c"
  2218. puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
  2219. "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
  2220. "will set them all. Multiple entries may be passed as an option\n"
  2221. "argument list.\n"));
  2222. #line 913 "../usage.c"
  2223. puts(_("\t\t\t\t- may appear up to %d times\n"));
  2224. #line 77 "../enum.c"
  2225. puts(_("The valid \"%s\" option keywords are:\n"));
  2226. #line 1155 "../usage.c"
  2227. puts(_("The next option supports vendor supported extra options:"));
  2228. #line 776 "../usage.c"
  2229. puts(_("These additional options are:"));
  2230. /* END-USAGE-TEXT */
  2231. }
  2232. #endif /* uncompilable code */
  2233. #ifdef __cplusplus
  2234. }
  2235. #endif
  2236. /* tcpreplay_opts.c ends here */