tcpreplay_opts.c 89 KB

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