tcpreplay_edit_opts.c 147 KB

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