tcpreplay_edit_opts.c 165 KB

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