tcpreplay_edit_opts.c 144 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920
  1. /* -*- buffer-read-only: t -*- vi: set ro:
  2. *
  3. * DO NOT EDIT THIS FILE (tcpreplay_edit_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:0: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-2017 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_edit_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[5865] =
  71. /* 0 */ "tcpreplay (tcpreplay)\n"
  72. "Copyright (C) 2000-2017 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 */ ":\0"
  87. /* 892 */ "Rewrite TCP/UDP ports\0"
  88. /* 914 */ "PORTMAP\0"
  89. /* 922 */ "portmap\0"
  90. /* 930 */ "Randomize src/dst IPv4/v6 addresses w/ given seed\0"
  91. /* 980 */ "SEED\0"
  92. /* 985 */ "seed\0"
  93. /* 990 */ "Rewrite IPv4/v6 addresses using pseudo-NAT\0"
  94. /* 1033 */ "PNAT\0"
  95. /* 1038 */ "pnat\0"
  96. /* 1043 */ "Rewrite source IPv4/v6 addresses using pseudo-NAT\0"
  97. /* 1093 */ "SRCIPMAP\0"
  98. /* 1102 */ "srcipmap\0"
  99. /* 1111 */ "Rewrite destination IPv4/v6 addresses using pseudo-NAT\0"
  100. /* 1166 */ "DSTIPMAP\0"
  101. /* 1175 */ "dstipmap\0"
  102. /* 1184 */ "Rewrite IP addresses to be between two endpoints\0"
  103. /* 1233 */ "ENDPOINTS\0"
  104. /* 1243 */ "endpoints\0"
  105. /* 1253 */ "Skip rewriting broadcast/multicast IPv4/v6 addresses\0"
  106. /* 1306 */ "SKIPBROADCAST\0"
  107. /* 1320 */ "skipbroadcast\0"
  108. /* 1334 */ "Force recalculation of IPv4/TCP/UDP header checksums\0"
  109. /* 1387 */ "FIXCSUM\0"
  110. /* 1395 */ "fixcsum\0"
  111. /* 1403 */ "Override default MTU length (1500 bytes)\0"
  112. /* 1444 */ "MTU\0"
  113. /* 1448 */ "mtu\0"
  114. /* 1452 */ "Truncate packets larger then specified MTU\0"
  115. /* 1495 */ "MTU_TRUNC\0"
  116. /* 1505 */ "mtu-trunc\0"
  117. /* 1515 */ "Remove Ethernet checksums (FCS) from end of frames\0"
  118. /* 1566 */ "EFCS\0"
  119. /* 1571 */ "efcs\0"
  120. /* 1576 */ "Modify the IPv4/v6 TTL/Hop Limit\0"
  121. /* 1609 */ "TTL\0"
  122. /* 1613 */ "ttl\0"
  123. /* 1617 */ "Set the IPv4 TOS/DiffServ/ECN byte\0"
  124. /* 1652 */ "TOS\0"
  125. /* 1656 */ "tos\0"
  126. /* 1660 */ "Set the IPv6 Traffic Class byte\0"
  127. /* 1692 */ "TCLASS\0"
  128. /* 1699 */ "tclass\0"
  129. /* 1706 */ "Set the IPv6 Flow Label\0"
  130. /* 1730 */ "FLOWLABEL\0"
  131. /* 1740 */ "flowlabel\0"
  132. /* 1750 */ "Pad or truncate packet data to match header length\0"
  133. /* 1801 */ "FIXLEN\0"
  134. /* 1808 */ "fixlen\0"
  135. /* 1815 */ "Fuzz 1 in X packets. Edit bytes, length, or emulate packet drop\0"
  136. /* 1880 */ "FUZZ_SEED\0"
  137. /* 1890 */ "fuzz-seed\0"
  138. /* 1900 */ "Set the Fuzz 1 in X packet ratio (default 1 in 8 packets)\0"
  139. /* 1958 */ "FUZZ_FACTOR\0"
  140. /* 1970 */ "fuzz-factor\0"
  141. /* 1982 */ "Skip rewriting broadcast/multicast Layer 2 addresses\0"
  142. /* 2035 */ "SKIPL2BROADCAST\0"
  143. /* 2051 */ "skipl2broadcast\0"
  144. /* 2067 */ "Override output DLT encapsulation\0"
  145. /* 2101 */ "DLT\0"
  146. /* 2105 */ "dlt\0"
  147. /* 2109 */ "Override destination ethernet MAC addresses\0"
  148. /* 2153 */ "ENET_DMAC\0"
  149. /* 2163 */ "enet-dmac\0"
  150. /* 2173 */ "Override source ethernet MAC addresses\0"
  151. /* 2212 */ "ENET_SMAC\0"
  152. /* 2222 */ "enet-smac\0"
  153. /* 2232 */ "Substitute MAC addresses\0"
  154. /* 2257 */ "ENET_SUBSMAC\0"
  155. /* 2270 */ "enet-subsmac\0"
  156. /* 2283 */ "Randomize MAC addresses\0"
  157. /* 2307 */ "ENET_MAC_SEED\0"
  158. /* 2321 */ "enet-mac-seed\0"
  159. /* 2335 */ "ENET_MAC_SEED_KEEP_BYTES\0"
  160. /* 2360 */ "enet-mac-seed-keep-bytes\0"
  161. /* 2385 */ "Specify ethernet 802.1q VLAN tag mode\0"
  162. /* 2423 */ "ENET_VLAN\0"
  163. /* 2433 */ "enet-vlan\0"
  164. /* 2443 */ "Specify the new ethernet 802.1q VLAN tag value\0"
  165. /* 2490 */ "ENET_VLAN_TAG\0"
  166. /* 2504 */ "enet-vlan-tag\0"
  167. /* 2518 */ "Specify the ethernet 802.1q VLAN CFI value\0"
  168. /* 2561 */ "ENET_VLAN_CFI\0"
  169. /* 2575 */ "enet-vlan-cfi\0"
  170. /* 2589 */ "Specify the ethernet 802.1q VLAN priority\0"
  171. /* 2631 */ "ENET_VLAN_PRI\0"
  172. /* 2645 */ "enet-vlan-pri\0"
  173. /* 2659 */ "Specify HDLC control value\0"
  174. /* 2686 */ "HDLC_CONTROL\0"
  175. /* 2699 */ "hdlc-control\0"
  176. /* 2712 */ "Specify HDLC address\0"
  177. /* 2733 */ "HDLC_ADDRESS\0"
  178. /* 2746 */ "hdlc-address\0"
  179. /* 2759 */ "Set output file DLT type\0"
  180. /* 2784 */ "USER_DLT\0"
  181. /* 2793 */ "user-dlt\0"
  182. /* 2802 */ "Rewrite Data-Link layer with user specified data\0"
  183. /* 2851 */ "USER_DLINK\0"
  184. /* 2862 */ "user-dlink\0"
  185. /* 2873 */ "Enable debugging output\0"
  186. /* 2897 */ "DBUG\0"
  187. /* 2902 */ "dbug\0"
  188. /* 2907 */ "Quiet mode\0"
  189. /* 2918 */ "QUIET\0"
  190. /* 2924 */ "quiet\0"
  191. /* 2930 */ "Select packet timing mode: select, ioport, gtod, nano\0"
  192. /* 2984 */ "TIMER\0"
  193. /* 2990 */ "timer\0"
  194. /* 2996 */ "gtod\0"
  195. /* 3001 */ "Sleep for no more then X milliseconds between packets\0"
  196. /* 3055 */ "MAXSLEEP\0"
  197. /* 3064 */ "maxsleep\0"
  198. /* 3073 */ "Print decoded packets via tcpdump to STDOUT\0"
  199. /* 3117 */ "VERBOSE\0"
  200. /* 3125 */ "verbose\0"
  201. /* 3133 */ "Arguments passed to tcpdump decoder\0"
  202. /* 3169 */ "DECODE\0"
  203. /* 3176 */ "decode\0"
  204. /* 3183 */ "Preloads packets into RAM before sending\0"
  205. /* 3224 */ "PRELOAD_PCAP\0"
  206. /* 3237 */ "preload-pcap\0"
  207. /* 3250 */ "Split traffic via a tcpprep cache file\0"
  208. /* 3289 */ "CACHEFILE\0"
  209. /* 3299 */ "cachefile\0"
  210. /* 3309 */ "Replay two files at a time from a network tap\0"
  211. /* 3355 */ "DUALFILE\0"
  212. /* 3364 */ "dualfile\0"
  213. /* 3373 */ "Client to server/RX/primary traffic output interface\0"
  214. /* 3426 */ "INTF1\0"
  215. /* 3432 */ "intf1\0"
  216. /* 3438 */ "Server to client/TX/secondary traffic output interface\0"
  217. /* 3493 */ "INTF2\0"
  218. /* 3499 */ "intf2\0"
  219. /* 3505 */ "List available network interfaces and exit\0"
  220. /* 3548 */ "LISTNICS\0"
  221. /* 3557 */ "listnics\0"
  222. /* 3566 */ "Loop through the capture file X times\0"
  223. /* 3604 */ "LOOP\0"
  224. /* 3609 */ "loop\0"
  225. /* 3614 */ "Delay between loops in milliseconds\0"
  226. /* 3650 */ "LOOPDELAY_MS\0"
  227. /* 3663 */ "loopdelay-ms\0"
  228. /* 3676 */ "Override the snaplen and use the actual packet len\0"
  229. /* 3727 */ "PKTLEN\0"
  230. /* 3734 */ "pktlen\0"
  231. /* 3741 */ "Limit the number of packets to send\0"
  232. /* 3777 */ "LIMIT\0"
  233. /* 3783 */ "limit\0"
  234. /* 3789 */ "Limit the number of seconds to send\0"
  235. /* 3825 */ "DURATION\0"
  236. /* 3834 */ "duration\0"
  237. /* 3843 */ "Modify replay speed to a given multiple\0"
  238. /* 3883 */ "MULTIPLIER\0"
  239. /* 3894 */ "multiplier\0"
  240. /* 3905 */ "Replay packets at a given packets/sec\0"
  241. /* 3943 */ "PPS\0"
  242. /* 3947 */ "pps\0"
  243. /* 3951 */ "Replay packets at a given Mbps\0"
  244. /* 3982 */ "MBPS\0"
  245. /* 3987 */ "mbps\0"
  246. /* 3992 */ "Replay packets as fast as possible\0"
  247. /* 4027 */ "TOPSPEED\0"
  248. /* 4036 */ "topspeed\0"
  249. /* 4045 */ "Replay one packet at a time for each user input\0"
  250. /* 4093 */ "ONEATATIME\0"
  251. /* 4104 */ "oneatatime\0"
  252. /* 4115 */ "Number of packets to send for each time interval\0"
  253. /* 4164 */ "PPS_MULTI\0"
  254. /* 4174 */ "pps-multi\0"
  255. /* 4184 */ "Modify IP addresses each loop iteration to generate unique flows\0"
  256. /* 4249 */ "UNIQUE_IP\0"
  257. /* 4259 */ "unique-ip\0"
  258. /* 4269 */ "Number of times to loop before assigning new unique ip\0"
  259. /* 4324 */ "UNIQUE_IP_LOOPS\0"
  260. /* 4340 */ "unique-ip-loops\0"
  261. /* 4356 */ "Write packets directly to netmap enabled network adapter\0"
  262. /* 4413 */ "NETMAP\0"
  263. /* 4420 */ "netmap\0"
  264. /* 4427 */ "Netmap startup delay\0"
  265. /* 4448 */ "NM_DELAY\0"
  266. /* 4457 */ "nm-delay\0"
  267. /* 4466 */ "Suppress printing and tracking flow count, rates and expirations\0"
  268. /* 4531 */ "NO_FLOW_STATS\0"
  269. /* 4545 */ "no-flow-stats\0"
  270. /* 4559 */ "Number of inactive seconds before a flow is considered expired\0"
  271. /* 4622 */ "FLOW_EXPIRY\0"
  272. /* 4634 */ "flow-expiry\0"
  273. /* 4646 */ "Print the PID of tcpreplay at startup\0"
  274. /* 4684 */ "PID\0"
  275. /* 4688 */ "pid\0"
  276. /* 4692 */ "Print statistics every X seconds, or every loop if '0'\0"
  277. /* 4747 */ "STATS\0"
  278. /* 4753 */ "stats\0"
  279. /* 4759 */ "Print version information\0"
  280. /* 4785 */ "VERSION\0"
  281. /* 4793 */ "version\0"
  282. /* 4801 */ "Display less usage information and exit\0"
  283. /* 4841 */ "LESS_HELP\0"
  284. /* 4851 */ "less-help\0"
  285. /* 4861 */ "display extended usage information and exit\0"
  286. /* 4905 */ "help\0"
  287. /* 4910 */ "extended usage information passed thru pager\0"
  288. /* 4955 */ "more-help\0"
  289. /* 4965 */ "save the option state to a config file\0"
  290. /* 5004 */ "save-opts\0"
  291. /* 5014 */ "load options from a config file\0"
  292. /* 5046 */ "LOAD_OPTS\0"
  293. /* 5056 */ "no-load-opts\0"
  294. /* 5069 */ "no\0"
  295. /* 5072 */ "TCPREPLAY\0"
  296. /* 5082 */ "tcpreplay (tcpreplay) - Replay network traffic stored in pcap files\n"
  297. "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... <pcap_file(s)>\n\0"
  298. /* 5223 */ "$$/\0"
  299. /* 5227 */ ".tcpreplayrc\0"
  300. /* 5240 */ "tcpreplay-users@lists.sourceforge.net\0"
  301. /* 5278 */ "tcpreplay is a tool for replaying network traffic from files saved with\n"
  302. "tcpdump or other tools which write pcap(3) files.\n\0"
  303. /* 5401 */ "The basic operation of tcpreplay is to resend all packets from the input\n"
  304. "file(s) at the speed at which they were recorded, or a specified data rate,\n"
  305. "up to as fast as the hardware is capable.\n\n"
  306. "Optionally, the traffic can be split between two interfaces, written to\n"
  307. "files, filtered and edited in various ways, providing the means to test\n"
  308. "firewalls, NIDS and other network devices.\n\n"
  309. "For more details, please see the Tcpreplay Manual at:\n"
  310. "http://tcpreplay.appneta.com\n";
  311. /**
  312. * tcpedit option description:
  313. */
  314. /** tcpedit option separation text */
  315. #define TCPEDIT_DESC (tcpreplay_opt_strs+890)
  316. #define TCPEDIT_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT)
  317. /**
  318. * portmap option description:
  319. */
  320. /** Descriptive text for the portmap option */
  321. #define PORTMAP_DESC (tcpreplay_opt_strs+892)
  322. /** Upper-cased name for the portmap option */
  323. #define PORTMAP_NAME (tcpreplay_opt_strs+914)
  324. /** Name string for the portmap option */
  325. #define PORTMAP_name (tcpreplay_opt_strs+922)
  326. /** Compiled in flag settings for the portmap option */
  327. #define PORTMAP_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  328. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  329. /**
  330. * seed option description with
  331. * "Must also have options" and "Incompatible options":
  332. */
  333. /** Descriptive text for the seed option */
  334. #define SEED_DESC (tcpreplay_opt_strs+930)
  335. /** Upper-cased name for the seed option */
  336. #define SEED_NAME (tcpreplay_opt_strs+980)
  337. /** Name string for the seed option */
  338. #define SEED_name (tcpreplay_opt_strs+985)
  339. /** Other options that appear in conjunction with the seed option */
  340. static int const aSeedCantList[] = {
  341. INDEX_OPT_FUZZ_SEED, NO_EQUIVALENT };
  342. /** Compiled in flag settings for the seed option */
  343. #define SEED_FLAGS (OPTST_DISABLED \
  344. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  345. /**
  346. * pnat option description with
  347. * "Must also have options" and "Incompatible options":
  348. */
  349. /** Descriptive text for the pnat option */
  350. #define PNAT_DESC (tcpreplay_opt_strs+990)
  351. /** Upper-cased name for the pnat option */
  352. #define PNAT_NAME (tcpreplay_opt_strs+1033)
  353. /** Name string for the pnat option */
  354. #define PNAT_name (tcpreplay_opt_strs+1038)
  355. /** Other options that appear in conjunction with the pnat option */
  356. static int const aPnatCantList[] = {
  357. INDEX_OPT_SRCIPMAP, NO_EQUIVALENT };
  358. /** Compiled in flag settings for the pnat option */
  359. #define PNAT_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  360. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  361. /**
  362. * srcipmap option description with
  363. * "Must also have options" and "Incompatible options":
  364. */
  365. /** Descriptive text for the srcipmap option */
  366. #define SRCIPMAP_DESC (tcpreplay_opt_strs+1043)
  367. /** Upper-cased name for the srcipmap option */
  368. #define SRCIPMAP_NAME (tcpreplay_opt_strs+1093)
  369. /** Name string for the srcipmap option */
  370. #define SRCIPMAP_name (tcpreplay_opt_strs+1102)
  371. /** Other options that appear in conjunction with the srcipmap option */
  372. static int const aSrcipmapCantList[] = {
  373. INDEX_OPT_PNAT, NO_EQUIVALENT };
  374. /** Compiled in flag settings for the srcipmap option */
  375. #define SRCIPMAP_FLAGS (OPTST_DISABLED \
  376. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  377. /**
  378. * dstipmap option description with
  379. * "Must also have options" and "Incompatible options":
  380. */
  381. /** Descriptive text for the dstipmap option */
  382. #define DSTIPMAP_DESC (tcpreplay_opt_strs+1111)
  383. /** Upper-cased name for the dstipmap option */
  384. #define DSTIPMAP_NAME (tcpreplay_opt_strs+1166)
  385. /** Name string for the dstipmap option */
  386. #define DSTIPMAP_name (tcpreplay_opt_strs+1175)
  387. /** Other options that appear in conjunction with the dstipmap option */
  388. static int const aDstipmapCantList[] = {
  389. INDEX_OPT_PNAT, NO_EQUIVALENT };
  390. /** Compiled in flag settings for the dstipmap option */
  391. #define DSTIPMAP_FLAGS (OPTST_DISABLED \
  392. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  393. /**
  394. * endpoints option description with
  395. * "Must also have options" and "Incompatible options":
  396. */
  397. #ifdef HAVE_CACHEFILE_SUPPORT
  398. /** Descriptive text for the endpoints option */
  399. #define ENDPOINTS_DESC (tcpreplay_opt_strs+1184)
  400. /** Upper-cased name for the endpoints option */
  401. #define ENDPOINTS_NAME (tcpreplay_opt_strs+1233)
  402. /** Name string for the endpoints option */
  403. #define ENDPOINTS_name (tcpreplay_opt_strs+1243)
  404. /** Other options that are required by the endpoints option */
  405. static int const aEndpointsMustList[] = {
  406. INDEX_OPT_CACHEFILE, NO_EQUIVALENT };
  407. /** Compiled in flag settings for the endpoints option */
  408. #define ENDPOINTS_FLAGS (OPTST_DISABLED \
  409. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  410. #else /* disable endpoints */
  411. #define ENDPOINTS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  412. #define aEndpointsMustList NULL
  413. #define ENDPOINTS_NAME NULL
  414. #define ENDPOINTS_DESC NULL
  415. #define ENDPOINTS_name NULL
  416. #endif /* HAVE_CACHEFILE_SUPPORT */
  417. /**
  418. * skipbroadcast option description:
  419. */
  420. /** Descriptive text for the skipbroadcast option */
  421. #define SKIPBROADCAST_DESC (tcpreplay_opt_strs+1253)
  422. /** Upper-cased name for the skipbroadcast option */
  423. #define SKIPBROADCAST_NAME (tcpreplay_opt_strs+1306)
  424. /** Name string for the skipbroadcast option */
  425. #define SKIPBROADCAST_name (tcpreplay_opt_strs+1320)
  426. /** Compiled in flag settings for the skipbroadcast option */
  427. #define SKIPBROADCAST_FLAGS (OPTST_DISABLED)
  428. /**
  429. * fixcsum option description:
  430. */
  431. /** Descriptive text for the fixcsum option */
  432. #define FIXCSUM_DESC (tcpreplay_opt_strs+1334)
  433. /** Upper-cased name for the fixcsum option */
  434. #define FIXCSUM_NAME (tcpreplay_opt_strs+1387)
  435. /** Name string for the fixcsum option */
  436. #define FIXCSUM_name (tcpreplay_opt_strs+1395)
  437. /** Compiled in flag settings for the fixcsum option */
  438. #define FIXCSUM_FLAGS (OPTST_DISABLED)
  439. /**
  440. * mtu option description:
  441. */
  442. /** Descriptive text for the mtu option */
  443. #define MTU_DESC (tcpreplay_opt_strs+1403)
  444. /** Upper-cased name for the mtu option */
  445. #define MTU_NAME (tcpreplay_opt_strs+1444)
  446. /** Name string for the mtu option */
  447. #define MTU_name (tcpreplay_opt_strs+1448)
  448. /** Compiled in flag settings for the mtu option */
  449. #define MTU_FLAGS (OPTST_DISABLED \
  450. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  451. /**
  452. * mtu-trunc option description:
  453. */
  454. /** Descriptive text for the mtu-trunc option */
  455. #define MTU_TRUNC_DESC (tcpreplay_opt_strs+1452)
  456. /** Upper-cased name for the mtu-trunc option */
  457. #define MTU_TRUNC_NAME (tcpreplay_opt_strs+1495)
  458. /** Name string for the mtu-trunc option */
  459. #define MTU_TRUNC_name (tcpreplay_opt_strs+1505)
  460. /** Compiled in flag settings for the mtu-trunc option */
  461. #define MTU_TRUNC_FLAGS (OPTST_DISABLED)
  462. /**
  463. * efcs option description:
  464. */
  465. /** Descriptive text for the efcs option */
  466. #define EFCS_DESC (tcpreplay_opt_strs+1515)
  467. /** Upper-cased name for the efcs option */
  468. #define EFCS_NAME (tcpreplay_opt_strs+1566)
  469. /** Name string for the efcs option */
  470. #define EFCS_name (tcpreplay_opt_strs+1571)
  471. /** Compiled in flag settings for the efcs option */
  472. #define EFCS_FLAGS (OPTST_DISABLED)
  473. /**
  474. * ttl option description:
  475. */
  476. /** Descriptive text for the ttl option */
  477. #define TTL_DESC (tcpreplay_opt_strs+1576)
  478. /** Upper-cased name for the ttl option */
  479. #define TTL_NAME (tcpreplay_opt_strs+1609)
  480. /** Name string for the ttl option */
  481. #define TTL_name (tcpreplay_opt_strs+1613)
  482. /** Compiled in flag settings for the ttl option */
  483. #define TTL_FLAGS (OPTST_DISABLED \
  484. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  485. /**
  486. * tos option description:
  487. */
  488. /** Descriptive text for the tos option */
  489. #define TOS_DESC (tcpreplay_opt_strs+1617)
  490. /** Upper-cased name for the tos option */
  491. #define TOS_NAME (tcpreplay_opt_strs+1652)
  492. /** Name string for the tos option */
  493. #define TOS_name (tcpreplay_opt_strs+1656)
  494. /** Compiled in flag settings for the tos option */
  495. #define TOS_FLAGS (OPTST_DISABLED \
  496. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  497. /**
  498. * tclass option description:
  499. */
  500. /** Descriptive text for the tclass option */
  501. #define TCLASS_DESC (tcpreplay_opt_strs+1660)
  502. /** Upper-cased name for the tclass option */
  503. #define TCLASS_NAME (tcpreplay_opt_strs+1692)
  504. /** Name string for the tclass option */
  505. #define TCLASS_name (tcpreplay_opt_strs+1699)
  506. /** Compiled in flag settings for the tclass option */
  507. #define TCLASS_FLAGS (OPTST_DISABLED \
  508. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  509. /**
  510. * flowlabel option description:
  511. */
  512. /** Descriptive text for the flowlabel option */
  513. #define FLOWLABEL_DESC (tcpreplay_opt_strs+1706)
  514. /** Upper-cased name for the flowlabel option */
  515. #define FLOWLABEL_NAME (tcpreplay_opt_strs+1730)
  516. /** Name string for the flowlabel option */
  517. #define FLOWLABEL_name (tcpreplay_opt_strs+1740)
  518. /** Compiled in flag settings for the flowlabel option */
  519. #define FLOWLABEL_FLAGS (OPTST_DISABLED \
  520. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  521. /**
  522. * fixlen option description:
  523. */
  524. /** Descriptive text for the fixlen option */
  525. #define FIXLEN_DESC (tcpreplay_opt_strs+1750)
  526. /** Upper-cased name for the fixlen option */
  527. #define FIXLEN_NAME (tcpreplay_opt_strs+1801)
  528. /** Name string for the fixlen option */
  529. #define FIXLEN_name (tcpreplay_opt_strs+1808)
  530. /** Compiled in flag settings for the fixlen option */
  531. #define FIXLEN_FLAGS (OPTST_DISABLED \
  532. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  533. /**
  534. * fuzz-seed option description:
  535. */
  536. /** Descriptive text for the fuzz-seed option */
  537. #define FUZZ_SEED_DESC (tcpreplay_opt_strs+1815)
  538. /** Upper-cased name for the fuzz-seed option */
  539. #define FUZZ_SEED_NAME (tcpreplay_opt_strs+1880)
  540. /** Name string for the fuzz-seed option */
  541. #define FUZZ_SEED_name (tcpreplay_opt_strs+1890)
  542. /** The compiled in default value for the fuzz-seed option argument */
  543. #define FUZZ_SEED_DFT_ARG ((char const*)0)
  544. /** Compiled in flag settings for the fuzz-seed option */
  545. #define FUZZ_SEED_FLAGS (OPTST_DISABLED \
  546. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  547. /**
  548. * fuzz-factor option description with
  549. * "Must also have options" and "Incompatible options":
  550. */
  551. /** Descriptive text for the fuzz-factor option */
  552. #define FUZZ_FACTOR_DESC (tcpreplay_opt_strs+1900)
  553. /** Upper-cased name for the fuzz-factor option */
  554. #define FUZZ_FACTOR_NAME (tcpreplay_opt_strs+1958)
  555. /** Name string for the fuzz-factor option */
  556. #define FUZZ_FACTOR_name (tcpreplay_opt_strs+1970)
  557. /** The compiled in default value for the fuzz-factor option argument */
  558. #define FUZZ_FACTOR_DFT_ARG ((char const*)8)
  559. /** Other options that are required by the fuzz-factor option */
  560. static int const aFuzz_FactorMustList[] = {
  561. INDEX_OPT_FUZZ_SEED, NO_EQUIVALENT };
  562. /** Compiled in flag settings for the fuzz-factor option */
  563. #define FUZZ_FACTOR_FLAGS (OPTST_DISABLED \
  564. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  565. /**
  566. * skipl2broadcast option description:
  567. */
  568. /** Descriptive text for the skipl2broadcast option */
  569. #define SKIPL2BROADCAST_DESC (tcpreplay_opt_strs+1982)
  570. /** Upper-cased name for the skipl2broadcast option */
  571. #define SKIPL2BROADCAST_NAME (tcpreplay_opt_strs+2035)
  572. /** Name string for the skipl2broadcast option */
  573. #define SKIPL2BROADCAST_name (tcpreplay_opt_strs+2051)
  574. /** Compiled in flag settings for the skipl2broadcast option */
  575. #define SKIPL2BROADCAST_FLAGS (OPTST_DISABLED)
  576. /**
  577. * dlt option description:
  578. */
  579. /** Descriptive text for the dlt option */
  580. #define DLT_DESC (tcpreplay_opt_strs+2067)
  581. /** Upper-cased name for the dlt option */
  582. #define DLT_NAME (tcpreplay_opt_strs+2101)
  583. /** Name string for the dlt option */
  584. #define DLT_name (tcpreplay_opt_strs+2105)
  585. /** Compiled in flag settings for the dlt option */
  586. #define DLT_FLAGS (OPTST_DISABLED \
  587. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  588. /**
  589. * enet-dmac option description:
  590. */
  591. /** Descriptive text for the enet-dmac option */
  592. #define ENET_DMAC_DESC (tcpreplay_opt_strs+2109)
  593. /** Upper-cased name for the enet-dmac option */
  594. #define ENET_DMAC_NAME (tcpreplay_opt_strs+2153)
  595. /** Name string for the enet-dmac option */
  596. #define ENET_DMAC_name (tcpreplay_opt_strs+2163)
  597. /** Compiled in flag settings for the enet-dmac option */
  598. #define ENET_DMAC_FLAGS (OPTST_DISABLED \
  599. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  600. /**
  601. * enet-smac option description:
  602. */
  603. /** Descriptive text for the enet-smac option */
  604. #define ENET_SMAC_DESC (tcpreplay_opt_strs+2173)
  605. /** Upper-cased name for the enet-smac option */
  606. #define ENET_SMAC_NAME (tcpreplay_opt_strs+2212)
  607. /** Name string for the enet-smac option */
  608. #define ENET_SMAC_name (tcpreplay_opt_strs+2222)
  609. /** Compiled in flag settings for the enet-smac option */
  610. #define ENET_SMAC_FLAGS (OPTST_DISABLED \
  611. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  612. /**
  613. * enet-subsmac option description:
  614. */
  615. /** Descriptive text for the enet-subsmac option */
  616. #define ENET_SUBSMAC_DESC (tcpreplay_opt_strs+2232)
  617. /** Upper-cased name for the enet-subsmac option */
  618. #define ENET_SUBSMAC_NAME (tcpreplay_opt_strs+2257)
  619. /** Name string for the enet-subsmac option */
  620. #define ENET_SUBSMAC_name (tcpreplay_opt_strs+2270)
  621. /** Compiled in flag settings for the enet-subsmac option */
  622. #define ENET_SUBSMAC_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  623. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  624. /**
  625. * enet-mac-seed option description with
  626. * "Must also have options" and "Incompatible options":
  627. */
  628. /** Descriptive text for the enet-mac-seed option */
  629. #define ENET_MAC_SEED_DESC (tcpreplay_opt_strs+2283)
  630. /** Upper-cased name for the enet-mac-seed option */
  631. #define ENET_MAC_SEED_NAME (tcpreplay_opt_strs+2307)
  632. /** Name string for the enet-mac-seed option */
  633. #define ENET_MAC_SEED_name (tcpreplay_opt_strs+2321)
  634. /** Other options that appear in conjunction with the enet-mac-seed option */
  635. static int const aEnet_Mac_SeedCantList[] = {
  636. INDEX_OPT_ENET_SMAC,
  637. INDEX_OPT_ENET_DMAC,
  638. INDEX_OPT_ENET_SUBSMAC, NO_EQUIVALENT };
  639. /** Compiled in flag settings for the enet-mac-seed option */
  640. #define ENET_MAC_SEED_FLAGS (OPTST_DISABLED \
  641. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  642. /**
  643. * enet-mac-seed-keep-bytes option description with
  644. * "Must also have options" and "Incompatible options":
  645. */
  646. /** Descriptive text for the enet-mac-seed-keep-bytes option */
  647. #define ENET_MAC_SEED_KEEP_BYTES_DESC (tcpreplay_opt_strs+2283)
  648. /** Upper-cased name for the enet-mac-seed-keep-bytes option */
  649. #define ENET_MAC_SEED_KEEP_BYTES_NAME (tcpreplay_opt_strs+2335)
  650. /** Name string for the enet-mac-seed-keep-bytes option */
  651. #define ENET_MAC_SEED_KEEP_BYTES_name (tcpreplay_opt_strs+2360)
  652. /** Other options that are required by the enet-mac-seed-keep-bytes option */
  653. static int const aEnet_Mac_Seed_Keep_BytesMustList[] = {
  654. INDEX_OPT_ENET_MAC_SEED, NO_EQUIVALENT };
  655. /** Compiled in flag settings for the enet-mac-seed-keep-bytes option */
  656. #define ENET_MAC_SEED_KEEP_BYTES_FLAGS (OPTST_DISABLED \
  657. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  658. /**
  659. * enet-vlan option description:
  660. */
  661. /** Descriptive text for the enet-vlan option */
  662. #define ENET_VLAN_DESC (tcpreplay_opt_strs+2385)
  663. /** Upper-cased name for the enet-vlan option */
  664. #define ENET_VLAN_NAME (tcpreplay_opt_strs+2423)
  665. /** Name string for the enet-vlan option */
  666. #define ENET_VLAN_name (tcpreplay_opt_strs+2433)
  667. /** Compiled in flag settings for the enet-vlan option */
  668. #define ENET_VLAN_FLAGS (OPTST_DISABLED \
  669. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  670. /**
  671. * enet-vlan-tag option description with
  672. * "Must also have options" and "Incompatible options":
  673. */
  674. /** Descriptive text for the enet-vlan-tag option */
  675. #define ENET_VLAN_TAG_DESC (tcpreplay_opt_strs+2443)
  676. /** Upper-cased name for the enet-vlan-tag option */
  677. #define ENET_VLAN_TAG_NAME (tcpreplay_opt_strs+2490)
  678. /** Name string for the enet-vlan-tag option */
  679. #define ENET_VLAN_TAG_name (tcpreplay_opt_strs+2504)
  680. /** Other options that are required by the enet-vlan-tag option */
  681. static int const aEnet_Vlan_TagMustList[] = {
  682. INDEX_OPT_ENET_VLAN, NO_EQUIVALENT };
  683. /** Compiled in flag settings for the enet-vlan-tag option */
  684. #define ENET_VLAN_TAG_FLAGS (OPTST_DISABLED \
  685. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  686. /**
  687. * enet-vlan-cfi option description with
  688. * "Must also have options" and "Incompatible options":
  689. */
  690. /** Descriptive text for the enet-vlan-cfi option */
  691. #define ENET_VLAN_CFI_DESC (tcpreplay_opt_strs+2518)
  692. /** Upper-cased name for the enet-vlan-cfi option */
  693. #define ENET_VLAN_CFI_NAME (tcpreplay_opt_strs+2561)
  694. /** Name string for the enet-vlan-cfi option */
  695. #define ENET_VLAN_CFI_name (tcpreplay_opt_strs+2575)
  696. /** Other options that are required by the enet-vlan-cfi option */
  697. static int const aEnet_Vlan_CfiMustList[] = {
  698. INDEX_OPT_ENET_VLAN, NO_EQUIVALENT };
  699. /** Compiled in flag settings for the enet-vlan-cfi option */
  700. #define ENET_VLAN_CFI_FLAGS (OPTST_DISABLED \
  701. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  702. /**
  703. * enet-vlan-pri option description with
  704. * "Must also have options" and "Incompatible options":
  705. */
  706. /** Descriptive text for the enet-vlan-pri option */
  707. #define ENET_VLAN_PRI_DESC (tcpreplay_opt_strs+2589)
  708. /** Upper-cased name for the enet-vlan-pri option */
  709. #define ENET_VLAN_PRI_NAME (tcpreplay_opt_strs+2631)
  710. /** Name string for the enet-vlan-pri option */
  711. #define ENET_VLAN_PRI_name (tcpreplay_opt_strs+2645)
  712. /** Other options that are required by the enet-vlan-pri option */
  713. static int const aEnet_Vlan_PriMustList[] = {
  714. INDEX_OPT_ENET_VLAN, NO_EQUIVALENT };
  715. /** Compiled in flag settings for the enet-vlan-pri option */
  716. #define ENET_VLAN_PRI_FLAGS (OPTST_DISABLED \
  717. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  718. /**
  719. * hdlc-control option description:
  720. */
  721. /** Descriptive text for the hdlc-control option */
  722. #define HDLC_CONTROL_DESC (tcpreplay_opt_strs+2659)
  723. /** Upper-cased name for the hdlc-control option */
  724. #define HDLC_CONTROL_NAME (tcpreplay_opt_strs+2686)
  725. /** Name string for the hdlc-control option */
  726. #define HDLC_CONTROL_name (tcpreplay_opt_strs+2699)
  727. /** Compiled in flag settings for the hdlc-control option */
  728. #define HDLC_CONTROL_FLAGS (OPTST_DISABLED \
  729. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  730. /**
  731. * hdlc-address option description:
  732. */
  733. /** Descriptive text for the hdlc-address option */
  734. #define HDLC_ADDRESS_DESC (tcpreplay_opt_strs+2712)
  735. /** Upper-cased name for the hdlc-address option */
  736. #define HDLC_ADDRESS_NAME (tcpreplay_opt_strs+2733)
  737. /** Name string for the hdlc-address option */
  738. #define HDLC_ADDRESS_name (tcpreplay_opt_strs+2746)
  739. /** Compiled in flag settings for the hdlc-address option */
  740. #define HDLC_ADDRESS_FLAGS (OPTST_DISABLED \
  741. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  742. /**
  743. * user-dlt option description:
  744. */
  745. /** Descriptive text for the user-dlt option */
  746. #define USER_DLT_DESC (tcpreplay_opt_strs+2759)
  747. /** Upper-cased name for the user-dlt option */
  748. #define USER_DLT_NAME (tcpreplay_opt_strs+2784)
  749. /** Name string for the user-dlt option */
  750. #define USER_DLT_name (tcpreplay_opt_strs+2793)
  751. /** Compiled in flag settings for the user-dlt option */
  752. #define USER_DLT_FLAGS (OPTST_DISABLED \
  753. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  754. /**
  755. * user-dlink option description:
  756. */
  757. /** Descriptive text for the user-dlink option */
  758. #define USER_DLINK_DESC (tcpreplay_opt_strs+2802)
  759. /** Upper-cased name for the user-dlink option */
  760. #define USER_DLINK_NAME (tcpreplay_opt_strs+2851)
  761. /** Name string for the user-dlink option */
  762. #define USER_DLINK_name (tcpreplay_opt_strs+2862)
  763. /** Compiled in flag settings for the user-dlink option */
  764. #define USER_DLINK_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  765. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  766. /**
  767. * dbug option description:
  768. */
  769. #ifdef DEBUG
  770. /** Descriptive text for the dbug option */
  771. #define DBUG_DESC (tcpreplay_opt_strs+2873)
  772. /** Upper-cased name for the dbug option */
  773. #define DBUG_NAME (tcpreplay_opt_strs+2897)
  774. /** Name string for the dbug option */
  775. #define DBUG_name (tcpreplay_opt_strs+2902)
  776. /** The compiled in default value for the dbug option argument */
  777. #define DBUG_DFT_ARG ((char const*)0)
  778. /** Compiled in flag settings for the dbug option */
  779. #define DBUG_FLAGS (OPTST_DISABLED | OPTST_IMM \
  780. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  781. #else /* disable dbug */
  782. #define DBUG_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  783. #define DBUG_DFT_ARG NULL
  784. #define DBUG_NAME NULL
  785. #define DBUG_DESC NULL
  786. #define DBUG_name NULL
  787. #endif /* DEBUG */
  788. /**
  789. * quiet option description:
  790. */
  791. /** Descriptive text for the quiet option */
  792. #define QUIET_DESC (tcpreplay_opt_strs+2907)
  793. /** Upper-cased name for the quiet option */
  794. #define QUIET_NAME (tcpreplay_opt_strs+2918)
  795. /** Name string for the quiet option */
  796. #define QUIET_name (tcpreplay_opt_strs+2924)
  797. /** Compiled in flag settings for the quiet option */
  798. #define QUIET_FLAGS (OPTST_DISABLED)
  799. /**
  800. * timer option description:
  801. */
  802. /** Descriptive text for the timer option */
  803. #define TIMER_DESC (tcpreplay_opt_strs+2930)
  804. /** Upper-cased name for the timer option */
  805. #define TIMER_NAME (tcpreplay_opt_strs+2984)
  806. /** Name string for the timer option */
  807. #define TIMER_name (tcpreplay_opt_strs+2990)
  808. /** The compiled in default value for the timer option argument */
  809. #define TIMER_DFT_ARG (tcpreplay_opt_strs+2996)
  810. /** Compiled in flag settings for the timer option */
  811. #define TIMER_FLAGS (OPTST_DISABLED \
  812. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  813. /**
  814. * maxsleep option description:
  815. */
  816. /** Descriptive text for the maxsleep option */
  817. #define MAXSLEEP_DESC (tcpreplay_opt_strs+3001)
  818. /** Upper-cased name for the maxsleep option */
  819. #define MAXSLEEP_NAME (tcpreplay_opt_strs+3055)
  820. /** Name string for the maxsleep option */
  821. #define MAXSLEEP_name (tcpreplay_opt_strs+3064)
  822. /** The compiled in default value for the maxsleep option argument */
  823. #define MAXSLEEP_DFT_ARG ((char const*)0)
  824. /** Compiled in flag settings for the maxsleep option */
  825. #define MAXSLEEP_FLAGS (OPTST_DISABLED \
  826. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  827. /**
  828. * verbose option description:
  829. */
  830. #ifdef ENABLE_VERBOSE
  831. /** Descriptive text for the verbose option */
  832. #define VERBOSE_DESC (tcpreplay_opt_strs+3073)
  833. /** Upper-cased name for the verbose option */
  834. #define VERBOSE_NAME (tcpreplay_opt_strs+3117)
  835. /** Name string for the verbose option */
  836. #define VERBOSE_name (tcpreplay_opt_strs+3125)
  837. /** Compiled in flag settings for the verbose option */
  838. #define VERBOSE_FLAGS (OPTST_DISABLED | OPTST_IMM)
  839. #else /* disable verbose */
  840. #define VERBOSE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  841. #define VERBOSE_NAME NULL
  842. #define VERBOSE_DESC NULL
  843. #define VERBOSE_name NULL
  844. #endif /* ENABLE_VERBOSE */
  845. /**
  846. * decode option description with
  847. * "Must also have options" and "Incompatible options":
  848. */
  849. #ifdef ENABLE_VERBOSE
  850. /** Descriptive text for the decode option */
  851. #define DECODE_DESC (tcpreplay_opt_strs+3133)
  852. /** Upper-cased name for the decode option */
  853. #define DECODE_NAME (tcpreplay_opt_strs+3169)
  854. /** Name string for the decode option */
  855. #define DECODE_name (tcpreplay_opt_strs+3176)
  856. /** Other options that are required by the decode option */
  857. static int const aDecodeMustList[] = {
  858. INDEX_OPT_VERBOSE, NO_EQUIVALENT };
  859. /** Compiled in flag settings for the decode option */
  860. #define DECODE_FLAGS (OPTST_DISABLED \
  861. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  862. #else /* disable decode */
  863. #define DECODE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  864. #define aDecodeMustList NULL
  865. #define DECODE_NAME NULL
  866. #define DECODE_DESC NULL
  867. #define DECODE_name NULL
  868. #endif /* ENABLE_VERBOSE */
  869. /**
  870. * preload_pcap option description:
  871. */
  872. /** Descriptive text for the preload_pcap option */
  873. #define PRELOAD_PCAP_DESC (tcpreplay_opt_strs+3183)
  874. /** Upper-cased name for the preload_pcap option */
  875. #define PRELOAD_PCAP_NAME (tcpreplay_opt_strs+3224)
  876. /** Name string for the preload_pcap option */
  877. #define PRELOAD_PCAP_name (tcpreplay_opt_strs+3237)
  878. /** Compiled in flag settings for the preload_pcap option */
  879. #define PRELOAD_PCAP_FLAGS (OPTST_DISABLED)
  880. /**
  881. * cachefile option description with
  882. * "Must also have options" and "Incompatible options":
  883. */
  884. /** Descriptive text for the cachefile option */
  885. #define CACHEFILE_DESC (tcpreplay_opt_strs+3250)
  886. /** Upper-cased name for the cachefile option */
  887. #define CACHEFILE_NAME (tcpreplay_opt_strs+3289)
  888. /** Name string for the cachefile option */
  889. #define CACHEFILE_name (tcpreplay_opt_strs+3299)
  890. /** Other options that are required by the cachefile option */
  891. static int const aCachefileMustList[] = {
  892. INDEX_OPT_INTF2, NO_EQUIVALENT };
  893. /** Other options that appear in conjunction with the cachefile option */
  894. static int const aCachefileCantList[] = {
  895. INDEX_OPT_DUALFILE, NO_EQUIVALENT };
  896. /** Compiled in flag settings for the cachefile option */
  897. #define CACHEFILE_FLAGS (OPTST_DISABLED \
  898. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  899. /**
  900. * dualfile option description with
  901. * "Must also have options" and "Incompatible options":
  902. */
  903. /** Descriptive text for the dualfile option */
  904. #define DUALFILE_DESC (tcpreplay_opt_strs+3309)
  905. /** Upper-cased name for the dualfile option */
  906. #define DUALFILE_NAME (tcpreplay_opt_strs+3355)
  907. /** Name string for the dualfile option */
  908. #define DUALFILE_name (tcpreplay_opt_strs+3364)
  909. /** Other options that are required by the dualfile option */
  910. static int const aDualfileMustList[] = {
  911. INDEX_OPT_INTF2, NO_EQUIVALENT };
  912. /** Other options that appear in conjunction with the dualfile option */
  913. static int const aDualfileCantList[] = {
  914. INDEX_OPT_CACHEFILE, NO_EQUIVALENT };
  915. /** Compiled in flag settings for the dualfile option */
  916. #define DUALFILE_FLAGS (OPTST_DISABLED)
  917. /**
  918. * intf1 option description:
  919. */
  920. /** Descriptive text for the intf1 option */
  921. #define INTF1_DESC (tcpreplay_opt_strs+3373)
  922. /** Upper-cased name for the intf1 option */
  923. #define INTF1_NAME (tcpreplay_opt_strs+3426)
  924. /** Name string for the intf1 option */
  925. #define INTF1_name (tcpreplay_opt_strs+3432)
  926. /** Compiled in flag settings for the intf1 option */
  927. #define INTF1_FLAGS (OPTST_DISABLED | OPTST_MUST_SET \
  928. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  929. /**
  930. * intf2 option description:
  931. */
  932. /** Descriptive text for the intf2 option */
  933. #define INTF2_DESC (tcpreplay_opt_strs+3438)
  934. /** Upper-cased name for the intf2 option */
  935. #define INTF2_NAME (tcpreplay_opt_strs+3493)
  936. /** Name string for the intf2 option */
  937. #define INTF2_name (tcpreplay_opt_strs+3499)
  938. /** Compiled in flag settings for the intf2 option */
  939. #define INTF2_FLAGS (OPTST_DISABLED \
  940. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  941. /**
  942. * listnics option description:
  943. */
  944. #ifdef ENABLE_PCAP_FINDALLDEVS
  945. /** Descriptive text for the listnics option */
  946. #define LISTNICS_DESC (tcpreplay_opt_strs+3505)
  947. /** Upper-cased name for the listnics option */
  948. #define LISTNICS_NAME (tcpreplay_opt_strs+3548)
  949. /** Name string for the listnics option */
  950. #define LISTNICS_name (tcpreplay_opt_strs+3557)
  951. /** Compiled in flag settings for the listnics option */
  952. #define LISTNICS_FLAGS (OPTST_DISABLED | OPTST_IMM)
  953. #else /* disable listnics */
  954. #define LISTNICS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  955. #define LISTNICS_NAME NULL
  956. #define LISTNICS_DESC NULL
  957. #define LISTNICS_name NULL
  958. #endif /* ENABLE_PCAP_FINDALLDEVS */
  959. /**
  960. * loop option description:
  961. */
  962. /** Descriptive text for the loop option */
  963. #define LOOP_DESC (tcpreplay_opt_strs+3566)
  964. /** Upper-cased name for the loop option */
  965. #define LOOP_NAME (tcpreplay_opt_strs+3604)
  966. /** Name string for the loop option */
  967. #define LOOP_name (tcpreplay_opt_strs+3609)
  968. /** The compiled in default value for the loop option argument */
  969. #define LOOP_DFT_ARG ((char const*)1)
  970. /** Compiled in flag settings for the loop option */
  971. #define LOOP_FLAGS (OPTST_DISABLED \
  972. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  973. /**
  974. * loopdelay-ms option description with
  975. * "Must also have options" and "Incompatible options":
  976. */
  977. /** Descriptive text for the loopdelay-ms option */
  978. #define LOOPDELAY_MS_DESC (tcpreplay_opt_strs+3614)
  979. /** Upper-cased name for the loopdelay-ms option */
  980. #define LOOPDELAY_MS_NAME (tcpreplay_opt_strs+3650)
  981. /** Name string for the loopdelay-ms option */
  982. #define LOOPDELAY_MS_name (tcpreplay_opt_strs+3663)
  983. /** The compiled in default value for the loopdelay-ms option argument */
  984. #define LOOPDELAY_MS_DFT_ARG ((char const*)0)
  985. /** Other options that are required by the loopdelay-ms option */
  986. static int const aLoopdelay_MsMustList[] = {
  987. INDEX_OPT_LOOP, NO_EQUIVALENT };
  988. /** Compiled in flag settings for the loopdelay-ms option */
  989. #define LOOPDELAY_MS_FLAGS (OPTST_DISABLED \
  990. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  991. /**
  992. * pktlen option description:
  993. */
  994. /** Descriptive text for the pktlen option */
  995. #define PKTLEN_DESC (tcpreplay_opt_strs+3676)
  996. /** Upper-cased name for the pktlen option */
  997. #define PKTLEN_NAME (tcpreplay_opt_strs+3727)
  998. /** Name string for the pktlen option */
  999. #define PKTLEN_name (tcpreplay_opt_strs+3734)
  1000. /** Compiled in flag settings for the pktlen option */
  1001. #define PKTLEN_FLAGS (OPTST_DISABLED)
  1002. /**
  1003. * limit option description:
  1004. */
  1005. /** Descriptive text for the limit option */
  1006. #define LIMIT_DESC (tcpreplay_opt_strs+3741)
  1007. /** Upper-cased name for the limit option */
  1008. #define LIMIT_NAME (tcpreplay_opt_strs+3777)
  1009. /** Name string for the limit option */
  1010. #define LIMIT_name (tcpreplay_opt_strs+3783)
  1011. /** The compiled in default value for the limit option argument */
  1012. #define LIMIT_DFT_ARG ((char const*)-1)
  1013. /** Compiled in flag settings for the limit option */
  1014. #define LIMIT_FLAGS (OPTST_DISABLED \
  1015. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  1016. /**
  1017. * duration option description:
  1018. */
  1019. /** Descriptive text for the duration option */
  1020. #define DURATION_DESC (tcpreplay_opt_strs+3789)
  1021. /** Upper-cased name for the duration option */
  1022. #define DURATION_NAME (tcpreplay_opt_strs+3825)
  1023. /** Name string for the duration option */
  1024. #define DURATION_name (tcpreplay_opt_strs+3834)
  1025. /** The compiled in default value for the duration option argument */
  1026. #define DURATION_DFT_ARG ((char const*)-1)
  1027. /** Compiled in flag settings for the duration option */
  1028. #define DURATION_FLAGS (OPTST_DISABLED \
  1029. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  1030. /**
  1031. * multiplier option description with
  1032. * "Must also have options" and "Incompatible options":
  1033. */
  1034. /** Descriptive text for the multiplier option */
  1035. #define MULTIPLIER_DESC (tcpreplay_opt_strs+3843)
  1036. /** Upper-cased name for the multiplier option */
  1037. #define MULTIPLIER_NAME (tcpreplay_opt_strs+3883)
  1038. /** Name string for the multiplier option */
  1039. #define MULTIPLIER_name (tcpreplay_opt_strs+3894)
  1040. /** Other options that appear in conjunction with the multiplier option */
  1041. static int const aMultiplierCantList[] = {
  1042. INDEX_OPT_PPS,
  1043. INDEX_OPT_MBPS,
  1044. INDEX_OPT_ONEATATIME,
  1045. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  1046. /** Compiled in flag settings for the multiplier option */
  1047. #define MULTIPLIER_FLAGS (OPTST_DISABLED \
  1048. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  1049. /**
  1050. * pps option description with
  1051. * "Must also have options" and "Incompatible options":
  1052. */
  1053. /** Descriptive text for the pps option */
  1054. #define PPS_DESC (tcpreplay_opt_strs+3905)
  1055. /** Upper-cased name for the pps option */
  1056. #define PPS_NAME (tcpreplay_opt_strs+3943)
  1057. /** Name string for the pps option */
  1058. #define PPS_name (tcpreplay_opt_strs+3947)
  1059. /** Other options that appear in conjunction with the pps option */
  1060. static int const aPpsCantList[] = {
  1061. INDEX_OPT_MULTIPLIER,
  1062. INDEX_OPT_MBPS,
  1063. INDEX_OPT_ONEATATIME,
  1064. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  1065. /** Compiled in flag settings for the pps option */
  1066. #define PPS_FLAGS (OPTST_DISABLED \
  1067. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  1068. /**
  1069. * mbps option description with
  1070. * "Must also have options" and "Incompatible options":
  1071. */
  1072. /** Descriptive text for the mbps option */
  1073. #define MBPS_DESC (tcpreplay_opt_strs+3951)
  1074. /** Upper-cased name for the mbps option */
  1075. #define MBPS_NAME (tcpreplay_opt_strs+3982)
  1076. /** Name string for the mbps option */
  1077. #define MBPS_name (tcpreplay_opt_strs+3987)
  1078. /** Other options that appear in conjunction with the mbps option */
  1079. static int const aMbpsCantList[] = {
  1080. INDEX_OPT_MULTIPLIER,
  1081. INDEX_OPT_PPS,
  1082. INDEX_OPT_ONEATATIME,
  1083. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  1084. /** Compiled in flag settings for the mbps option */
  1085. #define MBPS_FLAGS (OPTST_DISABLED \
  1086. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  1087. /**
  1088. * topspeed option description with
  1089. * "Must also have options" and "Incompatible options":
  1090. */
  1091. /** Descriptive text for the topspeed option */
  1092. #define TOPSPEED_DESC (tcpreplay_opt_strs+3992)
  1093. /** Upper-cased name for the topspeed option */
  1094. #define TOPSPEED_NAME (tcpreplay_opt_strs+4027)
  1095. /** Name string for the topspeed option */
  1096. #define TOPSPEED_name (tcpreplay_opt_strs+4036)
  1097. /** Other options that appear in conjunction with the topspeed option */
  1098. static int const aTopspeedCantList[] = {
  1099. INDEX_OPT_MBPS,
  1100. INDEX_OPT_MULTIPLIER,
  1101. INDEX_OPT_PPS,
  1102. INDEX_OPT_ONEATATIME, NO_EQUIVALENT };
  1103. /** Compiled in flag settings for the topspeed option */
  1104. #define TOPSPEED_FLAGS (OPTST_DISABLED)
  1105. /**
  1106. * oneatatime option description with
  1107. * "Must also have options" and "Incompatible options":
  1108. */
  1109. /** Descriptive text for the oneatatime option */
  1110. #define ONEATATIME_DESC (tcpreplay_opt_strs+4045)
  1111. /** Upper-cased name for the oneatatime option */
  1112. #define ONEATATIME_NAME (tcpreplay_opt_strs+4093)
  1113. /** Name string for the oneatatime option */
  1114. #define ONEATATIME_name (tcpreplay_opt_strs+4104)
  1115. /** Other options that appear in conjunction with the oneatatime option */
  1116. static int const aOneatatimeCantList[] = {
  1117. INDEX_OPT_MBPS,
  1118. INDEX_OPT_PPS,
  1119. INDEX_OPT_MULTIPLIER,
  1120. INDEX_OPT_TOPSPEED, NO_EQUIVALENT };
  1121. /** Compiled in flag settings for the oneatatime option */
  1122. #define ONEATATIME_FLAGS (OPTST_DISABLED)
  1123. /**
  1124. * pps-multi option description with
  1125. * "Must also have options" and "Incompatible options":
  1126. */
  1127. /** Descriptive text for the pps-multi option */
  1128. #define PPS_MULTI_DESC (tcpreplay_opt_strs+4115)
  1129. /** Upper-cased name for the pps-multi option */
  1130. #define PPS_MULTI_NAME (tcpreplay_opt_strs+4164)
  1131. /** Name string for the pps-multi option */
  1132. #define PPS_MULTI_name (tcpreplay_opt_strs+4174)
  1133. /** The compiled in default value for the pps-multi option argument */
  1134. #define PPS_MULTI_DFT_ARG ((char const*)1)
  1135. /** Other options that are required by the pps-multi option */
  1136. static int const aPps_MultiMustList[] = {
  1137. INDEX_OPT_PPS, NO_EQUIVALENT };
  1138. /** Compiled in flag settings for the pps-multi option */
  1139. #define PPS_MULTI_FLAGS (OPTST_DISABLED \
  1140. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  1141. /**
  1142. * unique-ip option description with
  1143. * "Must also have options" and "Incompatible options":
  1144. */
  1145. /** Descriptive text for the unique-ip option */
  1146. #define UNIQUE_IP_DESC (tcpreplay_opt_strs+4184)
  1147. /** Upper-cased name for the unique-ip option */
  1148. #define UNIQUE_IP_NAME (tcpreplay_opt_strs+4249)
  1149. /** Name string for the unique-ip option */
  1150. #define UNIQUE_IP_name (tcpreplay_opt_strs+4259)
  1151. /** Other options that are required by the unique-ip option */
  1152. static int const aUnique_IpMustList[] = {
  1153. INDEX_OPT_LOOP, NO_EQUIVALENT };
  1154. /** Other options that appear in conjunction with the unique-ip option */
  1155. static int const aUnique_IpCantList[] = {
  1156. INDEX_OPT_SEED,
  1157. INDEX_OPT_FUZZ_SEED, NO_EQUIVALENT };
  1158. /** Compiled in flag settings for the unique-ip option */
  1159. #define UNIQUE_IP_FLAGS (OPTST_DISABLED)
  1160. /**
  1161. * unique-ip-loops option description with
  1162. * "Must also have options" and "Incompatible options":
  1163. */
  1164. /** Descriptive text for the unique-ip-loops option */
  1165. #define UNIQUE_IP_LOOPS_DESC (tcpreplay_opt_strs+4269)
  1166. /** Upper-cased name for the unique-ip-loops option */
  1167. #define UNIQUE_IP_LOOPS_NAME (tcpreplay_opt_strs+4324)
  1168. /** Name string for the unique-ip-loops option */
  1169. #define UNIQUE_IP_LOOPS_name (tcpreplay_opt_strs+4340)
  1170. /** Other options that are required by the unique-ip-loops option */
  1171. static int const aUnique_Ip_LoopsMustList[] = {
  1172. INDEX_OPT_UNIQUE_IP, NO_EQUIVALENT };
  1173. /** Compiled in flag settings for the unique-ip-loops option */
  1174. #define UNIQUE_IP_LOOPS_FLAGS (OPTST_DISABLED \
  1175. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  1176. /**
  1177. * netmap option description:
  1178. */
  1179. #ifdef HAVE_NETMAP
  1180. /** Descriptive text for the netmap option */
  1181. #define NETMAP_DESC (tcpreplay_opt_strs+4356)
  1182. /** Upper-cased name for the netmap option */
  1183. #define NETMAP_NAME (tcpreplay_opt_strs+4413)
  1184. /** Name string for the netmap option */
  1185. #define NETMAP_name (tcpreplay_opt_strs+4420)
  1186. /** Compiled in flag settings for the netmap option */
  1187. #define NETMAP_FLAGS (OPTST_DISABLED)
  1188. #else /* disable netmap */
  1189. #define NETMAP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  1190. #define NETMAP_NAME NULL
  1191. #define NETMAP_DESC NULL
  1192. #define NETMAP_name NULL
  1193. #endif /* HAVE_NETMAP */
  1194. /**
  1195. * nm-delay option description:
  1196. */
  1197. #ifdef HAVE_NETMAP
  1198. /** Descriptive text for the nm-delay option */
  1199. #define NM_DELAY_DESC (tcpreplay_opt_strs+4427)
  1200. /** Upper-cased name for the nm-delay option */
  1201. #define NM_DELAY_NAME (tcpreplay_opt_strs+4448)
  1202. /** Name string for the nm-delay option */
  1203. #define NM_DELAY_name (tcpreplay_opt_strs+4457)
  1204. /** The compiled in default value for the nm-delay option argument */
  1205. #define NM_DELAY_DFT_ARG ((char const*)10)
  1206. /** Compiled in flag settings for the nm-delay option */
  1207. #define NM_DELAY_FLAGS (OPTST_DISABLED \
  1208. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  1209. #else /* disable nm-delay */
  1210. #define NM_DELAY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  1211. #define NM_DELAY_DFT_ARG NULL
  1212. #define NM_DELAY_NAME NULL
  1213. #define NM_DELAY_DESC NULL
  1214. #define NM_DELAY_name NULL
  1215. #endif /* HAVE_NETMAP */
  1216. /**
  1217. * no-flow-stats option description:
  1218. */
  1219. /** Descriptive text for the no-flow-stats option */
  1220. #define NO_FLOW_STATS_DESC (tcpreplay_opt_strs+4466)
  1221. /** Upper-cased name for the no-flow-stats option */
  1222. #define NO_FLOW_STATS_NAME (tcpreplay_opt_strs+4531)
  1223. /** Name string for the no-flow-stats option */
  1224. #define NO_FLOW_STATS_name (tcpreplay_opt_strs+4545)
  1225. /** Compiled in flag settings for the no-flow-stats option */
  1226. #define NO_FLOW_STATS_FLAGS (OPTST_DISABLED)
  1227. /**
  1228. * flow-expiry option description with
  1229. * "Must also have options" and "Incompatible options":
  1230. */
  1231. /** Descriptive text for the flow-expiry option */
  1232. #define FLOW_EXPIRY_DESC (tcpreplay_opt_strs+4559)
  1233. /** Upper-cased name for the flow-expiry option */
  1234. #define FLOW_EXPIRY_NAME (tcpreplay_opt_strs+4622)
  1235. /** Name string for the flow-expiry option */
  1236. #define FLOW_EXPIRY_name (tcpreplay_opt_strs+4634)
  1237. /** The compiled in default value for the flow-expiry option argument */
  1238. #define FLOW_EXPIRY_DFT_ARG ((char const*)0)
  1239. /** Other options that appear in conjunction with the flow-expiry option */
  1240. static int const aFlow_ExpiryCantList[] = {
  1241. INDEX_OPT_NO_FLOW_STATS, NO_EQUIVALENT };
  1242. /** Compiled in flag settings for the flow-expiry option */
  1243. #define FLOW_EXPIRY_FLAGS (OPTST_DISABLED \
  1244. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  1245. /**
  1246. * pid option description:
  1247. */
  1248. /** Descriptive text for the pid option */
  1249. #define PID_DESC (tcpreplay_opt_strs+4646)
  1250. /** Upper-cased name for the pid option */
  1251. #define PID_NAME (tcpreplay_opt_strs+4684)
  1252. /** Name string for the pid option */
  1253. #define PID_name (tcpreplay_opt_strs+4688)
  1254. /** Compiled in flag settings for the pid option */
  1255. #define PID_FLAGS (OPTST_DISABLED)
  1256. /**
  1257. * stats option description:
  1258. */
  1259. /** Descriptive text for the stats option */
  1260. #define STATS_DESC (tcpreplay_opt_strs+4692)
  1261. /** Upper-cased name for the stats option */
  1262. #define STATS_NAME (tcpreplay_opt_strs+4747)
  1263. /** Name string for the stats option */
  1264. #define STATS_name (tcpreplay_opt_strs+4753)
  1265. /** Compiled in flag settings for the stats option */
  1266. #define STATS_FLAGS (OPTST_DISABLED \
  1267. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  1268. /**
  1269. * version option description:
  1270. */
  1271. /** Descriptive text for the version option */
  1272. #define VERSION_DESC (tcpreplay_opt_strs+4759)
  1273. /** Upper-cased name for the version option */
  1274. #define VERSION_NAME (tcpreplay_opt_strs+4785)
  1275. /** Name string for the version option */
  1276. #define VERSION_name (tcpreplay_opt_strs+4793)
  1277. /** Compiled in flag settings for the version option */
  1278. #define VERSION_FLAGS (OPTST_DISABLED)
  1279. /**
  1280. * less-help option description:
  1281. */
  1282. /** Descriptive text for the less-help option */
  1283. #define LESS_HELP_DESC (tcpreplay_opt_strs+4801)
  1284. /** Upper-cased name for the less-help option */
  1285. #define LESS_HELP_NAME (tcpreplay_opt_strs+4841)
  1286. /** Name string for the less-help option */
  1287. #define LESS_HELP_name (tcpreplay_opt_strs+4851)
  1288. /** Compiled in flag settings for the less-help option */
  1289. #define LESS_HELP_FLAGS (OPTST_DISABLED | OPTST_IMM)
  1290. /*
  1291. * Help/More_Help option descriptions:
  1292. */
  1293. #define HELP_DESC (tcpreplay_opt_strs+4861)
  1294. #define HELP_name (tcpreplay_opt_strs+4905)
  1295. #ifdef HAVE_WORKING_FORK
  1296. #define MORE_HELP_DESC (tcpreplay_opt_strs+4910)
  1297. #define MORE_HELP_name (tcpreplay_opt_strs+4955)
  1298. #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
  1299. #else
  1300. #define MORE_HELP_DESC HELP_DESC
  1301. #define MORE_HELP_name HELP_name
  1302. #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  1303. #endif
  1304. #define SAVE_OPTS_DESC (tcpreplay_opt_strs+4965)
  1305. #define SAVE_OPTS_name (tcpreplay_opt_strs+5004)
  1306. #define LOAD_OPTS_DESC (tcpreplay_opt_strs+5014)
  1307. #define LOAD_OPTS_NAME (tcpreplay_opt_strs+5046)
  1308. #define NO_LOAD_OPTS_name (tcpreplay_opt_strs+5056)
  1309. #define LOAD_OPTS_pfx (tcpreplay_opt_strs+5069)
  1310. #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
  1311. /**
  1312. * Declare option callback procedures
  1313. */
  1314. #ifdef DEBUG
  1315. static tOptProc doOptDbug;
  1316. #else /* not DEBUG */
  1317. # define doOptDbug NULL
  1318. #endif /* def/not DEBUG */
  1319. #ifdef ENABLE_PCAP_FINDALLDEVS
  1320. static tOptProc doOptListnics;
  1321. #else /* not ENABLE_PCAP_FINDALLDEVS */
  1322. # define doOptListnics NULL
  1323. #endif /* def/not ENABLE_PCAP_FINDALLDEVS */
  1324. extern tOptProc
  1325. optionBooleanVal, optionNestedVal, optionNumericVal,
  1326. optionPagedUsage, optionPrintVersion, optionResetOpt,
  1327. optionStackArg, optionTimeDate, optionTimeVal,
  1328. optionUnstackArg, optionVendorOption;
  1329. static tOptProc
  1330. doOptDuration, doOptEnet_Mac_Seed_Keep_Bytes,
  1331. doOptEnet_Vlan_Cfi, doOptEnet_Vlan_Pri,
  1332. doOptEnet_Vlan_Tag, doOptFlow_Expiry,
  1333. doOptFlowlabel, doOptFuzz_Factor,
  1334. doOptFuzz_Seed, doOptLess_Help,
  1335. doOptLimit, doOptLoop,
  1336. doOptLoopdelay_Ms, doOptMtu,
  1337. doOptPid, doOptPps_Multi,
  1338. doOptStats, doOptTclass,
  1339. doOptTos, doOptVersion,
  1340. doUsageOpt;
  1341. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1342. /**
  1343. * Define the tcpreplay Option Descriptions.
  1344. * This is an array of OPTION_CT entries, one for each
  1345. * option that the tcpreplay program responds to.
  1346. */
  1347. static tOptDesc optDesc[OPTION_CT] = {
  1348. { /* entry idx, value */ 0, 0,
  1349. /* equiv idx, value */ 0, 0,
  1350. /* equivalenced to */ NO_EQUIVALENT,
  1351. /* min, max, act ct */ 0, 0, 0,
  1352. /* opt state flags */ TCPEDIT_FLAGS, 0,
  1353. /* last opt argumnt */ { NULL },
  1354. /* arg list/cookie */ NULL,
  1355. /* must/cannot opts */ NULL, NULL,
  1356. /* option proc */ NULL,
  1357. /* desc, NAME, name */ TCPEDIT_DESC, NULL, NULL,
  1358. /* disablement strs */ NULL, NULL },
  1359. { /* entry idx, value */ 1, VALUE_OPT_PORTMAP,
  1360. /* equiv idx, value */ 1, VALUE_OPT_PORTMAP,
  1361. /* equivalenced to */ NO_EQUIVALENT,
  1362. /* min, max, act ct */ 0, 9999, 0,
  1363. /* opt state flags */ PORTMAP_FLAGS, 0,
  1364. /* last opt argumnt */ { NULL }, /* --portmap */
  1365. /* arg list/cookie */ NULL,
  1366. /* must/cannot opts */ NULL, NULL,
  1367. /* option proc */ optionStackArg,
  1368. /* desc, NAME, name */ PORTMAP_DESC, PORTMAP_NAME, PORTMAP_name,
  1369. /* disablement strs */ NULL, NULL },
  1370. { /* entry idx, value */ 2, VALUE_OPT_SEED,
  1371. /* equiv idx, value */ 2, VALUE_OPT_SEED,
  1372. /* equivalenced to */ NO_EQUIVALENT,
  1373. /* min, max, act ct */ 0, 1, 0,
  1374. /* opt state flags */ SEED_FLAGS, 0,
  1375. /* last opt argumnt */ { NULL }, /* --seed */
  1376. /* arg list/cookie */ NULL,
  1377. /* must/cannot opts */ NULL, aSeedCantList,
  1378. /* option proc */ optionNumericVal,
  1379. /* desc, NAME, name */ SEED_DESC, SEED_NAME, SEED_name,
  1380. /* disablement strs */ NULL, NULL },
  1381. { /* entry idx, value */ 3, VALUE_OPT_PNAT,
  1382. /* equiv idx, value */ 3, VALUE_OPT_PNAT,
  1383. /* equivalenced to */ NO_EQUIVALENT,
  1384. /* min, max, act ct */ 0, 2, 0,
  1385. /* opt state flags */ PNAT_FLAGS, 0,
  1386. /* last opt argumnt */ { NULL }, /* --pnat */
  1387. /* arg list/cookie */ NULL,
  1388. /* must/cannot opts */ NULL, aPnatCantList,
  1389. /* option proc */ optionStackArg,
  1390. /* desc, NAME, name */ PNAT_DESC, PNAT_NAME, PNAT_name,
  1391. /* disablement strs */ NULL, NULL },
  1392. { /* entry idx, value */ 4, VALUE_OPT_SRCIPMAP,
  1393. /* equiv idx, value */ 4, VALUE_OPT_SRCIPMAP,
  1394. /* equivalenced to */ NO_EQUIVALENT,
  1395. /* min, max, act ct */ 0, 1, 0,
  1396. /* opt state flags */ SRCIPMAP_FLAGS, 0,
  1397. /* last opt argumnt */ { NULL }, /* --srcipmap */
  1398. /* arg list/cookie */ NULL,
  1399. /* must/cannot opts */ NULL, aSrcipmapCantList,
  1400. /* option proc */ NULL,
  1401. /* desc, NAME, name */ SRCIPMAP_DESC, SRCIPMAP_NAME, SRCIPMAP_name,
  1402. /* disablement strs */ NULL, NULL },
  1403. { /* entry idx, value */ 5, VALUE_OPT_DSTIPMAP,
  1404. /* equiv idx, value */ 5, VALUE_OPT_DSTIPMAP,
  1405. /* equivalenced to */ NO_EQUIVALENT,
  1406. /* min, max, act ct */ 0, 1, 0,
  1407. /* opt state flags */ DSTIPMAP_FLAGS, 0,
  1408. /* last opt argumnt */ { NULL }, /* --dstipmap */
  1409. /* arg list/cookie */ NULL,
  1410. /* must/cannot opts */ NULL, aDstipmapCantList,
  1411. /* option proc */ NULL,
  1412. /* desc, NAME, name */ DSTIPMAP_DESC, DSTIPMAP_NAME, DSTIPMAP_name,
  1413. /* disablement strs */ NULL, NULL },
  1414. { /* entry idx, value */ 6, VALUE_OPT_ENDPOINTS,
  1415. /* equiv idx, value */ 6, VALUE_OPT_ENDPOINTS,
  1416. /* equivalenced to */ NO_EQUIVALENT,
  1417. /* min, max, act ct */ 0, 1, 0,
  1418. /* opt state flags */ ENDPOINTS_FLAGS, 0,
  1419. /* last opt argumnt */ { NULL }, /* --endpoints */
  1420. /* arg list/cookie */ NULL,
  1421. /* must/cannot opts */ aEndpointsMustList, NULL,
  1422. /* option proc */ NULL,
  1423. /* desc, NAME, name */ ENDPOINTS_DESC, ENDPOINTS_NAME, ENDPOINTS_name,
  1424. /* disablement strs */ NULL, NULL },
  1425. { /* entry idx, value */ 7, VALUE_OPT_SKIPBROADCAST,
  1426. /* equiv idx, value */ 7, VALUE_OPT_SKIPBROADCAST,
  1427. /* equivalenced to */ NO_EQUIVALENT,
  1428. /* min, max, act ct */ 0, 1, 0,
  1429. /* opt state flags */ SKIPBROADCAST_FLAGS, 0,
  1430. /* last opt argumnt */ { NULL }, /* --skipbroadcast */
  1431. /* arg list/cookie */ NULL,
  1432. /* must/cannot opts */ NULL, NULL,
  1433. /* option proc */ NULL,
  1434. /* desc, NAME, name */ SKIPBROADCAST_DESC, SKIPBROADCAST_NAME, SKIPBROADCAST_name,
  1435. /* disablement strs */ NULL, NULL },
  1436. { /* entry idx, value */ 8, VALUE_OPT_FIXCSUM,
  1437. /* equiv idx, value */ 8, VALUE_OPT_FIXCSUM,
  1438. /* equivalenced to */ NO_EQUIVALENT,
  1439. /* min, max, act ct */ 0, 1, 0,
  1440. /* opt state flags */ FIXCSUM_FLAGS, 0,
  1441. /* last opt argumnt */ { NULL }, /* --fixcsum */
  1442. /* arg list/cookie */ NULL,
  1443. /* must/cannot opts */ NULL, NULL,
  1444. /* option proc */ NULL,
  1445. /* desc, NAME, name */ FIXCSUM_DESC, FIXCSUM_NAME, FIXCSUM_name,
  1446. /* disablement strs */ NULL, NULL },
  1447. { /* entry idx, value */ 9, VALUE_OPT_MTU,
  1448. /* equiv idx, value */ 9, VALUE_OPT_MTU,
  1449. /* equivalenced to */ NO_EQUIVALENT,
  1450. /* min, max, act ct */ 0, 1, 0,
  1451. /* opt state flags */ MTU_FLAGS, 0,
  1452. /* last opt argumnt */ { NULL }, /* --mtu */
  1453. /* arg list/cookie */ NULL,
  1454. /* must/cannot opts */ NULL, NULL,
  1455. /* option proc */ doOptMtu,
  1456. /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name,
  1457. /* disablement strs */ NULL, NULL },
  1458. { /* entry idx, value */ 10, VALUE_OPT_MTU_TRUNC,
  1459. /* equiv idx, value */ 10, VALUE_OPT_MTU_TRUNC,
  1460. /* equivalenced to */ NO_EQUIVALENT,
  1461. /* min, max, act ct */ 0, 1, 0,
  1462. /* opt state flags */ MTU_TRUNC_FLAGS, 0,
  1463. /* last opt argumnt */ { NULL }, /* --mtu-trunc */
  1464. /* arg list/cookie */ NULL,
  1465. /* must/cannot opts */ NULL, NULL,
  1466. /* option proc */ NULL,
  1467. /* desc, NAME, name */ MTU_TRUNC_DESC, MTU_TRUNC_NAME, MTU_TRUNC_name,
  1468. /* disablement strs */ NULL, NULL },
  1469. { /* entry idx, value */ 11, VALUE_OPT_EFCS,
  1470. /* equiv idx, value */ 11, VALUE_OPT_EFCS,
  1471. /* equivalenced to */ NO_EQUIVALENT,
  1472. /* min, max, act ct */ 0, 1, 0,
  1473. /* opt state flags */ EFCS_FLAGS, 0,
  1474. /* last opt argumnt */ { NULL }, /* --efcs */
  1475. /* arg list/cookie */ NULL,
  1476. /* must/cannot opts */ NULL, NULL,
  1477. /* option proc */ NULL,
  1478. /* desc, NAME, name */ EFCS_DESC, EFCS_NAME, EFCS_name,
  1479. /* disablement strs */ NULL, NULL },
  1480. { /* entry idx, value */ 12, VALUE_OPT_TTL,
  1481. /* equiv idx, value */ 12, VALUE_OPT_TTL,
  1482. /* equivalenced to */ NO_EQUIVALENT,
  1483. /* min, max, act ct */ 0, 1, 0,
  1484. /* opt state flags */ TTL_FLAGS, 0,
  1485. /* last opt argumnt */ { NULL }, /* --ttl */
  1486. /* arg list/cookie */ NULL,
  1487. /* must/cannot opts */ NULL, NULL,
  1488. /* option proc */ NULL,
  1489. /* desc, NAME, name */ TTL_DESC, TTL_NAME, TTL_name,
  1490. /* disablement strs */ NULL, NULL },
  1491. { /* entry idx, value */ 13, VALUE_OPT_TOS,
  1492. /* equiv idx, value */ 13, VALUE_OPT_TOS,
  1493. /* equivalenced to */ NO_EQUIVALENT,
  1494. /* min, max, act ct */ 0, 1, 0,
  1495. /* opt state flags */ TOS_FLAGS, 0,
  1496. /* last opt argumnt */ { NULL }, /* --tos */
  1497. /* arg list/cookie */ NULL,
  1498. /* must/cannot opts */ NULL, NULL,
  1499. /* option proc */ doOptTos,
  1500. /* desc, NAME, name */ TOS_DESC, TOS_NAME, TOS_name,
  1501. /* disablement strs */ NULL, NULL },
  1502. { /* entry idx, value */ 14, VALUE_OPT_TCLASS,
  1503. /* equiv idx, value */ 14, VALUE_OPT_TCLASS,
  1504. /* equivalenced to */ NO_EQUIVALENT,
  1505. /* min, max, act ct */ 0, 1, 0,
  1506. /* opt state flags */ TCLASS_FLAGS, 0,
  1507. /* last opt argumnt */ { NULL }, /* --tclass */
  1508. /* arg list/cookie */ NULL,
  1509. /* must/cannot opts */ NULL, NULL,
  1510. /* option proc */ doOptTclass,
  1511. /* desc, NAME, name */ TCLASS_DESC, TCLASS_NAME, TCLASS_name,
  1512. /* disablement strs */ NULL, NULL },
  1513. { /* entry idx, value */ 15, VALUE_OPT_FLOWLABEL,
  1514. /* equiv idx, value */ 15, VALUE_OPT_FLOWLABEL,
  1515. /* equivalenced to */ NO_EQUIVALENT,
  1516. /* min, max, act ct */ 0, 1, 0,
  1517. /* opt state flags */ FLOWLABEL_FLAGS, 0,
  1518. /* last opt argumnt */ { NULL }, /* --flowlabel */
  1519. /* arg list/cookie */ NULL,
  1520. /* must/cannot opts */ NULL, NULL,
  1521. /* option proc */ doOptFlowlabel,
  1522. /* desc, NAME, name */ FLOWLABEL_DESC, FLOWLABEL_NAME, FLOWLABEL_name,
  1523. /* disablement strs */ NULL, NULL },
  1524. { /* entry idx, value */ 16, VALUE_OPT_FIXLEN,
  1525. /* equiv idx, value */ 16, VALUE_OPT_FIXLEN,
  1526. /* equivalenced to */ NO_EQUIVALENT,
  1527. /* min, max, act ct */ 0, 1, 0,
  1528. /* opt state flags */ FIXLEN_FLAGS, 0,
  1529. /* last opt argumnt */ { NULL }, /* --fixlen */
  1530. /* arg list/cookie */ NULL,
  1531. /* must/cannot opts */ NULL, NULL,
  1532. /* option proc */ NULL,
  1533. /* desc, NAME, name */ FIXLEN_DESC, FIXLEN_NAME, FIXLEN_name,
  1534. /* disablement strs */ NULL, NULL },
  1535. { /* entry idx, value */ 17, VALUE_OPT_FUZZ_SEED,
  1536. /* equiv idx, value */ 17, VALUE_OPT_FUZZ_SEED,
  1537. /* equivalenced to */ NO_EQUIVALENT,
  1538. /* min, max, act ct */ 0, 1, 0,
  1539. /* opt state flags */ FUZZ_SEED_FLAGS, 0,
  1540. /* last opt argumnt */ { FUZZ_SEED_DFT_ARG },
  1541. /* arg list/cookie */ NULL,
  1542. /* must/cannot opts */ NULL, NULL,
  1543. /* option proc */ doOptFuzz_Seed,
  1544. /* desc, NAME, name */ FUZZ_SEED_DESC, FUZZ_SEED_NAME, FUZZ_SEED_name,
  1545. /* disablement strs */ NULL, NULL },
  1546. { /* entry idx, value */ 18, VALUE_OPT_FUZZ_FACTOR,
  1547. /* equiv idx, value */ 18, VALUE_OPT_FUZZ_FACTOR,
  1548. /* equivalenced to */ NO_EQUIVALENT,
  1549. /* min, max, act ct */ 0, 1, 0,
  1550. /* opt state flags */ FUZZ_FACTOR_FLAGS, 0,
  1551. /* last opt argumnt */ { FUZZ_FACTOR_DFT_ARG },
  1552. /* arg list/cookie */ NULL,
  1553. /* must/cannot opts */ aFuzz_FactorMustList, NULL,
  1554. /* option proc */ doOptFuzz_Factor,
  1555. /* desc, NAME, name */ FUZZ_FACTOR_DESC, FUZZ_FACTOR_NAME, FUZZ_FACTOR_name,
  1556. /* disablement strs */ NULL, NULL },
  1557. { /* entry idx, value */ 19, VALUE_OPT_SKIPL2BROADCAST,
  1558. /* equiv idx, value */ 19, VALUE_OPT_SKIPL2BROADCAST,
  1559. /* equivalenced to */ NO_EQUIVALENT,
  1560. /* min, max, act ct */ 0, 1, 0,
  1561. /* opt state flags */ SKIPL2BROADCAST_FLAGS, 0,
  1562. /* last opt argumnt */ { NULL }, /* --skipl2broadcast */
  1563. /* arg list/cookie */ NULL,
  1564. /* must/cannot opts */ NULL, NULL,
  1565. /* option proc */ NULL,
  1566. /* desc, NAME, name */ SKIPL2BROADCAST_DESC, SKIPL2BROADCAST_NAME, SKIPL2BROADCAST_name,
  1567. /* disablement strs */ NULL, NULL },
  1568. { /* entry idx, value */ 20, VALUE_OPT_DLT,
  1569. /* equiv idx, value */ 20, VALUE_OPT_DLT,
  1570. /* equivalenced to */ NO_EQUIVALENT,
  1571. /* min, max, act ct */ 0, 1, 0,
  1572. /* opt state flags */ DLT_FLAGS, 0,
  1573. /* last opt argumnt */ { NULL }, /* --dlt */
  1574. /* arg list/cookie */ NULL,
  1575. /* must/cannot opts */ NULL, NULL,
  1576. /* option proc */ NULL,
  1577. /* desc, NAME, name */ DLT_DESC, DLT_NAME, DLT_name,
  1578. /* disablement strs */ NULL, NULL },
  1579. { /* entry idx, value */ 21, VALUE_OPT_ENET_DMAC,
  1580. /* equiv idx, value */ 21, VALUE_OPT_ENET_DMAC,
  1581. /* equivalenced to */ NO_EQUIVALENT,
  1582. /* min, max, act ct */ 0, 1, 0,
  1583. /* opt state flags */ ENET_DMAC_FLAGS, 0,
  1584. /* last opt argumnt */ { NULL }, /* --enet-dmac */
  1585. /* arg list/cookie */ NULL,
  1586. /* must/cannot opts */ NULL, NULL,
  1587. /* option proc */ NULL,
  1588. /* desc, NAME, name */ ENET_DMAC_DESC, ENET_DMAC_NAME, ENET_DMAC_name,
  1589. /* disablement strs */ NULL, NULL },
  1590. { /* entry idx, value */ 22, VALUE_OPT_ENET_SMAC,
  1591. /* equiv idx, value */ 22, VALUE_OPT_ENET_SMAC,
  1592. /* equivalenced to */ NO_EQUIVALENT,
  1593. /* min, max, act ct */ 0, 1, 0,
  1594. /* opt state flags */ ENET_SMAC_FLAGS, 0,
  1595. /* last opt argumnt */ { NULL }, /* --enet-smac */
  1596. /* arg list/cookie */ NULL,
  1597. /* must/cannot opts */ NULL, NULL,
  1598. /* option proc */ NULL,
  1599. /* desc, NAME, name */ ENET_SMAC_DESC, ENET_SMAC_NAME, ENET_SMAC_name,
  1600. /* disablement strs */ NULL, NULL },
  1601. { /* entry idx, value */ 23, VALUE_OPT_ENET_SUBSMAC,
  1602. /* equiv idx, value */ 23, VALUE_OPT_ENET_SUBSMAC,
  1603. /* equivalenced to */ NO_EQUIVALENT,
  1604. /* min, max, act ct */ 0, 9999, 0,
  1605. /* opt state flags */ ENET_SUBSMAC_FLAGS, 0,
  1606. /* last opt argumnt */ { NULL }, /* --enet-subsmac */
  1607. /* arg list/cookie */ NULL,
  1608. /* must/cannot opts */ NULL, NULL,
  1609. /* option proc */ optionStackArg,
  1610. /* desc, NAME, name */ ENET_SUBSMAC_DESC, ENET_SUBSMAC_NAME, ENET_SUBSMAC_name,
  1611. /* disablement strs */ NULL, NULL },
  1612. { /* entry idx, value */ 24, VALUE_OPT_ENET_MAC_SEED,
  1613. /* equiv idx, value */ 24, VALUE_OPT_ENET_MAC_SEED,
  1614. /* equivalenced to */ NO_EQUIVALENT,
  1615. /* min, max, act ct */ 0, 1, 0,
  1616. /* opt state flags */ ENET_MAC_SEED_FLAGS, 0,
  1617. /* last opt argumnt */ { NULL }, /* --enet-mac-seed */
  1618. /* arg list/cookie */ NULL,
  1619. /* must/cannot opts */ NULL, aEnet_Mac_SeedCantList,
  1620. /* option proc */ optionNumericVal,
  1621. /* desc, NAME, name */ ENET_MAC_SEED_DESC, ENET_MAC_SEED_NAME, ENET_MAC_SEED_name,
  1622. /* disablement strs */ NULL, NULL },
  1623. { /* entry idx, value */ 25, VALUE_OPT_ENET_MAC_SEED_KEEP_BYTES,
  1624. /* equiv idx, value */ 25, VALUE_OPT_ENET_MAC_SEED_KEEP_BYTES,
  1625. /* equivalenced to */ NO_EQUIVALENT,
  1626. /* min, max, act ct */ 0, 1, 0,
  1627. /* opt state flags */ ENET_MAC_SEED_KEEP_BYTES_FLAGS, 0,
  1628. /* last opt argumnt */ { NULL }, /* --enet-mac-seed-keep-bytes */
  1629. /* arg list/cookie */ NULL,
  1630. /* must/cannot opts */ aEnet_Mac_Seed_Keep_BytesMustList, NULL,
  1631. /* option proc */ doOptEnet_Mac_Seed_Keep_Bytes,
  1632. /* desc, NAME, name */ ENET_MAC_SEED_KEEP_BYTES_DESC, ENET_MAC_SEED_KEEP_BYTES_NAME, ENET_MAC_SEED_KEEP_BYTES_name,
  1633. /* disablement strs */ NULL, NULL },
  1634. { /* entry idx, value */ 26, VALUE_OPT_ENET_VLAN,
  1635. /* equiv idx, value */ 26, VALUE_OPT_ENET_VLAN,
  1636. /* equivalenced to */ NO_EQUIVALENT,
  1637. /* min, max, act ct */ 0, 1, 0,
  1638. /* opt state flags */ ENET_VLAN_FLAGS, 0,
  1639. /* last opt argumnt */ { NULL }, /* --enet-vlan */
  1640. /* arg list/cookie */ NULL,
  1641. /* must/cannot opts */ NULL, NULL,
  1642. /* option proc */ NULL,
  1643. /* desc, NAME, name */ ENET_VLAN_DESC, ENET_VLAN_NAME, ENET_VLAN_name,
  1644. /* disablement strs */ NULL, NULL },
  1645. { /* entry idx, value */ 27, VALUE_OPT_ENET_VLAN_TAG,
  1646. /* equiv idx, value */ 27, VALUE_OPT_ENET_VLAN_TAG,
  1647. /* equivalenced to */ NO_EQUIVALENT,
  1648. /* min, max, act ct */ 0, 1, 0,
  1649. /* opt state flags */ ENET_VLAN_TAG_FLAGS, 0,
  1650. /* last opt argumnt */ { NULL }, /* --enet-vlan-tag */
  1651. /* arg list/cookie */ NULL,
  1652. /* must/cannot opts */ aEnet_Vlan_TagMustList, NULL,
  1653. /* option proc */ doOptEnet_Vlan_Tag,
  1654. /* desc, NAME, name */ ENET_VLAN_TAG_DESC, ENET_VLAN_TAG_NAME, ENET_VLAN_TAG_name,
  1655. /* disablement strs */ NULL, NULL },
  1656. { /* entry idx, value */ 28, VALUE_OPT_ENET_VLAN_CFI,
  1657. /* equiv idx, value */ 28, VALUE_OPT_ENET_VLAN_CFI,
  1658. /* equivalenced to */ NO_EQUIVALENT,
  1659. /* min, max, act ct */ 0, 1, 0,
  1660. /* opt state flags */ ENET_VLAN_CFI_FLAGS, 0,
  1661. /* last opt argumnt */ { NULL }, /* --enet-vlan-cfi */
  1662. /* arg list/cookie */ NULL,
  1663. /* must/cannot opts */ aEnet_Vlan_CfiMustList, NULL,
  1664. /* option proc */ doOptEnet_Vlan_Cfi,
  1665. /* desc, NAME, name */ ENET_VLAN_CFI_DESC, ENET_VLAN_CFI_NAME, ENET_VLAN_CFI_name,
  1666. /* disablement strs */ NULL, NULL },
  1667. { /* entry idx, value */ 29, VALUE_OPT_ENET_VLAN_PRI,
  1668. /* equiv idx, value */ 29, VALUE_OPT_ENET_VLAN_PRI,
  1669. /* equivalenced to */ NO_EQUIVALENT,
  1670. /* min, max, act ct */ 0, 1, 0,
  1671. /* opt state flags */ ENET_VLAN_PRI_FLAGS, 0,
  1672. /* last opt argumnt */ { NULL }, /* --enet-vlan-pri */
  1673. /* arg list/cookie */ NULL,
  1674. /* must/cannot opts */ aEnet_Vlan_PriMustList, NULL,
  1675. /* option proc */ doOptEnet_Vlan_Pri,
  1676. /* desc, NAME, name */ ENET_VLAN_PRI_DESC, ENET_VLAN_PRI_NAME, ENET_VLAN_PRI_name,
  1677. /* disablement strs */ NULL, NULL },
  1678. { /* entry idx, value */ 30, VALUE_OPT_HDLC_CONTROL,
  1679. /* equiv idx, value */ 30, VALUE_OPT_HDLC_CONTROL,
  1680. /* equivalenced to */ NO_EQUIVALENT,
  1681. /* min, max, act ct */ 0, 1, 0,
  1682. /* opt state flags */ HDLC_CONTROL_FLAGS, 0,
  1683. /* last opt argumnt */ { NULL }, /* --hdlc-control */
  1684. /* arg list/cookie */ NULL,
  1685. /* must/cannot opts */ NULL, NULL,
  1686. /* option proc */ optionNumericVal,
  1687. /* desc, NAME, name */ HDLC_CONTROL_DESC, HDLC_CONTROL_NAME, HDLC_CONTROL_name,
  1688. /* disablement strs */ NULL, NULL },
  1689. { /* entry idx, value */ 31, VALUE_OPT_HDLC_ADDRESS,
  1690. /* equiv idx, value */ 31, VALUE_OPT_HDLC_ADDRESS,
  1691. /* equivalenced to */ NO_EQUIVALENT,
  1692. /* min, max, act ct */ 0, 1, 0,
  1693. /* opt state flags */ HDLC_ADDRESS_FLAGS, 0,
  1694. /* last opt argumnt */ { NULL }, /* --hdlc-address */
  1695. /* arg list/cookie */ NULL,
  1696. /* must/cannot opts */ NULL, NULL,
  1697. /* option proc */ optionNumericVal,
  1698. /* desc, NAME, name */ HDLC_ADDRESS_DESC, HDLC_ADDRESS_NAME, HDLC_ADDRESS_name,
  1699. /* disablement strs */ NULL, NULL },
  1700. { /* entry idx, value */ 32, VALUE_OPT_USER_DLT,
  1701. /* equiv idx, value */ 32, VALUE_OPT_USER_DLT,
  1702. /* equivalenced to */ NO_EQUIVALENT,
  1703. /* min, max, act ct */ 0, 1, 0,
  1704. /* opt state flags */ USER_DLT_FLAGS, 0,
  1705. /* last opt argumnt */ { NULL }, /* --user-dlt */
  1706. /* arg list/cookie */ NULL,
  1707. /* must/cannot opts */ NULL, NULL,
  1708. /* option proc */ optionNumericVal,
  1709. /* desc, NAME, name */ USER_DLT_DESC, USER_DLT_NAME, USER_DLT_name,
  1710. /* disablement strs */ NULL, NULL },
  1711. { /* entry idx, value */ 33, VALUE_OPT_USER_DLINK,
  1712. /* equiv idx, value */ 33, VALUE_OPT_USER_DLINK,
  1713. /* equivalenced to */ NO_EQUIVALENT,
  1714. /* min, max, act ct */ 0, 2, 0,
  1715. /* opt state flags */ USER_DLINK_FLAGS, 0,
  1716. /* last opt argumnt */ { NULL }, /* --user-dlink */
  1717. /* arg list/cookie */ NULL,
  1718. /* must/cannot opts */ NULL, NULL,
  1719. /* option proc */ optionStackArg,
  1720. /* desc, NAME, name */ USER_DLINK_DESC, USER_DLINK_NAME, USER_DLINK_name,
  1721. /* disablement strs */ NULL, NULL },
  1722. { /* entry idx, value */ 34, VALUE_OPT_DBUG,
  1723. /* equiv idx, value */ 34, VALUE_OPT_DBUG,
  1724. /* equivalenced to */ NO_EQUIVALENT,
  1725. /* min, max, act ct */ 0, 1, 0,
  1726. /* opt state flags */ DBUG_FLAGS, 0,
  1727. /* last opt argumnt */ { DBUG_DFT_ARG },
  1728. /* arg list/cookie */ NULL,
  1729. /* must/cannot opts */ NULL, NULL,
  1730. /* option proc */ doOptDbug,
  1731. /* desc, NAME, name */ DBUG_DESC, DBUG_NAME, DBUG_name,
  1732. /* disablement strs */ NULL, NULL },
  1733. { /* entry idx, value */ 35, VALUE_OPT_QUIET,
  1734. /* equiv idx, value */ 35, VALUE_OPT_QUIET,
  1735. /* equivalenced to */ NO_EQUIVALENT,
  1736. /* min, max, act ct */ 0, 1, 0,
  1737. /* opt state flags */ QUIET_FLAGS, 0,
  1738. /* last opt argumnt */ { NULL }, /* --quiet */
  1739. /* arg list/cookie */ NULL,
  1740. /* must/cannot opts */ NULL, NULL,
  1741. /* option proc */ NULL,
  1742. /* desc, NAME, name */ QUIET_DESC, QUIET_NAME, QUIET_name,
  1743. /* disablement strs */ NULL, NULL },
  1744. { /* entry idx, value */ 36, VALUE_OPT_TIMER,
  1745. /* equiv idx, value */ 36, VALUE_OPT_TIMER,
  1746. /* equivalenced to */ NO_EQUIVALENT,
  1747. /* min, max, act ct */ 0, 1, 0,
  1748. /* opt state flags */ TIMER_FLAGS, 0,
  1749. /* last opt argumnt */ { TIMER_DFT_ARG },
  1750. /* arg list/cookie */ NULL,
  1751. /* must/cannot opts */ NULL, NULL,
  1752. /* option proc */ NULL,
  1753. /* desc, NAME, name */ TIMER_DESC, TIMER_NAME, TIMER_name,
  1754. /* disablement strs */ NULL, NULL },
  1755. { /* entry idx, value */ 37, VALUE_OPT_MAXSLEEP,
  1756. /* equiv idx, value */ 37, VALUE_OPT_MAXSLEEP,
  1757. /* equivalenced to */ NO_EQUIVALENT,
  1758. /* min, max, act ct */ 0, 1, 0,
  1759. /* opt state flags */ MAXSLEEP_FLAGS, 0,
  1760. /* last opt argumnt */ { MAXSLEEP_DFT_ARG },
  1761. /* arg list/cookie */ NULL,
  1762. /* must/cannot opts */ NULL, NULL,
  1763. /* option proc */ optionNumericVal,
  1764. /* desc, NAME, name */ MAXSLEEP_DESC, MAXSLEEP_NAME, MAXSLEEP_name,
  1765. /* disablement strs */ NULL, NULL },
  1766. { /* entry idx, value */ 38, VALUE_OPT_VERBOSE,
  1767. /* equiv idx, value */ 38, VALUE_OPT_VERBOSE,
  1768. /* equivalenced to */ NO_EQUIVALENT,
  1769. /* min, max, act ct */ 0, 1, 0,
  1770. /* opt state flags */ VERBOSE_FLAGS, 0,
  1771. /* last opt argumnt */ { NULL }, /* --verbose */
  1772. /* arg list/cookie */ NULL,
  1773. /* must/cannot opts */ NULL, NULL,
  1774. /* option proc */ NULL,
  1775. /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
  1776. /* disablement strs */ NULL, NULL },
  1777. { /* entry idx, value */ 39, VALUE_OPT_DECODE,
  1778. /* equiv idx, value */ 39, VALUE_OPT_DECODE,
  1779. /* equivalenced to */ NO_EQUIVALENT,
  1780. /* min, max, act ct */ 0, 1, 0,
  1781. /* opt state flags */ DECODE_FLAGS, 0,
  1782. /* last opt argumnt */ { NULL }, /* --decode */
  1783. /* arg list/cookie */ NULL,
  1784. /* must/cannot opts */ aDecodeMustList, NULL,
  1785. /* option proc */ NULL,
  1786. /* desc, NAME, name */ DECODE_DESC, DECODE_NAME, DECODE_name,
  1787. /* disablement strs */ NULL, NULL },
  1788. { /* entry idx, value */ 40, VALUE_OPT_PRELOAD_PCAP,
  1789. /* equiv idx, value */ 40, VALUE_OPT_PRELOAD_PCAP,
  1790. /* equivalenced to */ NO_EQUIVALENT,
  1791. /* min, max, act ct */ 0, 1, 0,
  1792. /* opt state flags */ PRELOAD_PCAP_FLAGS, 0,
  1793. /* last opt argumnt */ { NULL }, /* --preload_pcap */
  1794. /* arg list/cookie */ NULL,
  1795. /* must/cannot opts */ NULL, NULL,
  1796. /* option proc */ NULL,
  1797. /* desc, NAME, name */ PRELOAD_PCAP_DESC, PRELOAD_PCAP_NAME, PRELOAD_PCAP_name,
  1798. /* disablement strs */ NULL, NULL },
  1799. { /* entry idx, value */ 41, VALUE_OPT_CACHEFILE,
  1800. /* equiv idx, value */ 41, VALUE_OPT_CACHEFILE,
  1801. /* equivalenced to */ NO_EQUIVALENT,
  1802. /* min, max, act ct */ 0, 1, 0,
  1803. /* opt state flags */ CACHEFILE_FLAGS, 0,
  1804. /* last opt argumnt */ { NULL }, /* --cachefile */
  1805. /* arg list/cookie */ NULL,
  1806. /* must/cannot opts */ aCachefileMustList, aCachefileCantList,
  1807. /* option proc */ NULL,
  1808. /* desc, NAME, name */ CACHEFILE_DESC, CACHEFILE_NAME, CACHEFILE_name,
  1809. /* disablement strs */ NULL, NULL },
  1810. { /* entry idx, value */ 42, VALUE_OPT_DUALFILE,
  1811. /* equiv idx, value */ 42, VALUE_OPT_DUALFILE,
  1812. /* equivalenced to */ NO_EQUIVALENT,
  1813. /* min, max, act ct */ 0, 1, 0,
  1814. /* opt state flags */ DUALFILE_FLAGS, 0,
  1815. /* last opt argumnt */ { NULL }, /* --dualfile */
  1816. /* arg list/cookie */ NULL,
  1817. /* must/cannot opts */ aDualfileMustList, aDualfileCantList,
  1818. /* option proc */ NULL,
  1819. /* desc, NAME, name */ DUALFILE_DESC, DUALFILE_NAME, DUALFILE_name,
  1820. /* disablement strs */ NULL, NULL },
  1821. { /* entry idx, value */ 43, VALUE_OPT_INTF1,
  1822. /* equiv idx, value */ 43, VALUE_OPT_INTF1,
  1823. /* equivalenced to */ NO_EQUIVALENT,
  1824. /* min, max, act ct */ 1, 1, 0,
  1825. /* opt state flags */ INTF1_FLAGS, 0,
  1826. /* last opt argumnt */ { NULL }, /* --intf1 */
  1827. /* arg list/cookie */ NULL,
  1828. /* must/cannot opts */ NULL, NULL,
  1829. /* option proc */ NULL,
  1830. /* desc, NAME, name */ INTF1_DESC, INTF1_NAME, INTF1_name,
  1831. /* disablement strs */ NULL, NULL },
  1832. { /* entry idx, value */ 44, VALUE_OPT_INTF2,
  1833. /* equiv idx, value */ 44, VALUE_OPT_INTF2,
  1834. /* equivalenced to */ NO_EQUIVALENT,
  1835. /* min, max, act ct */ 0, 1, 0,
  1836. /* opt state flags */ INTF2_FLAGS, 0,
  1837. /* last opt argumnt */ { NULL }, /* --intf2 */
  1838. /* arg list/cookie */ NULL,
  1839. /* must/cannot opts */ NULL, NULL,
  1840. /* option proc */ NULL,
  1841. /* desc, NAME, name */ INTF2_DESC, INTF2_NAME, INTF2_name,
  1842. /* disablement strs */ NULL, NULL },
  1843. { /* entry idx, value */ 45, VALUE_OPT_LISTNICS,
  1844. /* equiv idx, value */ 45, VALUE_OPT_LISTNICS,
  1845. /* equivalenced to */ NO_EQUIVALENT,
  1846. /* min, max, act ct */ 0, 1, 0,
  1847. /* opt state flags */ LISTNICS_FLAGS, 0,
  1848. /* last opt argumnt */ { NULL }, /* --listnics */
  1849. /* arg list/cookie */ NULL,
  1850. /* must/cannot opts */ NULL, NULL,
  1851. /* option proc */ doOptListnics,
  1852. /* desc, NAME, name */ LISTNICS_DESC, LISTNICS_NAME, LISTNICS_name,
  1853. /* disablement strs */ NULL, NULL },
  1854. { /* entry idx, value */ 46, VALUE_OPT_LOOP,
  1855. /* equiv idx, value */ 46, VALUE_OPT_LOOP,
  1856. /* equivalenced to */ NO_EQUIVALENT,
  1857. /* min, max, act ct */ 0, 1, 0,
  1858. /* opt state flags */ LOOP_FLAGS, 0,
  1859. /* last opt argumnt */ { LOOP_DFT_ARG },
  1860. /* arg list/cookie */ NULL,
  1861. /* must/cannot opts */ NULL, NULL,
  1862. /* option proc */ doOptLoop,
  1863. /* desc, NAME, name */ LOOP_DESC, LOOP_NAME, LOOP_name,
  1864. /* disablement strs */ NULL, NULL },
  1865. { /* entry idx, value */ 47, VALUE_OPT_LOOPDELAY_MS,
  1866. /* equiv idx, value */ 47, VALUE_OPT_LOOPDELAY_MS,
  1867. /* equivalenced to */ NO_EQUIVALENT,
  1868. /* min, max, act ct */ 0, 1, 0,
  1869. /* opt state flags */ LOOPDELAY_MS_FLAGS, 0,
  1870. /* last opt argumnt */ { LOOPDELAY_MS_DFT_ARG },
  1871. /* arg list/cookie */ NULL,
  1872. /* must/cannot opts */ aLoopdelay_MsMustList, NULL,
  1873. /* option proc */ doOptLoopdelay_Ms,
  1874. /* desc, NAME, name */ LOOPDELAY_MS_DESC, LOOPDELAY_MS_NAME, LOOPDELAY_MS_name,
  1875. /* disablement strs */ NULL, NULL },
  1876. { /* entry idx, value */ 48, VALUE_OPT_PKTLEN,
  1877. /* equiv idx, value */ 48, VALUE_OPT_PKTLEN,
  1878. /* equivalenced to */ NO_EQUIVALENT,
  1879. /* min, max, act ct */ 0, 1, 0,
  1880. /* opt state flags */ PKTLEN_FLAGS, 0,
  1881. /* last opt argumnt */ { NULL }, /* --pktlen */
  1882. /* arg list/cookie */ NULL,
  1883. /* must/cannot opts */ NULL, NULL,
  1884. /* option proc */ NULL,
  1885. /* desc, NAME, name */ PKTLEN_DESC, PKTLEN_NAME, PKTLEN_name,
  1886. /* disablement strs */ NULL, NULL },
  1887. { /* entry idx, value */ 49, VALUE_OPT_LIMIT,
  1888. /* equiv idx, value */ 49, VALUE_OPT_LIMIT,
  1889. /* equivalenced to */ NO_EQUIVALENT,
  1890. /* min, max, act ct */ 0, 1, 0,
  1891. /* opt state flags */ LIMIT_FLAGS, 0,
  1892. /* last opt argumnt */ { LIMIT_DFT_ARG },
  1893. /* arg list/cookie */ NULL,
  1894. /* must/cannot opts */ NULL, NULL,
  1895. /* option proc */ doOptLimit,
  1896. /* desc, NAME, name */ LIMIT_DESC, LIMIT_NAME, LIMIT_name,
  1897. /* disablement strs */ NULL, NULL },
  1898. { /* entry idx, value */ 50, VALUE_OPT_DURATION,
  1899. /* equiv idx, value */ 50, VALUE_OPT_DURATION,
  1900. /* equivalenced to */ NO_EQUIVALENT,
  1901. /* min, max, act ct */ 0, 1, 0,
  1902. /* opt state flags */ DURATION_FLAGS, 0,
  1903. /* last opt argumnt */ { DURATION_DFT_ARG },
  1904. /* arg list/cookie */ NULL,
  1905. /* must/cannot opts */ NULL, NULL,
  1906. /* option proc */ doOptDuration,
  1907. /* desc, NAME, name */ DURATION_DESC, DURATION_NAME, DURATION_name,
  1908. /* disablement strs */ NULL, NULL },
  1909. { /* entry idx, value */ 51, VALUE_OPT_MULTIPLIER,
  1910. /* equiv idx, value */ 51, VALUE_OPT_MULTIPLIER,
  1911. /* equivalenced to */ NO_EQUIVALENT,
  1912. /* min, max, act ct */ 0, 1, 0,
  1913. /* opt state flags */ MULTIPLIER_FLAGS, 0,
  1914. /* last opt argumnt */ { NULL }, /* --multiplier */
  1915. /* arg list/cookie */ NULL,
  1916. /* must/cannot opts */ NULL, aMultiplierCantList,
  1917. /* option proc */ NULL,
  1918. /* desc, NAME, name */ MULTIPLIER_DESC, MULTIPLIER_NAME, MULTIPLIER_name,
  1919. /* disablement strs */ NULL, NULL },
  1920. { /* entry idx, value */ 52, VALUE_OPT_PPS,
  1921. /* equiv idx, value */ 52, VALUE_OPT_PPS,
  1922. /* equivalenced to */ NO_EQUIVALENT,
  1923. /* min, max, act ct */ 0, 1, 0,
  1924. /* opt state flags */ PPS_FLAGS, 0,
  1925. /* last opt argumnt */ { NULL }, /* --pps */
  1926. /* arg list/cookie */ NULL,
  1927. /* must/cannot opts */ NULL, aPpsCantList,
  1928. /* option proc */ NULL,
  1929. /* desc, NAME, name */ PPS_DESC, PPS_NAME, PPS_name,
  1930. /* disablement strs */ NULL, NULL },
  1931. { /* entry idx, value */ 53, VALUE_OPT_MBPS,
  1932. /* equiv idx, value */ 53, VALUE_OPT_MBPS,
  1933. /* equivalenced to */ NO_EQUIVALENT,
  1934. /* min, max, act ct */ 0, 1, 0,
  1935. /* opt state flags */ MBPS_FLAGS, 0,
  1936. /* last opt argumnt */ { NULL }, /* --mbps */
  1937. /* arg list/cookie */ NULL,
  1938. /* must/cannot opts */ NULL, aMbpsCantList,
  1939. /* option proc */ NULL,
  1940. /* desc, NAME, name */ MBPS_DESC, MBPS_NAME, MBPS_name,
  1941. /* disablement strs */ NULL, NULL },
  1942. { /* entry idx, value */ 54, VALUE_OPT_TOPSPEED,
  1943. /* equiv idx, value */ 54, VALUE_OPT_TOPSPEED,
  1944. /* equivalenced to */ NO_EQUIVALENT,
  1945. /* min, max, act ct */ 0, 1, 0,
  1946. /* opt state flags */ TOPSPEED_FLAGS, 0,
  1947. /* last opt argumnt */ { NULL }, /* --topspeed */
  1948. /* arg list/cookie */ NULL,
  1949. /* must/cannot opts */ NULL, aTopspeedCantList,
  1950. /* option proc */ NULL,
  1951. /* desc, NAME, name */ TOPSPEED_DESC, TOPSPEED_NAME, TOPSPEED_name,
  1952. /* disablement strs */ NULL, NULL },
  1953. { /* entry idx, value */ 55, VALUE_OPT_ONEATATIME,
  1954. /* equiv idx, value */ 55, VALUE_OPT_ONEATATIME,
  1955. /* equivalenced to */ NO_EQUIVALENT,
  1956. /* min, max, act ct */ 0, 1, 0,
  1957. /* opt state flags */ ONEATATIME_FLAGS, 0,
  1958. /* last opt argumnt */ { NULL }, /* --oneatatime */
  1959. /* arg list/cookie */ NULL,
  1960. /* must/cannot opts */ NULL, aOneatatimeCantList,
  1961. /* option proc */ NULL,
  1962. /* desc, NAME, name */ ONEATATIME_DESC, ONEATATIME_NAME, ONEATATIME_name,
  1963. /* disablement strs */ NULL, NULL },
  1964. { /* entry idx, value */ 56, VALUE_OPT_PPS_MULTI,
  1965. /* equiv idx, value */ 56, VALUE_OPT_PPS_MULTI,
  1966. /* equivalenced to */ NO_EQUIVALENT,
  1967. /* min, max, act ct */ 0, 1, 0,
  1968. /* opt state flags */ PPS_MULTI_FLAGS, 0,
  1969. /* last opt argumnt */ { PPS_MULTI_DFT_ARG },
  1970. /* arg list/cookie */ NULL,
  1971. /* must/cannot opts */ aPps_MultiMustList, NULL,
  1972. /* option proc */ doOptPps_Multi,
  1973. /* desc, NAME, name */ PPS_MULTI_DESC, PPS_MULTI_NAME, PPS_MULTI_name,
  1974. /* disablement strs */ NULL, NULL },
  1975. { /* entry idx, value */ 57, VALUE_OPT_UNIQUE_IP,
  1976. /* equiv idx, value */ 57, VALUE_OPT_UNIQUE_IP,
  1977. /* equivalenced to */ NO_EQUIVALENT,
  1978. /* min, max, act ct */ 0, 1, 0,
  1979. /* opt state flags */ UNIQUE_IP_FLAGS, 0,
  1980. /* last opt argumnt */ { NULL }, /* --unique-ip */
  1981. /* arg list/cookie */ NULL,
  1982. /* must/cannot opts */ aUnique_IpMustList, aUnique_IpCantList,
  1983. /* option proc */ NULL,
  1984. /* desc, NAME, name */ UNIQUE_IP_DESC, UNIQUE_IP_NAME, UNIQUE_IP_name,
  1985. /* disablement strs */ NULL, NULL },
  1986. { /* entry idx, value */ 58, VALUE_OPT_UNIQUE_IP_LOOPS,
  1987. /* equiv idx, value */ 58, VALUE_OPT_UNIQUE_IP_LOOPS,
  1988. /* equivalenced to */ NO_EQUIVALENT,
  1989. /* min, max, act ct */ 0, 1, 0,
  1990. /* opt state flags */ UNIQUE_IP_LOOPS_FLAGS, 0,
  1991. /* last opt argumnt */ { NULL }, /* --unique-ip-loops */
  1992. /* arg list/cookie */ NULL,
  1993. /* must/cannot opts */ aUnique_Ip_LoopsMustList, NULL,
  1994. /* option proc */ NULL,
  1995. /* desc, NAME, name */ UNIQUE_IP_LOOPS_DESC, UNIQUE_IP_LOOPS_NAME, UNIQUE_IP_LOOPS_name,
  1996. /* disablement strs */ NULL, NULL },
  1997. { /* entry idx, value */ 59, VALUE_OPT_NETMAP,
  1998. /* equiv idx, value */ 59, VALUE_OPT_NETMAP,
  1999. /* equivalenced to */ NO_EQUIVALENT,
  2000. /* min, max, act ct */ 0, 1, 0,
  2001. /* opt state flags */ NETMAP_FLAGS, 0,
  2002. /* last opt argumnt */ { NULL }, /* --netmap */
  2003. /* arg list/cookie */ NULL,
  2004. /* must/cannot opts */ NULL, NULL,
  2005. /* option proc */ NULL,
  2006. /* desc, NAME, name */ NETMAP_DESC, NETMAP_NAME, NETMAP_name,
  2007. /* disablement strs */ NULL, NULL },
  2008. { /* entry idx, value */ 60, VALUE_OPT_NM_DELAY,
  2009. /* equiv idx, value */ 60, VALUE_OPT_NM_DELAY,
  2010. /* equivalenced to */ NO_EQUIVALENT,
  2011. /* min, max, act ct */ 0, 1, 0,
  2012. /* opt state flags */ NM_DELAY_FLAGS, 0,
  2013. /* last opt argumnt */ { NM_DELAY_DFT_ARG },
  2014. /* arg list/cookie */ NULL,
  2015. /* must/cannot opts */ NULL, NULL,
  2016. /* option proc */ optionNumericVal,
  2017. /* desc, NAME, name */ NM_DELAY_DESC, NM_DELAY_NAME, NM_DELAY_name,
  2018. /* disablement strs */ NULL, NULL },
  2019. { /* entry idx, value */ 61, VALUE_OPT_NO_FLOW_STATS,
  2020. /* equiv idx, value */ 61, VALUE_OPT_NO_FLOW_STATS,
  2021. /* equivalenced to */ NO_EQUIVALENT,
  2022. /* min, max, act ct */ 0, 1, 0,
  2023. /* opt state flags */ NO_FLOW_STATS_FLAGS, 0,
  2024. /* last opt argumnt */ { NULL }, /* --no-flow-stats */
  2025. /* arg list/cookie */ NULL,
  2026. /* must/cannot opts */ NULL, NULL,
  2027. /* option proc */ NULL,
  2028. /* desc, NAME, name */ NO_FLOW_STATS_DESC, NO_FLOW_STATS_NAME, NO_FLOW_STATS_name,
  2029. /* disablement strs */ NULL, NULL },
  2030. { /* entry idx, value */ 62, VALUE_OPT_FLOW_EXPIRY,
  2031. /* equiv idx, value */ 62, VALUE_OPT_FLOW_EXPIRY,
  2032. /* equivalenced to */ NO_EQUIVALENT,
  2033. /* min, max, act ct */ 0, 1, 0,
  2034. /* opt state flags */ FLOW_EXPIRY_FLAGS, 0,
  2035. /* last opt argumnt */ { FLOW_EXPIRY_DFT_ARG },
  2036. /* arg list/cookie */ NULL,
  2037. /* must/cannot opts */ NULL, aFlow_ExpiryCantList,
  2038. /* option proc */ doOptFlow_Expiry,
  2039. /* desc, NAME, name */ FLOW_EXPIRY_DESC, FLOW_EXPIRY_NAME, FLOW_EXPIRY_name,
  2040. /* disablement strs */ NULL, NULL },
  2041. { /* entry idx, value */ 63, VALUE_OPT_PID,
  2042. /* equiv idx, value */ 63, VALUE_OPT_PID,
  2043. /* equivalenced to */ NO_EQUIVALENT,
  2044. /* min, max, act ct */ 0, 1, 0,
  2045. /* opt state flags */ PID_FLAGS, 0,
  2046. /* last opt argumnt */ { NULL }, /* --pid */
  2047. /* arg list/cookie */ NULL,
  2048. /* must/cannot opts */ NULL, NULL,
  2049. /* option proc */ doOptPid,
  2050. /* desc, NAME, name */ PID_DESC, PID_NAME, PID_name,
  2051. /* disablement strs */ NULL, NULL },
  2052. { /* entry idx, value */ 64, VALUE_OPT_STATS,
  2053. /* equiv idx, value */ 64, VALUE_OPT_STATS,
  2054. /* equivalenced to */ NO_EQUIVALENT,
  2055. /* min, max, act ct */ 0, 1, 0,
  2056. /* opt state flags */ STATS_FLAGS, 0,
  2057. /* last opt argumnt */ { NULL }, /* --stats */
  2058. /* arg list/cookie */ NULL,
  2059. /* must/cannot opts */ NULL, NULL,
  2060. /* option proc */ doOptStats,
  2061. /* desc, NAME, name */ STATS_DESC, STATS_NAME, STATS_name,
  2062. /* disablement strs */ NULL, NULL },
  2063. { /* entry idx, value */ 65, VALUE_OPT_VERSION,
  2064. /* equiv idx, value */ 65, VALUE_OPT_VERSION,
  2065. /* equivalenced to */ NO_EQUIVALENT,
  2066. /* min, max, act ct */ 0, 1, 0,
  2067. /* opt state flags */ VERSION_FLAGS, 0,
  2068. /* last opt argumnt */ { NULL }, /* --version */
  2069. /* arg list/cookie */ NULL,
  2070. /* must/cannot opts */ NULL, NULL,
  2071. /* option proc */ doOptVersion,
  2072. /* desc, NAME, name */ VERSION_DESC, VERSION_NAME, VERSION_name,
  2073. /* disablement strs */ NULL, NULL },
  2074. { /* entry idx, value */ 66, VALUE_OPT_LESS_HELP,
  2075. /* equiv idx, value */ 66, VALUE_OPT_LESS_HELP,
  2076. /* equivalenced to */ NO_EQUIVALENT,
  2077. /* min, max, act ct */ 0, 1, 0,
  2078. /* opt state flags */ LESS_HELP_FLAGS, 0,
  2079. /* last opt argumnt */ { NULL }, /* --less-help */
  2080. /* arg list/cookie */ NULL,
  2081. /* must/cannot opts */ NULL, NULL,
  2082. /* option proc */ doOptLess_Help,
  2083. /* desc, NAME, name */ LESS_HELP_DESC, LESS_HELP_NAME, LESS_HELP_name,
  2084. /* disablement strs */ NULL, NULL },
  2085. { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
  2086. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
  2087. /* equivalenced to */ NO_EQUIVALENT,
  2088. /* min, max, act ct */ 0, 1, 0,
  2089. /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
  2090. /* last opt argumnt */ { NULL },
  2091. /* arg list/cookie */ NULL,
  2092. /* must/cannot opts */ NULL, NULL,
  2093. /* option proc */ doUsageOpt,
  2094. /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
  2095. /* disablement strs */ NULL, NULL },
  2096. { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
  2097. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
  2098. /* equivalenced to */ NO_EQUIVALENT,
  2099. /* min, max, act ct */ 0, 1, 0,
  2100. /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
  2101. /* last opt argumnt */ { NULL },
  2102. /* arg list/cookie */ NULL,
  2103. /* must/cannot opts */ NULL, NULL,
  2104. /* option proc */ optionPagedUsage,
  2105. /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
  2106. /* disablement strs */ NULL, NULL },
  2107. { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
  2108. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
  2109. /* equivalenced to */ NO_EQUIVALENT,
  2110. /* min, max, act ct */ 0, 1, 0,
  2111. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
  2112. | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
  2113. /* last opt argumnt */ { NULL },
  2114. /* arg list/cookie */ NULL,
  2115. /* must/cannot opts */ NULL, NULL,
  2116. /* option proc */ NULL,
  2117. /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
  2118. /* disablement strs */ NULL, NULL },
  2119. { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
  2120. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
  2121. /* equivalenced to */ NO_EQUIVALENT,
  2122. /* min, max, act ct */ 0, NOLIMIT, 0,
  2123. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
  2124. | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
  2125. /* last opt argumnt */ { NULL },
  2126. /* arg list/cookie */ NULL,
  2127. /* must/cannot opts */ NULL, NULL,
  2128. /* option proc */ optionLoadOpt,
  2129. /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
  2130. /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
  2131. };
  2132. tOptDesc * const tcpedit_tcpedit_optDesc_p = optDesc + 0;
  2133. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2134. /** Reference to the upper cased version of tcpreplay. */
  2135. #define zPROGNAME (tcpreplay_opt_strs+5072)
  2136. /** Reference to the title line for tcpreplay usage. */
  2137. #define zUsageTitle (tcpreplay_opt_strs+5082)
  2138. /** tcpreplay configuration file name. */
  2139. #define zRcName (tcpreplay_opt_strs+5227)
  2140. /** Directories to search for tcpreplay config files. */
  2141. static char const * const apzHomeList[2] = {
  2142. tcpreplay_opt_strs+5223,
  2143. NULL };
  2144. /** The tcpreplay program bug email address. */
  2145. #define zBugsAddr (tcpreplay_opt_strs+5240)
  2146. /** Clarification/explanation of what tcpreplay does. */
  2147. #define zExplain (tcpreplay_opt_strs+5278)
  2148. /** Extra detail explaining what tcpreplay does. */
  2149. #define zDetail (tcpreplay_opt_strs+5401)
  2150. /** The full version string for tcpreplay. */
  2151. #define zFullVersion (NULL)
  2152. /* extracted from optcode.tlib near line 364 */
  2153. #if defined(ENABLE_NLS)
  2154. # define OPTPROC_BASE OPTPROC_TRANSLATE
  2155. static tOptionXlateProc translate_option_strings;
  2156. #else
  2157. # define OPTPROC_BASE OPTPROC_NONE
  2158. # define translate_option_strings NULL
  2159. #endif /* ENABLE_NLS */
  2160. #define tcpreplay_full_usage (NULL)
  2161. #define tcpreplay_short_usage (NULL)
  2162. #endif /* not defined __doxygen__ */
  2163. /*
  2164. * Create the static procedure(s) declared above.
  2165. */
  2166. /**
  2167. * The callout function that invokes the optionUsage function.
  2168. *
  2169. * @param[in] opts the AutoOpts option description structure
  2170. * @param[in] od the descriptor for the "help" (usage) option.
  2171. * @noreturn
  2172. */
  2173. static void
  2174. doUsageOpt(tOptions * opts, tOptDesc * od)
  2175. {
  2176. int ex_code;
  2177. ex_code = TCPREPLAY_EXIT_SUCCESS;
  2178. optionUsage(&tcpreplayOptions, ex_code);
  2179. /* NOTREACHED */
  2180. exit(1);
  2181. (void)opts;
  2182. (void)od;
  2183. }
  2184. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2185. /**
  2186. * Code to handle the mtu option.
  2187. * Override the default 1500 byte MTU size for determining the maximum padding length
  2188. * (--fixlen=pad) or when truncating (--mtu-trunc).
  2189. * @param[in] pOptions the tcpreplay options data structure
  2190. * @param[in,out] pOptDesc the option descriptor for this option.
  2191. */
  2192. static void
  2193. doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc)
  2194. {
  2195. static struct {long rmin, rmax;} const rng[1] = {
  2196. { 1, MAXPACKET } };
  2197. int ix;
  2198. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2199. goto emit_ranges;
  2200. optionNumericVal(pOptions, pOptDesc);
  2201. for (ix = 0; ix < 1; ix++) {
  2202. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2203. continue; /* ranges need not be ordered. */
  2204. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2205. return;
  2206. if (rng[ix].rmax == LONG_MIN)
  2207. continue;
  2208. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2209. return;
  2210. }
  2211. option_usage_fp = stderr;
  2212. emit_ranges:
  2213. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2214. }
  2215. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2216. /**
  2217. * Code to handle the tos option.
  2218. * Allows you to override the TOS (also known as DiffServ/ECN) value in IPv4.
  2219. * @param[in] pOptions the tcpreplay options data structure
  2220. * @param[in,out] pOptDesc the option descriptor for this option.
  2221. */
  2222. static void
  2223. doOptTos(tOptions* pOptions, tOptDesc* pOptDesc)
  2224. {
  2225. static struct {long rmin, rmax;} const rng[1] = {
  2226. { 0, 255 } };
  2227. int ix;
  2228. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2229. goto emit_ranges;
  2230. optionNumericVal(pOptions, pOptDesc);
  2231. for (ix = 0; ix < 1; ix++) {
  2232. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2233. continue; /* ranges need not be ordered. */
  2234. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2235. return;
  2236. if (rng[ix].rmax == LONG_MIN)
  2237. continue;
  2238. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2239. return;
  2240. }
  2241. option_usage_fp = stderr;
  2242. emit_ranges:
  2243. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2244. }
  2245. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2246. /**
  2247. * Code to handle the tclass option.
  2248. * Allows you to override the IPv6 Traffic Class field.
  2249. * @param[in] pOptions the tcpreplay options data structure
  2250. * @param[in,out] pOptDesc the option descriptor for this option.
  2251. */
  2252. static void
  2253. doOptTclass(tOptions* pOptions, tOptDesc* pOptDesc)
  2254. {
  2255. static struct {long rmin, rmax;} const rng[1] = {
  2256. { 0, 255 } };
  2257. int ix;
  2258. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2259. goto emit_ranges;
  2260. optionNumericVal(pOptions, pOptDesc);
  2261. for (ix = 0; ix < 1; ix++) {
  2262. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2263. continue; /* ranges need not be ordered. */
  2264. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2265. return;
  2266. if (rng[ix].rmax == LONG_MIN)
  2267. continue;
  2268. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2269. return;
  2270. }
  2271. option_usage_fp = stderr;
  2272. emit_ranges:
  2273. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2274. }
  2275. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2276. /**
  2277. * Code to handle the flowlabel option.
  2278. * Allows you to override the 20bit IPv6 Flow Label field. Has no effect on IPv4
  2279. * packets.
  2280. * @param[in] pOptions the tcpreplay options data structure
  2281. * @param[in,out] pOptDesc the option descriptor for this option.
  2282. */
  2283. static void
  2284. doOptFlowlabel(tOptions* pOptions, tOptDesc* pOptDesc)
  2285. {
  2286. static struct {long rmin, rmax;} const rng[1] = {
  2287. { 0, 1048575 } };
  2288. int ix;
  2289. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2290. goto emit_ranges;
  2291. optionNumericVal(pOptions, pOptDesc);
  2292. for (ix = 0; ix < 1; ix++) {
  2293. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2294. continue; /* ranges need not be ordered. */
  2295. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2296. return;
  2297. if (rng[ix].rmax == LONG_MIN)
  2298. continue;
  2299. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2300. return;
  2301. }
  2302. option_usage_fp = stderr;
  2303. emit_ranges:
  2304. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2305. }
  2306. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2307. /**
  2308. * Code to handle the fuzz-seed option.
  2309. * This fuzzing was designed as to test layer 7 protocols such as voip protocols.
  2310. * It modifies randomly 1 out of X packets (where X = @var{--fuzz-factor}) in order
  2311. * for stateful protocols to cover more of their code. The random fuzzing actions
  2312. * focus on data start and end because it often is the part of the data application
  2313. * protocols base their decisions on.
  2314. *
  2315. * Possible fuzzing actions list:
  2316. * * drop packet
  2317. * * reduce packet size
  2318. * * edit packet Bytes:
  2319. * * Not all Bytes have the same probability of appearance in real life.
  2320. * Replace with 0x00, 0xFF, or a random byte with equal likelyhook
  2321. * * Not all Bytes have the same significance in a packet.
  2322. * Replace the start, the end, or the middle of the packet with equal likelihood.
  2323. * * do nothing (7 out of 8 packets)
  2324. *
  2325. * @param[in] pOptions the tcpreplay options data structure
  2326. * @param[in,out] pOptDesc the option descriptor for this option.
  2327. */
  2328. static void
  2329. doOptFuzz_Seed(tOptions* pOptions, tOptDesc* pOptDesc)
  2330. {
  2331. static struct {long rmin, rmax;} const rng[1] = {
  2332. { 0, LONG_MAX } };
  2333. int ix;
  2334. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2335. goto emit_ranges;
  2336. optionNumericVal(pOptions, pOptDesc);
  2337. for (ix = 0; ix < 1; ix++) {
  2338. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2339. continue; /* ranges need not be ordered. */
  2340. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2341. return;
  2342. if (rng[ix].rmax == LONG_MIN)
  2343. continue;
  2344. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2345. return;
  2346. }
  2347. option_usage_fp = stderr;
  2348. emit_ranges:
  2349. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2350. }
  2351. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2352. /**
  2353. * Code to handle the fuzz-factor option.
  2354. * Sets the ratio of for @var{--fuzz-seed} option. By default this value is 8,
  2355. * which means 1 in 8 packets are modified by fuzzing. Note that this ratio is
  2356. * based on the random number genereated by the supplied fuzz seed. Therefore by
  2357. * default you cannot expect that exactly every eighth packet will be modified.
  2358. * @param[in] pOptions the tcpreplay options data structure
  2359. * @param[in,out] pOptDesc the option descriptor for this option.
  2360. */
  2361. static void
  2362. doOptFuzz_Factor(tOptions* pOptions, tOptDesc* pOptDesc)
  2363. {
  2364. static struct {long rmin, rmax;} const rng[1] = {
  2365. { 1, LONG_MAX } };
  2366. int ix;
  2367. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2368. goto emit_ranges;
  2369. optionNumericVal(pOptions, pOptDesc);
  2370. for (ix = 0; ix < 1; ix++) {
  2371. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2372. continue; /* ranges need not be ordered. */
  2373. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2374. return;
  2375. if (rng[ix].rmax == LONG_MIN)
  2376. continue;
  2377. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2378. return;
  2379. }
  2380. option_usage_fp = stderr;
  2381. emit_ranges:
  2382. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2383. }
  2384. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2385. /**
  2386. * Code to handle the enet-mac-seed-keep-bytes option.
  2387. * Keep some bytes untouched when usinging @var{--enet-mac-seed} option.
  2388. * @param[in] pOptions the tcpreplay options data structure
  2389. * @param[in,out] pOptDesc the option descriptor for this option.
  2390. */
  2391. static void
  2392. doOptEnet_Mac_Seed_Keep_Bytes(tOptions* pOptions, tOptDesc* pOptDesc)
  2393. {
  2394. static struct {long rmin, rmax;} const rng[1] = {
  2395. { 1, 6 } };
  2396. int ix;
  2397. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2398. goto emit_ranges;
  2399. optionNumericVal(pOptions, pOptDesc);
  2400. for (ix = 0; ix < 1; ix++) {
  2401. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2402. continue; /* ranges need not be ordered. */
  2403. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2404. return;
  2405. if (rng[ix].rmax == LONG_MIN)
  2406. continue;
  2407. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2408. return;
  2409. }
  2410. option_usage_fp = stderr;
  2411. emit_ranges:
  2412. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2413. }
  2414. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2415. /**
  2416. * Code to handle the enet-vlan-tag option.
  2417. *
  2418. * @param[in] pOptions the tcpreplay options data structure
  2419. * @param[in,out] pOptDesc the option descriptor for this option.
  2420. */
  2421. static void
  2422. doOptEnet_Vlan_Tag(tOptions* pOptions, tOptDesc* pOptDesc)
  2423. {
  2424. static struct {long rmin, rmax;} const rng[1] = {
  2425. { 0, 4095 } };
  2426. int ix;
  2427. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2428. goto emit_ranges;
  2429. optionNumericVal(pOptions, pOptDesc);
  2430. for (ix = 0; ix < 1; ix++) {
  2431. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2432. continue; /* ranges need not be ordered. */
  2433. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2434. return;
  2435. if (rng[ix].rmax == LONG_MIN)
  2436. continue;
  2437. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2438. return;
  2439. }
  2440. option_usage_fp = stderr;
  2441. emit_ranges:
  2442. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2443. }
  2444. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2445. /**
  2446. * Code to handle the enet-vlan-cfi option.
  2447. *
  2448. * @param[in] pOptions the tcpreplay options data structure
  2449. * @param[in,out] pOptDesc the option descriptor for this option.
  2450. */
  2451. static void
  2452. doOptEnet_Vlan_Cfi(tOptions* pOptions, tOptDesc* pOptDesc)
  2453. {
  2454. static struct {long rmin, rmax;} const rng[1] = {
  2455. { 0, 1 } };
  2456. int ix;
  2457. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2458. goto emit_ranges;
  2459. optionNumericVal(pOptions, pOptDesc);
  2460. for (ix = 0; ix < 1; ix++) {
  2461. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2462. continue; /* ranges need not be ordered. */
  2463. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2464. return;
  2465. if (rng[ix].rmax == LONG_MIN)
  2466. continue;
  2467. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2468. return;
  2469. }
  2470. option_usage_fp = stderr;
  2471. emit_ranges:
  2472. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2473. }
  2474. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2475. /**
  2476. * Code to handle the enet-vlan-pri option.
  2477. *
  2478. * @param[in] pOptions the tcpreplay options data structure
  2479. * @param[in,out] pOptDesc the option descriptor for this option.
  2480. */
  2481. static void
  2482. doOptEnet_Vlan_Pri(tOptions* pOptions, tOptDesc* pOptDesc)
  2483. {
  2484. static struct {long rmin, rmax;} const rng[1] = {
  2485. { 0, 7 } };
  2486. int ix;
  2487. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2488. goto emit_ranges;
  2489. optionNumericVal(pOptions, pOptDesc);
  2490. for (ix = 0; ix < 1; ix++) {
  2491. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2492. continue; /* ranges need not be ordered. */
  2493. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2494. return;
  2495. if (rng[ix].rmax == LONG_MIN)
  2496. continue;
  2497. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2498. return;
  2499. }
  2500. option_usage_fp = stderr;
  2501. emit_ranges:
  2502. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2503. }
  2504. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2505. /**
  2506. * Code to handle the dbug option, when DEBUG is #define-d.
  2507. * If configured with --enable-debug, then you can specify a verbosity
  2508. * level for debugging output. Higher numbers increase verbosity.
  2509. * @param[in] pOptions the tcpreplay options data structure
  2510. * @param[in,out] pOptDesc the option descriptor for this option.
  2511. */
  2512. #ifdef DEBUG
  2513. static void
  2514. doOptDbug(tOptions* pOptions, tOptDesc* pOptDesc)
  2515. {
  2516. static struct {long rmin, rmax;} const rng[1] = {
  2517. { 0, 5 } };
  2518. int ix;
  2519. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2520. goto emit_ranges;
  2521. optionNumericVal(pOptions, pOptDesc);
  2522. for (ix = 0; ix < 1; ix++) {
  2523. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2524. continue; /* ranges need not be ordered. */
  2525. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2526. return;
  2527. if (rng[ix].rmax == LONG_MIN)
  2528. continue;
  2529. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2530. return;
  2531. }
  2532. option_usage_fp = stderr;
  2533. emit_ranges:
  2534. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2535. }
  2536. #endif /* defined DEBUG */
  2537. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2538. /**
  2539. * Code to handle the listnics option, when ENABLE_PCAP_FINDALLDEVS is #define-d.
  2540. *
  2541. * @param[in] pOptions the tcpreplay options data structure
  2542. * @param[in,out] pOptDesc the option descriptor for this option.
  2543. */
  2544. #ifdef ENABLE_PCAP_FINDALLDEVS
  2545. static void
  2546. doOptListnics(tOptions* pOptions, tOptDesc* pOptDesc)
  2547. {
  2548. /*
  2549. * Be sure the flag-code[0] handles special values for the options pointer
  2550. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  2551. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  2552. * reset its state.
  2553. */
  2554. /* extracted from tcpreplay_opts.def, line 297 */
  2555. interface_list_t *list = get_interface_list();
  2556. list_interfaces(list);
  2557. free(list);
  2558. exit(0);
  2559. (void)pOptDesc;
  2560. (void)pOptions;
  2561. }
  2562. #endif /* defined ENABLE_PCAP_FINDALLDEVS */
  2563. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2564. /**
  2565. * Code to handle the loop option.
  2566. *
  2567. * @param[in] pOptions the tcpreplay options data structure
  2568. * @param[in,out] pOptDesc the option descriptor for this option.
  2569. */
  2570. static void
  2571. doOptLoop(tOptions* pOptions, tOptDesc* pOptDesc)
  2572. {
  2573. static struct {long rmin, rmax;} const rng[1] = {
  2574. { 0, LONG_MAX } };
  2575. int ix;
  2576. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2577. goto emit_ranges;
  2578. optionNumericVal(pOptions, pOptDesc);
  2579. for (ix = 0; ix < 1; ix++) {
  2580. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2581. continue; /* ranges need not be ordered. */
  2582. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2583. return;
  2584. if (rng[ix].rmax == LONG_MIN)
  2585. continue;
  2586. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2587. return;
  2588. }
  2589. option_usage_fp = stderr;
  2590. emit_ranges:
  2591. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2592. }
  2593. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2594. /**
  2595. * Code to handle the loopdelay-ms option.
  2596. *
  2597. * @param[in] pOptions the tcpreplay options data structure
  2598. * @param[in,out] pOptDesc the option descriptor for this option.
  2599. */
  2600. static void
  2601. doOptLoopdelay_Ms(tOptions* pOptions, tOptDesc* pOptDesc)
  2602. {
  2603. static struct {long rmin, rmax;} const rng[1] = {
  2604. { 0, LONG_MAX } };
  2605. int ix;
  2606. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2607. goto emit_ranges;
  2608. optionNumericVal(pOptions, pOptDesc);
  2609. for (ix = 0; ix < 1; ix++) {
  2610. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2611. continue; /* ranges need not be ordered. */
  2612. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2613. return;
  2614. if (rng[ix].rmax == LONG_MIN)
  2615. continue;
  2616. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2617. return;
  2618. }
  2619. option_usage_fp = stderr;
  2620. emit_ranges:
  2621. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2622. }
  2623. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2624. /**
  2625. * Code to handle the limit option.
  2626. * By default, tcpreplay will send all the packets. Alternatively, you can
  2627. * specify a maximum number of packets to send.
  2628. * @param[in] pOptions the tcpreplay options data structure
  2629. * @param[in,out] pOptDesc the option descriptor for this option.
  2630. */
  2631. static void
  2632. doOptLimit(tOptions* pOptions, tOptDesc* pOptDesc)
  2633. {
  2634. static struct {long rmin, rmax;} const rng[1] = {
  2635. { 1, LONG_MAX } };
  2636. int ix;
  2637. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2638. goto emit_ranges;
  2639. optionNumericVal(pOptions, pOptDesc);
  2640. for (ix = 0; ix < 1; ix++) {
  2641. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2642. continue; /* ranges need not be ordered. */
  2643. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2644. return;
  2645. if (rng[ix].rmax == LONG_MIN)
  2646. continue;
  2647. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2648. return;
  2649. }
  2650. option_usage_fp = stderr;
  2651. emit_ranges:
  2652. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2653. }
  2654. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2655. /**
  2656. * Code to handle the duration option.
  2657. * By default, tcpreplay will send all the packets. Alternatively, you can
  2658. * specify a maximum number of seconds to transmit.
  2659. * @param[in] pOptions the tcpreplay options data structure
  2660. * @param[in,out] pOptDesc the option descriptor for this option.
  2661. */
  2662. static void
  2663. doOptDuration(tOptions* pOptions, tOptDesc* pOptDesc)
  2664. {
  2665. static struct {long rmin, rmax;} const rng[1] = {
  2666. { 1, LONG_MAX } };
  2667. int ix;
  2668. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2669. goto emit_ranges;
  2670. optionNumericVal(pOptions, pOptDesc);
  2671. for (ix = 0; ix < 1; ix++) {
  2672. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2673. continue; /* ranges need not be ordered. */
  2674. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2675. return;
  2676. if (rng[ix].rmax == LONG_MIN)
  2677. continue;
  2678. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2679. return;
  2680. }
  2681. option_usage_fp = stderr;
  2682. emit_ranges:
  2683. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2684. }
  2685. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2686. /**
  2687. * Code to handle the pps-multi option.
  2688. * When trying to send packets at very high rates, the time between each packet
  2689. * can be so short that it is impossible to accurately sleep for the required
  2690. * period of time. This option allows you to send multiple packets at a time,
  2691. * thus allowing for longer sleep times which can be more accurately implemented.
  2692. * @param[in] pOptions the tcpreplay options data structure
  2693. * @param[in,out] pOptDesc the option descriptor for this option.
  2694. */
  2695. static void
  2696. doOptPps_Multi(tOptions* pOptions, tOptDesc* pOptDesc)
  2697. {
  2698. static struct {long rmin, rmax;} const rng[1] = {
  2699. { 1, LONG_MAX } };
  2700. int ix;
  2701. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2702. goto emit_ranges;
  2703. optionNumericVal(pOptions, pOptDesc);
  2704. for (ix = 0; ix < 1; ix++) {
  2705. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2706. continue; /* ranges need not be ordered. */
  2707. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2708. return;
  2709. if (rng[ix].rmax == LONG_MIN)
  2710. continue;
  2711. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2712. return;
  2713. }
  2714. option_usage_fp = stderr;
  2715. emit_ranges:
  2716. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2717. }
  2718. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2719. /**
  2720. * Code to handle the flow-expiry option.
  2721. * This option will track and report flow expirations based on the flow idle
  2722. * times. The timestamps within the pcap file are used to determine the expiry,
  2723. * not the actual timestamp of the packets are replayed. For example, a value of
  2724. * 30 suggests that if no traffic is seen on a flow for 30 seconds, any
  2725. * subsequent traffic would be considered a new flow, and thereby will increment
  2726. * the flows and flows per second (fps) statistics.
  2727. *
  2728. * This option can be used to optimize flow timeout settings for flow products.
  2729. * Setting the timeout low may lead to flows being dropped when in fact the flow
  2730. * is simply slow to respond. Configuring your flow timeouts too high may
  2731. * increase resources required by your flow product.
  2732. *
  2733. * Note that using this option while replaying at higher than original speeds
  2734. * can lead to inflated flows and fps counts.
  2735. *
  2736. * Default is 0 (no expiry) and a typical value is 30-120 seconds.
  2737. * @param[in] pOptions the tcpreplay options data structure
  2738. * @param[in,out] pOptDesc the option descriptor for this option.
  2739. */
  2740. static void
  2741. doOptFlow_Expiry(tOptions* pOptions, tOptDesc* pOptDesc)
  2742. {
  2743. static struct {long rmin, rmax;} const rng[1] = {
  2744. { 0, LONG_MAX } };
  2745. int ix;
  2746. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2747. goto emit_ranges;
  2748. optionNumericVal(pOptions, pOptDesc);
  2749. for (ix = 0; ix < 1; ix++) {
  2750. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2751. continue; /* ranges need not be ordered. */
  2752. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2753. return;
  2754. if (rng[ix].rmax == LONG_MIN)
  2755. continue;
  2756. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2757. return;
  2758. }
  2759. option_usage_fp = stderr;
  2760. emit_ranges:
  2761. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2762. }
  2763. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2764. /**
  2765. * Code to handle the pid option.
  2766. *
  2767. * @param[in] pOptions the tcpreplay options data structure
  2768. * @param[in,out] pOptDesc the option descriptor for this option.
  2769. */
  2770. static void
  2771. doOptPid(tOptions* pOptions, tOptDesc* pOptDesc)
  2772. {
  2773. /*
  2774. * Be sure the flag-code[0] handles special values for the options pointer
  2775. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  2776. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  2777. * reset its state.
  2778. */
  2779. /* extracted from tcpreplay_opts.def, line 582 */
  2780. fprintf(stderr, "PID: %d\n", getpid());
  2781. (void)pOptDesc;
  2782. (void)pOptions;
  2783. }
  2784. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2785. /**
  2786. * Code to handle the stats option.
  2787. * Note that timed delays are a "best effort" and long delays between
  2788. * sending packets may cause equally long delays between printing statistics.
  2789. * @param[in] pOptions the tcpreplay options data structure
  2790. * @param[in,out] pOptDesc the option descriptor for this option.
  2791. */
  2792. static void
  2793. doOptStats(tOptions* pOptions, tOptDesc* pOptDesc)
  2794. {
  2795. static struct {long rmin, rmax;} const rng[1] = {
  2796. { 0, LONG_MAX } };
  2797. int ix;
  2798. if (pOptions <= OPTPROC_EMIT_LIMIT)
  2799. goto emit_ranges;
  2800. optionNumericVal(pOptions, pOptDesc);
  2801. for (ix = 0; ix < 1; ix++) {
  2802. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  2803. continue; /* ranges need not be ordered. */
  2804. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  2805. return;
  2806. if (rng[ix].rmax == LONG_MIN)
  2807. continue;
  2808. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  2809. return;
  2810. }
  2811. option_usage_fp = stderr;
  2812. emit_ranges:
  2813. optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
  2814. }
  2815. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2816. /**
  2817. * Code to handle the version option.
  2818. *
  2819. * @param[in] pOptions the tcpreplay options data structure
  2820. * @param[in,out] pOptDesc the option descriptor for this option.
  2821. */
  2822. static void
  2823. doOptVersion(tOptions* pOptions, tOptDesc* pOptDesc)
  2824. {
  2825. /*
  2826. * Be sure the flag-code[0] handles special values for the options pointer
  2827. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  2828. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  2829. * reset its state.
  2830. */
  2831. /* extracted from tcpreplay_opts.def, line 605 */
  2832. fprintf(stderr, "tcpreplay version: %s (build %s)", VERSION, git_version());
  2833. #ifdef DEBUG
  2834. fprintf(stderr, " (debug)");
  2835. #endif
  2836. #ifdef TIMESTAMP_TRACE
  2837. fprintf(stderr, " (timestamp-trace)");
  2838. #endif
  2839. fprintf(stderr, "\n");
  2840. fprintf(stderr, "Copyright 2013-2017 by Fred Klassen <tcpreplay at appneta dot com> - AppNeta\n");
  2841. fprintf(stderr, "Copyright 2000-2012 by Aaron Turner <aturner at synfin dot net>\n");
  2842. fprintf(stderr, "The entire Tcpreplay Suite is licensed under the GPLv3\n");
  2843. fprintf(stderr, "Cache file supported: %s\n", CACHEVERSION);
  2844. #ifdef HAVE_LIBDNET
  2845. fprintf(stderr, "Compiled against libdnet: %s\n", LIBDNET_VERSION);
  2846. #else
  2847. fprintf(stderr, "Not compiled with libdnet.\n");
  2848. #endif
  2849. #ifdef HAVE_WINPCAP
  2850. fprintf(stderr, "Compiled against winpcap: %s\n", get_pcap_version());
  2851. #elif defined HAVE_PF_RING_PCAP
  2852. fprintf(stderr, "Compiled against PF_RING libpcap: %s\n", get_pcap_version());
  2853. #else
  2854. fprintf(stderr, "Compiled against libpcap: %s\n", get_pcap_version());
  2855. #endif
  2856. #ifdef ENABLE_64BITS
  2857. fprintf(stderr, "64 bit packet counters: enabled\n");
  2858. #else
  2859. fprintf(stderr, "64 bit packet counters: disabled\n");
  2860. #endif
  2861. #ifdef ENABLE_VERBOSE
  2862. fprintf(stderr, "Verbose printing via tcpdump: enabled\n");
  2863. #else
  2864. fprintf(stderr, "Verbose printing via tcpdump: disabled\n");
  2865. #endif
  2866. #ifdef TCPREPLAY_EDIT
  2867. fprintf(stderr, "Packet editing: enabled\n");
  2868. #else
  2869. fprintf(stderr, "Packet editing: disabled\n");
  2870. #endif
  2871. #ifdef ENABLE_FRAGROUTE
  2872. fprintf(stderr, "Fragroute engine: enabled\n");
  2873. #else
  2874. fprintf(stderr, "Fragroute engine: disabled\n");
  2875. #endif
  2876. #if defined HAVE_NETMAP
  2877. fprintf(stderr, "Default injection method: %s\n", sendpacket_get_method(NULL));
  2878. #else
  2879. fprintf(stderr, "Injection method: %s\n", sendpacket_get_method(NULL));
  2880. #endif
  2881. #ifdef HAVE_NETMAP
  2882. fprintf(stderr, "Optional injection method: netmap\n");
  2883. #else
  2884. fprintf(stderr, "Not compiled with netmap\n");
  2885. #endif
  2886. exit(0);
  2887. (void)pOptDesc;
  2888. (void)pOptions;
  2889. }
  2890. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2891. /**
  2892. * Code to handle the less-help option.
  2893. *
  2894. * @param[in] pOptions the tcpreplay options data structure
  2895. * @param[in,out] pOptDesc the option descriptor for this option.
  2896. */
  2897. static void
  2898. doOptLess_Help(tOptions* pOptions, tOptDesc* pOptDesc)
  2899. {
  2900. /*
  2901. * Be sure the flag-code[0] handles special values for the options pointer
  2902. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  2903. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  2904. * reset its state.
  2905. */
  2906. /* extracted from tcpreplay_opts.def, line 672 */
  2907. USAGE(EXIT_FAILURE);
  2908. (void)pOptDesc;
  2909. (void)pOptions;
  2910. }
  2911. /* extracted from optmain.tlib near line 1245 */
  2912. /**
  2913. * The directory containing the data associated with tcpreplay.
  2914. */
  2915. #ifndef PKGDATADIR
  2916. # define PKGDATADIR ""
  2917. #endif
  2918. /**
  2919. * Information about the person or institution that packaged tcpreplay
  2920. * for the current distribution.
  2921. */
  2922. #ifndef WITH_PACKAGER
  2923. # define tcpreplay_packager_info NULL
  2924. #else
  2925. /** Packager information for tcpreplay. */
  2926. static char const tcpreplay_packager_info[] =
  2927. "Packaged by " WITH_PACKAGER
  2928. # ifdef WITH_PACKAGER_VERSION
  2929. " ("WITH_PACKAGER_VERSION")"
  2930. # endif
  2931. # ifdef WITH_PACKAGER_BUG_REPORTS
  2932. "\nReport tcpreplay bugs to " WITH_PACKAGER_BUG_REPORTS
  2933. # endif
  2934. "\n";
  2935. #endif
  2936. #ifndef __doxygen__
  2937. #endif /* __doxygen__ */
  2938. /**
  2939. * The option definitions for tcpreplay. The one structure that
  2940. * binds them all.
  2941. */
  2942. tOptions tcpreplayOptions = {
  2943. OPTIONS_STRUCT_VERSION,
  2944. 0, NULL, /* original argc + argv */
  2945. ( OPTPROC_BASE
  2946. + OPTPROC_ERRSTOP
  2947. + OPTPROC_SHORTOPT
  2948. + OPTPROC_LONGOPT
  2949. + OPTPROC_NO_REQ_OPT
  2950. + OPTPROC_ARGS_REQ
  2951. + OPTPROC_GNUUSAGE ),
  2952. 0, NULL, /* current option index, current option */
  2953. NULL, NULL, zPROGNAME,
  2954. zRcName, zCopyright, zLicenseDescrip,
  2955. zFullVersion, apzHomeList, zUsageTitle,
  2956. zExplain, zDetail, optDesc,
  2957. zBugsAddr, /* address to send bugs to */
  2958. NULL, NULL, /* extensions/saved state */
  2959. optionUsage, /* usage procedure */
  2960. translate_option_strings, /* translation procedure */
  2961. /*
  2962. * Indexes to special options
  2963. */
  2964. { INDEX_OPT_MORE_HELP, /* more-help option index */
  2965. INDEX_OPT_SAVE_OPTS, /* save option index */
  2966. NO_EQUIVALENT, /* '-#' option index */
  2967. 9 /* index of default opt */
  2968. },
  2969. 71 /* full option count */, 67 /* user option count */,
  2970. tcpreplay_full_usage, tcpreplay_short_usage,
  2971. NULL, NULL,
  2972. PKGDATADIR, tcpreplay_packager_info
  2973. };
  2974. #if ENABLE_NLS
  2975. /**
  2976. * This code is designed to translate translatable option text for the
  2977. * tcpreplay program. These translations happen upon entry
  2978. * to optionProcess().
  2979. */
  2980. #include <stdio.h>
  2981. #include <stdlib.h>
  2982. #include <string.h>
  2983. #include <unistd.h>
  2984. #ifdef HAVE_DCGETTEXT
  2985. # include <gettext.h>
  2986. #endif
  2987. #include <autoopts/usage-txt.h>
  2988. static char * AO_gettext(char const * pz);
  2989. static void coerce_it(void ** s);
  2990. /**
  2991. * AutoGen specific wrapper function for gettext. It relies on the macro _()
  2992. * to convert from English to the target language, then strdup-duplicates the
  2993. * result string. It tries the "libopts" domain first, then whatever has been
  2994. * set via the \a textdomain(3) call.
  2995. *
  2996. * @param[in] pz the input text used as a lookup key.
  2997. * @returns the translated text (if there is one),
  2998. * or the original text (if not).
  2999. */
  3000. static char *
  3001. AO_gettext(char const * pz)
  3002. {
  3003. char * res;
  3004. if (pz == NULL)
  3005. return NULL;
  3006. #ifdef HAVE_DCGETTEXT
  3007. /*
  3008. * While processing the option_xlateable_txt data, try to use the
  3009. * "libopts" domain. Once we switch to the option descriptor data,
  3010. * do *not* use that domain.
  3011. */
  3012. if (option_xlateable_txt.field_ct != 0) {
  3013. res = dgettext("libopts", pz);
  3014. if (res == pz)
  3015. res = (char *)(void *)_(pz);
  3016. } else
  3017. res = (char *)(void *)_(pz);
  3018. #else
  3019. res = (char *)(void *)_(pz);
  3020. #endif
  3021. if (res == pz)
  3022. return res;
  3023. res = strdup(res);
  3024. if (res == NULL) {
  3025. fputs(_("No memory for duping translated strings\n"), stderr);
  3026. exit(TCPREPLAY_EXIT_FAILURE);
  3027. }
  3028. return res;
  3029. }
  3030. /**
  3031. * All the pointers we use are marked "* const", but they are stored in
  3032. * writable memory. Coerce the mutability and set the pointer.
  3033. */
  3034. static void coerce_it(void ** s) { *s = AO_gettext(*s);
  3035. }
  3036. /**
  3037. * Translate all the translatable strings in the tcpreplayOptions
  3038. * structure defined above. This is done only once.
  3039. */
  3040. static void
  3041. translate_option_strings(void)
  3042. {
  3043. tOptions * const opts = &tcpreplayOptions;
  3044. /*
  3045. * Guard against re-translation. It won't work. The strings will have
  3046. * been changed by the first pass through this code. One shot only.
  3047. */
  3048. if (option_xlateable_txt.field_ct != 0) {
  3049. /*
  3050. * Do the translations. The first pointer follows the field count
  3051. * field. The field count field is the size of a pointer.
  3052. */
  3053. char ** ppz = (char**)(void*)&(option_xlateable_txt);
  3054. int ix = option_xlateable_txt.field_ct;
  3055. do {
  3056. ppz++; /* skip over field_ct */
  3057. *ppz = AO_gettext(*ppz);
  3058. } while (--ix > 0);
  3059. /* prevent re-translation and disable "libopts" domain lookup */
  3060. option_xlateable_txt.field_ct = 0;
  3061. coerce_it((void*)&(opts->pzCopyright));
  3062. coerce_it((void*)&(opts->pzCopyNotice));
  3063. coerce_it((void*)&(opts->pzFullVersion));
  3064. coerce_it((void*)&(opts->pzUsageTitle));
  3065. coerce_it((void*)&(opts->pzExplain));
  3066. coerce_it((void*)&(opts->pzDetail));
  3067. {
  3068. tOptDesc * od = opts->pOptDesc;
  3069. for (ix = opts->optCt; ix > 0; ix--, od++)
  3070. coerce_it((void*)&(od->pzText));
  3071. }
  3072. }
  3073. }
  3074. #endif /* ENABLE_NLS */
  3075. #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
  3076. /** I18N function strictly for xgettext. Do not compile. */
  3077. static void bogus_function(void) {
  3078. /* TRANSLATORS:
  3079. The following dummy function was crated solely so that xgettext can
  3080. extract the correct strings. These strings are actually referenced
  3081. by a field name in the tcpreplayOptions structure noted in the
  3082. comments below. The literal text is defined in tcpreplay_opt_strs.
  3083. NOTE: the strings below are segmented with respect to the source string
  3084. tcpreplay_opt_strs. The strings above are handed off for translation
  3085. at run time a paragraph at a time. Consequently, they are presented here
  3086. for translation a paragraph at a time.
  3087. ALSO: often the description for an option will reference another option
  3088. by name. These are set off with apostrophe quotes (I hope). Do not
  3089. translate option names.
  3090. */
  3091. /* referenced via tcpreplayOptions.pzCopyright */
  3092. puts(_("tcpreplay (tcpreplay)\n\
  3093. Copyright (C) 2000-2017 Aaron Turner and Fred Klassen, all rights reserved.\n\
  3094. This is free software. It is licensed for use, modification and\n\
  3095. redistribution under the terms of the GNU General Public License,\n\
  3096. version 3 or later <http://gnu.org/licenses/gpl.html>\n"));
  3097. /* referenced via tcpreplayOptions.pzCopyNotice */
  3098. puts(_("tcpreplay is free software: you can redistribute it and/or modify it under\n\
  3099. the terms of the GNU General Public License as published by the Free\n\
  3100. Software Foundation, either version 3 of the License, or (at your option)\n\
  3101. any later version.\n\n"));
  3102. puts(_("tcpreplay is distributed in the hope that it will be useful, but WITHOUT\n\
  3103. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
  3104. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n\
  3105. more details.\n\n"));
  3106. puts(_("You should have received a copy of the GNU General Public License along\n\
  3107. with this program. If not, see <http://www.gnu.org/licenses/>.\n"));
  3108. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3109. puts(_(":"));
  3110. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3111. puts(_("Rewrite TCP/UDP ports"));
  3112. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3113. puts(_("Randomize src/dst IPv4/v6 addresses w/ given seed"));
  3114. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3115. puts(_("Rewrite IPv4/v6 addresses using pseudo-NAT"));
  3116. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3117. puts(_("Rewrite source IPv4/v6 addresses using pseudo-NAT"));
  3118. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3119. puts(_("Rewrite destination IPv4/v6 addresses using pseudo-NAT"));
  3120. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3121. puts(_("Rewrite IP addresses to be between two endpoints"));
  3122. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3123. puts(_("Skip rewriting broadcast/multicast IPv4/v6 addresses"));
  3124. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3125. puts(_("Force recalculation of IPv4/TCP/UDP header checksums"));
  3126. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3127. puts(_("Override default MTU length (1500 bytes)"));
  3128. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3129. puts(_("Truncate packets larger then specified MTU"));
  3130. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3131. puts(_("Remove Ethernet checksums (FCS) from end of frames"));
  3132. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3133. puts(_("Modify the IPv4/v6 TTL/Hop Limit"));
  3134. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3135. puts(_("Set the IPv4 TOS/DiffServ/ECN byte"));
  3136. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3137. puts(_("Set the IPv6 Traffic Class byte"));
  3138. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3139. puts(_("Set the IPv6 Flow Label"));
  3140. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3141. puts(_("Pad or truncate packet data to match header length"));
  3142. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3143. puts(_("Fuzz 1 in X packets. Edit bytes, length, or emulate packet drop"));
  3144. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3145. puts(_("Set the Fuzz 1 in X packet ratio (default 1 in 8 packets)"));
  3146. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3147. puts(_("Skip rewriting broadcast/multicast Layer 2 addresses"));
  3148. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3149. puts(_("Override output DLT encapsulation"));
  3150. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3151. puts(_("Override destination ethernet MAC addresses"));
  3152. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3153. puts(_("Override source ethernet MAC addresses"));
  3154. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3155. puts(_("Substitute MAC addresses"));
  3156. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3157. puts(_("Randomize MAC addresses"));
  3158. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3159. puts(_("Randomize MAC addresses"));
  3160. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3161. puts(_("Specify ethernet 802.1q VLAN tag mode"));
  3162. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3163. puts(_("Specify the new ethernet 802.1q VLAN tag value"));
  3164. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3165. puts(_("Specify the ethernet 802.1q VLAN CFI value"));
  3166. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3167. puts(_("Specify the ethernet 802.1q VLAN priority"));
  3168. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3169. puts(_("Specify HDLC control value"));
  3170. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3171. puts(_("Specify HDLC address"));
  3172. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3173. puts(_("Set output file DLT type"));
  3174. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3175. puts(_("Rewrite Data-Link layer with user specified data"));
  3176. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3177. puts(_("Enable debugging output"));
  3178. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3179. puts(_("Quiet mode"));
  3180. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3181. puts(_("Select packet timing mode: select, ioport, gtod, nano"));
  3182. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3183. puts(_("Sleep for no more then X milliseconds between packets"));
  3184. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3185. puts(_("Print decoded packets via tcpdump to STDOUT"));
  3186. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3187. puts(_("Arguments passed to tcpdump decoder"));
  3188. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3189. puts(_("Preloads packets into RAM before sending"));
  3190. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3191. puts(_("Split traffic via a tcpprep cache file"));
  3192. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3193. puts(_("Replay two files at a time from a network tap"));
  3194. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3195. puts(_("Client to server/RX/primary traffic output interface"));
  3196. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3197. puts(_("Server to client/TX/secondary traffic output interface"));
  3198. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3199. puts(_("List available network interfaces and exit"));
  3200. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3201. puts(_("Loop through the capture file X times"));
  3202. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3203. puts(_("Delay between loops in milliseconds"));
  3204. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3205. puts(_("Override the snaplen and use the actual packet len"));
  3206. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3207. puts(_("Limit the number of packets to send"));
  3208. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3209. puts(_("Limit the number of seconds to send"));
  3210. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3211. puts(_("Modify replay speed to a given multiple"));
  3212. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3213. puts(_("Replay packets at a given packets/sec"));
  3214. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3215. puts(_("Replay packets at a given Mbps"));
  3216. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3217. puts(_("Replay packets as fast as possible"));
  3218. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3219. puts(_("Replay one packet at a time for each user input"));
  3220. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3221. puts(_("Number of packets to send for each time interval"));
  3222. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3223. puts(_("Modify IP addresses each loop iteration to generate unique flows"));
  3224. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3225. puts(_("Number of times to loop before assigning new unique ip"));
  3226. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3227. puts(_("Write packets directly to netmap enabled network adapter"));
  3228. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3229. puts(_("Netmap startup delay"));
  3230. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3231. puts(_("Suppress printing and tracking flow count, rates and expirations"));
  3232. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3233. puts(_("Number of inactive seconds before a flow is considered expired"));
  3234. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3235. puts(_("Print the PID of tcpreplay at startup"));
  3236. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3237. puts(_("Print statistics every X seconds, or every loop if '0'"));
  3238. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3239. puts(_("Print version information"));
  3240. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3241. puts(_("Display less usage information and exit"));
  3242. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3243. puts(_("display extended usage information and exit"));
  3244. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3245. puts(_("extended usage information passed thru pager"));
  3246. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3247. puts(_("save the option state to a config file"));
  3248. /* referenced via tcpreplayOptions.pOptDesc->pzText */
  3249. puts(_("load options from a config file"));
  3250. /* referenced via tcpreplayOptions.pzUsageTitle */
  3251. puts(_("tcpreplay (tcpreplay) - Replay network traffic stored in pcap files\n\
  3252. Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... <pcap_file(s)>\n"));
  3253. /* referenced via tcpreplayOptions.pzExplain */
  3254. puts(_("tcpreplay is a tool for replaying network traffic from files saved with\n\
  3255. tcpdump or other tools which write pcap(3) files.\n"));
  3256. /* referenced via tcpreplayOptions.pzDetail */
  3257. puts(_("The basic operation of tcpreplay is to resend all packets from the input\n\
  3258. file(s) at the speed at which they were recorded, or a specified data rate,\n\
  3259. up to as fast as the hardware is capable.\n\n"));
  3260. puts(_("Optionally, the traffic can be split between two interfaces, written to\n\
  3261. files, filtered and edited in various ways, providing the means to test\n\
  3262. firewalls, NIDS and other network devices.\n\n"));
  3263. puts(_("For more details, please see the Tcpreplay Manual at:\n\
  3264. http://tcpreplay.appneta.com\n"));
  3265. /* referenced via tcpreplayOptions.pzFullUsage */
  3266. puts(_("<<<NOT-FOUND>>>"));
  3267. /* referenced via tcpreplayOptions.pzShortUsage */
  3268. puts(_("<<<NOT-FOUND>>>"));
  3269. /* LIBOPTS-MESSAGES: */
  3270. #line 67 "../autoopts.c"
  3271. puts(_("allocation of %d bytes failed\n"));
  3272. #line 93 "../autoopts.c"
  3273. puts(_("allocation of %d bytes failed\n"));
  3274. #line 53 "../init.c"
  3275. puts(_("AutoOpts function called without option descriptor\n"));
  3276. #line 90 "../init.c"
  3277. puts(_("\tThis exceeds the compiled library version: "));
  3278. #line 88 "../init.c"
  3279. puts(_("Automated Options Processing Error!\n"
  3280. "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
  3281. #line 80 "../autoopts.c"
  3282. puts(_("realloc of %d bytes at 0x%p failed\n"));
  3283. #line 92 "../init.c"
  3284. puts(_("\tThis is less than the minimum library version: "));
  3285. #line 121 "../version.c"
  3286. puts(_("Automated Options version %s\n"
  3287. "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
  3288. #line 82 "../makeshell.c"
  3289. puts(_("(AutoOpts bug): %s.\n"));
  3290. #line 90 "../reset.c"
  3291. puts(_("optionResetOpt() called, but reset-option not configured"));
  3292. #line 292 "../usage.c"
  3293. puts(_("could not locate the 'help' option"));
  3294. #line 336 "../autoopts.c"
  3295. puts(_("optionProcess() was called with invalid data"));
  3296. #line 748 "../usage.c"
  3297. puts(_("invalid argument type specified"));
  3298. #line 598 "../find.c"
  3299. puts(_("defaulted to option with optional arg"));
  3300. #line 76 "../alias.c"
  3301. puts(_("aliasing option is out of range."));
  3302. #line 234 "../enum.c"
  3303. puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
  3304. #line 108 "../find.c"
  3305. puts(_(" The following options match:\n"));
  3306. #line 293 "../find.c"
  3307. puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
  3308. #line 161 "../check.c"
  3309. puts(_("%s: Command line arguments required\n"));
  3310. #line 43 "../alias.c"
  3311. puts(_("%d %s%s options allowed\n"));
  3312. #line 89 "../makeshell.c"
  3313. puts(_("%s error %d (%s) calling %s for '%s'\n"));
  3314. #line 301 "../makeshell.c"
  3315. puts(_("interprocess pipe"));
  3316. #line 168 "../version.c"
  3317. puts(_("error: version option argument '%c' invalid. Use:\n"
  3318. "\t'v' - version only\n"
  3319. "\t'c' - version and copyright\n"
  3320. "\t'n' - version and full copyright notice\n"));
  3321. #line 58 "../check.c"
  3322. puts(_("%s error: the '%s' and '%s' options conflict\n"));
  3323. #line 217 "../find.c"
  3324. puts(_("%s: The '%s' option has been disabled."));
  3325. #line 430 "../find.c"
  3326. puts(_("%s: The '%s' option has been disabled."));
  3327. #line 38 "../alias.c"
  3328. puts(_("-equivalence"));
  3329. #line 469 "../find.c"
  3330. puts(_("%s: illegal option -- %c\n"));
  3331. #line 110 "../reset.c"
  3332. puts(_("%s: illegal option -- %c\n"));
  3333. #line 271 "../find.c"
  3334. puts(_("%s: illegal option -- %s\n"));
  3335. #line 755 "../find.c"
  3336. puts(_("%s: illegal option -- %s\n"));
  3337. #line 118 "../reset.c"
  3338. puts(_("%s: illegal option -- %s\n"));
  3339. #line 335 "../find.c"
  3340. puts(_("%s: unknown vendor extension option -- %s\n"));
  3341. #line 159 "../enum.c"
  3342. puts(_(" or an integer from %d through %d\n"));
  3343. #line 169 "../enum.c"
  3344. puts(_(" or an integer from %d through %d\n"));
  3345. #line 747 "../usage.c"
  3346. puts(_("%s error: invalid option descriptor for %s\n"));
  3347. #line 1081 "../usage.c"
  3348. puts(_("%s error: invalid option descriptor for %s\n"));
  3349. #line 385 "../find.c"
  3350. puts(_("%s: invalid option name: %s\n"));
  3351. #line 527 "../find.c"
  3352. puts(_("%s: The '%s' option requires an argument.\n"));
  3353. #line 156 "../autoopts.c"
  3354. puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
  3355. "\t'%s' and '%s'."));
  3356. #line 94 "../check.c"
  3357. puts(_("%s error: The %s option is required\n"));
  3358. #line 632 "../find.c"
  3359. puts(_("%s: The '%s' option cannot have an argument.\n"));
  3360. #line 151 "../check.c"
  3361. puts(_("%s: Command line arguments are not allowed.\n"));
  3362. #line 535 "../save.c"
  3363. puts(_("error %d (%s) creating %s\n"));
  3364. #line 234 "../enum.c"
  3365. puts(_("%s error: '%s' does not match any %s keywords.\n"));
  3366. #line 93 "../reset.c"
  3367. puts(_("%s error: The '%s' option requires an argument.\n"));
  3368. #line 184 "../save.c"
  3369. puts(_("error %d (%s) stat-ing %s\n"));
  3370. #line 238 "../save.c"
  3371. puts(_("error %d (%s) stat-ing %s\n"));
  3372. #line 143 "../restore.c"
  3373. puts(_("%s error: no saved option state\n"));
  3374. #line 231 "../autoopts.c"
  3375. puts(_("'%s' is not a command line option.\n"));
  3376. #line 111 "../time.c"
  3377. puts(_("%s error: '%s' is not a recognizable date/time.\n"));
  3378. #line 132 "../save.c"
  3379. puts(_("'%s' not defined\n"));
  3380. #line 50 "../time.c"
  3381. puts(_("%s error: '%s' is not a recognizable time duration.\n"));
  3382. #line 92 "../check.c"
  3383. puts(_("%s error: The %s option must appear %d times.\n"));
  3384. #line 164 "../numeric.c"
  3385. puts(_("%s error: '%s' is not a recognizable number.\n"));
  3386. #line 200 "../enum.c"
  3387. puts(_("%s error: %s exceeds %s keyword count\n"));
  3388. #line 330 "../usage.c"
  3389. puts(_("Try '%s %s' for more information.\n"));
  3390. #line 45 "../alias.c"
  3391. puts(_("one %s%s option allowed\n"));
  3392. #line 203 "../makeshell.c"
  3393. puts(_("standard output"));
  3394. #line 938 "../makeshell.c"
  3395. puts(_("standard output"));
  3396. #line 274 "../usage.c"
  3397. puts(_("standard output"));
  3398. #line 415 "../usage.c"
  3399. puts(_("standard output"));
  3400. #line 625 "../usage.c"
  3401. puts(_("standard output"));
  3402. #line 175 "../version.c"
  3403. puts(_("standard output"));
  3404. #line 274 "../usage.c"
  3405. puts(_("standard error"));
  3406. #line 415 "../usage.c"
  3407. puts(_("standard error"));
  3408. #line 625 "../usage.c"
  3409. puts(_("standard error"));
  3410. #line 175 "../version.c"
  3411. puts(_("standard error"));
  3412. #line 203 "../makeshell.c"
  3413. puts(_("write"));
  3414. #line 938 "../makeshell.c"
  3415. puts(_("write"));
  3416. #line 273 "../usage.c"
  3417. puts(_("write"));
  3418. #line 414 "../usage.c"
  3419. puts(_("write"));
  3420. #line 624 "../usage.c"
  3421. puts(_("write"));
  3422. #line 174 "../version.c"
  3423. puts(_("write"));
  3424. #line 60 "../numeric.c"
  3425. puts(_("%s error: %s option value %ld is out of range.\n"));
  3426. #line 44 "../check.c"
  3427. puts(_("%s error: %s option requires the %s option\n"));
  3428. #line 131 "../save.c"
  3429. puts(_("%s warning: cannot save options - %s not regular file\n"));
  3430. #line 183 "../save.c"
  3431. puts(_("%s warning: cannot save options - %s not regular file\n"));
  3432. #line 237 "../save.c"
  3433. puts(_("%s warning: cannot save options - %s not regular file\n"));
  3434. #line 256 "../save.c"
  3435. puts(_("%s warning: cannot save options - %s not regular file\n"));
  3436. #line 534 "../save.c"
  3437. puts(_("%s warning: cannot save options - %s not regular file\n"));
  3438. /* END-LIBOPTS-MESSAGES */
  3439. /* USAGE-TEXT: */
  3440. #line 873 "../usage.c"
  3441. puts(_("\t\t\t\t- an alternate for '%s'\n"));
  3442. #line 1148 "../usage.c"
  3443. puts(_("Version, usage and configuration options:"));
  3444. #line 924 "../usage.c"
  3445. puts(_("\t\t\t\t- default option for unnamed options\n"));
  3446. #line 837 "../usage.c"
  3447. puts(_("\t\t\t\t- disabled as '--%s'\n"));
  3448. #line 1117 "../usage.c"
  3449. puts(_(" --- %-14s %s\n"));
  3450. #line 1115 "../usage.c"
  3451. puts(_("This option has been disabled"));
  3452. #line 864 "../usage.c"
  3453. puts(_("\t\t\t\t- enabled by default\n"));
  3454. #line 40 "../alias.c"
  3455. puts(_("%s error: only "));
  3456. #line 1194 "../usage.c"
  3457. puts(_(" - examining environment variables named %s_*\n"));
  3458. #line 168 "../file.c"
  3459. puts(_("\t\t\t\t- file must not pre-exist\n"));
  3460. #line 172 "../file.c"
  3461. puts(_("\t\t\t\t- file must pre-exist\n"));
  3462. #line 380 "../usage.c"
  3463. puts(_("Options are specified by doubled hyphens and their name or by a single\n"
  3464. "hyphen and the flag character.\n"));
  3465. #line 916 "../makeshell.c"
  3466. puts(_("\n"
  3467. "= = = = = = = =\n\n"
  3468. "This incarnation of genshell will produce\n"
  3469. "a shell script to parse the options for %s:\n\n"));
  3470. #line 166 "../enum.c"
  3471. puts(_(" or an integer mask with any of the lower %d bits set\n"));
  3472. #line 897 "../usage.c"
  3473. puts(_("\t\t\t\t- is a set membership option\n"));
  3474. #line 918 "../usage.c"
  3475. puts(_("\t\t\t\t- must appear between %d and %d times\n"));
  3476. #line 382 "../usage.c"
  3477. puts(_("Options are specified by single or double hyphens and their name.\n"));
  3478. #line 904 "../usage.c"
  3479. puts(_("\t\t\t\t- may appear multiple times\n"));
  3480. #line 891 "../usage.c"
  3481. puts(_("\t\t\t\t- may not be preset\n"));
  3482. #line 1309 "../usage.c"
  3483. puts(_(" Arg Option-Name Description\n"));
  3484. #line 1245 "../usage.c"
  3485. puts(_(" Flg Arg Option-Name Description\n"));
  3486. #line 1303 "../usage.c"
  3487. puts(_(" Flg Arg Option-Name Description\n"));
  3488. #line 1304 "../usage.c"
  3489. puts(_(" %3s %s"));
  3490. #line 1310 "../usage.c"
  3491. puts(_(" %3s %s"));
  3492. #line 387 "../usage.c"
  3493. puts(_("The '-#<number>' option may omit the hash char\n"));
  3494. #line 383 "../usage.c"
  3495. puts(_("All arguments are named options.\n"));
  3496. #line 971 "../usage.c"
  3497. puts(_(" - reading file %s"));
  3498. #line 409 "../usage.c"
  3499. puts(_("\n"
  3500. "Please send bug reports to: <%s>\n"));
  3501. #line 100 "../version.c"
  3502. puts(_("\n"
  3503. "Please send bug reports to: <%s>\n"));
  3504. #line 129 "../version.c"
  3505. puts(_("\n"
  3506. "Please send bug reports to: <%s>\n"));
  3507. #line 903 "../usage.c"
  3508. puts(_("\t\t\t\t- may NOT appear - preset only\n"));
  3509. #line 944 "../usage.c"
  3510. puts(_("\n"
  3511. "The following option preset mechanisms are supported:\n"));
  3512. #line 1192 "../usage.c"
  3513. puts(_("\n"
  3514. "The following option preset mechanisms are supported:\n"));
  3515. #line 682 "../usage.c"
  3516. puts(_("prohibits these options:\n"));
  3517. #line 677 "../usage.c"
  3518. puts(_("prohibits the option '%s'\n"));
  3519. #line 81 "../numeric.c"
  3520. puts(_("%s%ld to %ld"));
  3521. #line 79 "../numeric.c"
  3522. puts(_("%sgreater than or equal to %ld"));
  3523. #line 75 "../numeric.c"
  3524. puts(_("%s%ld exactly"));
  3525. #line 68 "../numeric.c"
  3526. puts(_("%sit must lie in one of the ranges:\n"));
  3527. #line 68 "../numeric.c"
  3528. puts(_("%sit must be in the range:\n"));
  3529. #line 88 "../numeric.c"
  3530. puts(_(", or\n"));
  3531. #line 66 "../numeric.c"
  3532. puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
  3533. #line 77 "../numeric.c"
  3534. puts(_("%sless than or equal to %ld"));
  3535. #line 390 "../usage.c"
  3536. puts(_("Operands and options may be intermixed. They will be reordered.\n"));
  3537. #line 652 "../usage.c"
  3538. puts(_("requires the option '%s'\n"));
  3539. #line 655 "../usage.c"
  3540. puts(_("requires these options:\n"));
  3541. #line 1321 "../usage.c"
  3542. puts(_(" Arg Option-Name Req? Description\n"));
  3543. #line 1315 "../usage.c"
  3544. puts(_(" Flg Arg Option-Name Req? Description\n"));
  3545. #line 167 "../enum.c"
  3546. puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
  3547. "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
  3548. "will set them all. Multiple entries may be passed as an option\n"
  3549. "argument list.\n"));
  3550. #line 910 "../usage.c"
  3551. puts(_("\t\t\t\t- may appear up to %d times\n"));
  3552. #line 77 "../enum.c"
  3553. puts(_("The valid \"%s\" option keywords are:\n"));
  3554. #line 1152 "../usage.c"
  3555. puts(_("The next option supports vendor supported extra options:"));
  3556. #line 773 "../usage.c"
  3557. puts(_("These additional options are:"));
  3558. /* END-USAGE-TEXT */
  3559. }
  3560. #endif /* uncompilable code */
  3561. #ifdef __cplusplus
  3562. }
  3563. #endif
  3564. /* tcpreplay_edit_opts.c ends here */