tcprewrite_opts.c 108 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919
  1. /* -*- buffer-read-only: t -*- vi: set ro:
  2. *
  3. * DO NOT EDIT THIS FILE (tcprewrite_opts.c)
  4. *
  5. * It has been AutoGen-ed
  6. * From the definitions tcprewrite_opts.def
  7. * and the template file options
  8. *
  9. * Generated from AutoOpts 41:1:16 templates.
  10. *
  11. * AutoOpts is a copyrighted work. This source file is not encumbered
  12. * by AutoOpts licensing, but is provided under the licensing terms chosen
  13. * by the tcprewrite 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 tcprewrite program is copyrighted and licensed
  20. * under the following terms:
  21. *
  22. * Copyright (C) 2000-2018 Aaron Turner and Fred Klassen, all rights reserved.
  23. * This is free software. It is licensed for use, modification and
  24. * redistribution under the terms of the GNU General Public License,
  25. * version 3 or later <http://gnu.org/licenses/gpl.html>
  26. *
  27. * tcprewrite 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. * tcprewrite 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 "tcprewrite_opts.h"
  43. #include <sys/types.h>
  44. #include <limits.h>
  45. #include <stdio.h>
  46. #include <stdlib.h>
  47. #include <errno.h>
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51. extern FILE * option_usage_fp;
  52. #define zCopyright (tcprewrite_opt_strs+0)
  53. #define zLicenseDescrip (tcprewrite_opt_strs+285)
  54. /*
  55. * global included definitions
  56. */
  57. #include "defines.h"
  58. #include "common.h"
  59. #include "config.h"
  60. #include "tcprewrite.h"
  61. #include <stdlib.h>
  62. #include <string.h>
  63. extern tcprewrite_opt_t options;
  64. #ifndef NULL
  65. # define NULL 0
  66. #endif
  67. /**
  68. * static const strings for tcprewrite options
  69. */
  70. static char const tcprewrite_opt_strs[4911] =
  71. /* 0 */ "tcprewrite (tcprewrite)\n"
  72. "Copyright (C) 2000-2018 Aaron Turner and Fred Klassen, all rights reserved.\n"
  73. "This is free software. It is licensed for use, modification and\n"
  74. "redistribution under the terms of the GNU General Public License,\n"
  75. "version 3 or later <http://gnu.org/licenses/gpl.html>\n\0"
  76. /* 285 */ "tcprewrite is free software: you can redistribute it and/or modify it under\n"
  77. "the terms of the GNU General Public License as published by the Free\n"
  78. "Software Foundation, either version 3 of the License, or (at your option)\n"
  79. "any later version.\n\n"
  80. "tcprewrite is distributed in the hope that it will be useful, but WITHOUT\n"
  81. "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
  82. "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n"
  83. "more details.\n\n"
  84. "You should have received a copy of the GNU General Public License along\n"
  85. "with this program. If not, see <http://www.gnu.org/licenses/>.\n\0"
  86. /* 894 */ ":\0"
  87. /* 896 */ "Rewrite TCP/UDP ports\0"
  88. /* 918 */ "PORTMAP\0"
  89. /* 926 */ "portmap\0"
  90. /* 934 */ "Randomize src/dst IPv4/v6 addresses w/ given seed\0"
  91. /* 984 */ "SEED\0"
  92. /* 989 */ "seed\0"
  93. /* 994 */ "Rewrite IPv4/v6 addresses using pseudo-NAT\0"
  94. /* 1037 */ "PNAT\0"
  95. /* 1042 */ "pnat\0"
  96. /* 1047 */ "Rewrite source IPv4/v6 addresses using pseudo-NAT\0"
  97. /* 1097 */ "SRCIPMAP\0"
  98. /* 1106 */ "srcipmap\0"
  99. /* 1115 */ "Rewrite destination IPv4/v6 addresses using pseudo-NAT\0"
  100. /* 1170 */ "DSTIPMAP\0"
  101. /* 1179 */ "dstipmap\0"
  102. /* 1188 */ "Rewrite IP addresses to be between two endpoints\0"
  103. /* 1237 */ "ENDPOINTS\0"
  104. /* 1247 */ "endpoints\0"
  105. /* 1257 */ "Change TCP Sequence (and ACK) numbers /w given seed\0"
  106. /* 1309 */ "TCP_SEQUENCE\0"
  107. /* 1322 */ "tcp-sequence\0"
  108. /* 1335 */ "Skip rewriting broadcast/multicast IPv4/v6 addresses\0"
  109. /* 1388 */ "SKIPBROADCAST\0"
  110. /* 1402 */ "skipbroadcast\0"
  111. /* 1416 */ "Force recalculation of IPv4/TCP/UDP header checksums\0"
  112. /* 1469 */ "FIXCSUM\0"
  113. /* 1477 */ "fixcsum\0"
  114. /* 1485 */ "Override default MTU length (1500 bytes)\0"
  115. /* 1526 */ "MTU\0"
  116. /* 1530 */ "mtu\0"
  117. /* 1534 */ "Truncate packets larger then specified MTU\0"
  118. /* 1577 */ "MTU_TRUNC\0"
  119. /* 1587 */ "mtu-trunc\0"
  120. /* 1597 */ "Remove Ethernet checksums (FCS) from end of frames\0"
  121. /* 1648 */ "EFCS\0"
  122. /* 1653 */ "efcs\0"
  123. /* 1658 */ "Modify the IPv4/v6 TTL/Hop Limit\0"
  124. /* 1691 */ "TTL\0"
  125. /* 1695 */ "ttl\0"
  126. /* 1699 */ "Set the IPv4 TOS/DiffServ/ECN byte\0"
  127. /* 1734 */ "TOS\0"
  128. /* 1738 */ "tos\0"
  129. /* 1742 */ "Set the IPv6 Traffic Class byte\0"
  130. /* 1774 */ "TCLASS\0"
  131. /* 1781 */ "tclass\0"
  132. /* 1788 */ "Set the IPv6 Flow Label\0"
  133. /* 1812 */ "FLOWLABEL\0"
  134. /* 1822 */ "flowlabel\0"
  135. /* 1832 */ "Pad or truncate packet data to match header length\0"
  136. /* 1883 */ "FIXLEN\0"
  137. /* 1890 */ "fixlen\0"
  138. /* 1897 */ "Fuzz 1 in X packets. Edit bytes, length, or emulate packet drop\0"
  139. /* 1962 */ "FUZZ_SEED\0"
  140. /* 1972 */ "fuzz-seed\0"
  141. /* 1982 */ "Set the Fuzz 1 in X packet ratio (default 1 in 8 packets)\0"
  142. /* 2040 */ "FUZZ_FACTOR\0"
  143. /* 2052 */ "fuzz-factor\0"
  144. /* 2064 */ "Skip rewriting broadcast/multicast Layer 2 addresses\0"
  145. /* 2117 */ "SKIPL2BROADCAST\0"
  146. /* 2133 */ "skipl2broadcast\0"
  147. /* 2149 */ "Override output DLT encapsulation\0"
  148. /* 2183 */ "DLT\0"
  149. /* 2187 */ "dlt\0"
  150. /* 2191 */ "Override destination ethernet MAC addresses\0"
  151. /* 2235 */ "ENET_DMAC\0"
  152. /* 2245 */ "enet-dmac\0"
  153. /* 2255 */ "Override source ethernet MAC addresses\0"
  154. /* 2294 */ "ENET_SMAC\0"
  155. /* 2304 */ "enet-smac\0"
  156. /* 2314 */ "Substitute MAC addresses\0"
  157. /* 2339 */ "ENET_SUBSMAC\0"
  158. /* 2352 */ "enet-subsmac\0"
  159. /* 2365 */ "Randomize MAC addresses\0"
  160. /* 2389 */ "ENET_MAC_SEED\0"
  161. /* 2403 */ "enet-mac-seed\0"
  162. /* 2417 */ "ENET_MAC_SEED_KEEP_BYTES\0"
  163. /* 2442 */ "enet-mac-seed-keep-bytes\0"
  164. /* 2467 */ "Specify ethernet 802.1q VLAN tag mode\0"
  165. /* 2505 */ "ENET_VLAN\0"
  166. /* 2515 */ "enet-vlan\0"
  167. /* 2525 */ "Specify the new ethernet 802.1q VLAN tag value\0"
  168. /* 2572 */ "ENET_VLAN_TAG\0"
  169. /* 2586 */ "enet-vlan-tag\0"
  170. /* 2600 */ "Specify the ethernet 802.1q VLAN CFI value\0"
  171. /* 2643 */ "ENET_VLAN_CFI\0"
  172. /* 2657 */ "enet-vlan-cfi\0"
  173. /* 2671 */ "Specify the ethernet 802.1q VLAN priority\0"
  174. /* 2713 */ "ENET_VLAN_PRI\0"
  175. /* 2727 */ "enet-vlan-pri\0"
  176. /* 2741 */ "Specify HDLC control value\0"
  177. /* 2768 */ "HDLC_CONTROL\0"
  178. /* 2781 */ "hdlc-control\0"
  179. /* 2794 */ "Specify HDLC address\0"
  180. /* 2815 */ "HDLC_ADDRESS\0"
  181. /* 2828 */ "hdlc-address\0"
  182. /* 2841 */ "Set output file DLT type\0"
  183. /* 2866 */ "USER_DLT\0"
  184. /* 2875 */ "user-dlt\0"
  185. /* 2884 */ "Rewrite Data-Link layer with user specified data\0"
  186. /* 2933 */ "USER_DLINK\0"
  187. /* 2944 */ "user-dlink\0"
  188. /* 2955 */ "Enable debugging output\0"
  189. /* 2979 */ "DBUG\0"
  190. /* 2984 */ "dbug\0"
  191. /* 2989 */ "Input pcap file to be processed\0"
  192. /* 3021 */ "INFILE\0"
  193. /* 3028 */ "infile\0"
  194. /* 3035 */ "Output pcap file\0"
  195. /* 3052 */ "OUTFILE\0"
  196. /* 3060 */ "outfile\0"
  197. /* 3068 */ "Split traffic via tcpprep cache file\0"
  198. /* 3105 */ "CACHEFILE\0"
  199. /* 3115 */ "cachefile\0"
  200. /* 3125 */ "Print decoded packets via tcpdump to STDOUT\0"
  201. /* 3169 */ "VERBOSE\0"
  202. /* 3177 */ "verbose\0"
  203. /* 3185 */ "Arguments passed to tcpdump decoder\0"
  204. /* 3221 */ "DECODE\0"
  205. /* 3228 */ "decode\0"
  206. /* 3235 */ "Parse fragroute configuration file\0"
  207. /* 3270 */ "FRAGROUTE\0"
  208. /* 3280 */ "fragroute\0"
  209. /* 3290 */ "Which flows to apply fragroute to: c2s, s2c, both\0"
  210. /* 3340 */ "FRAGDIR\0"
  211. /* 3348 */ "fragdir\0"
  212. /* 3356 */ "Skip writing packets with soft errors\0"
  213. /* 3394 */ "SKIP_SOFT_ERRORS\0"
  214. /* 3411 */ "skip-soft-errors\0"
  215. /* 3428 */ "Print version information\0"
  216. /* 3454 */ "VERSION\0"
  217. /* 3462 */ "version\0"
  218. /* 3470 */ "Display less usage information and exit\0"
  219. /* 3510 */ "LESS_HELP\0"
  220. /* 3520 */ "less-help\0"
  221. /* 3530 */ "display extended usage information and exit\0"
  222. /* 3574 */ "help\0"
  223. /* 3579 */ "extended usage information passed thru pager\0"
  224. /* 3624 */ "more-help\0"
  225. /* 3634 */ "save the option state to a config file\0"
  226. /* 3673 */ "save-opts\0"
  227. /* 3683 */ "load options from a config file\0"
  228. /* 3715 */ "LOAD_OPTS\0"
  229. /* 3725 */ "no-load-opts\0"
  230. /* 3738 */ "no\0"
  231. /* 3741 */ "TCPREWRITE\0"
  232. /* 3752 */ "tcprewrite (tcprewrite) - Rewrite the packets in a pcap file.\n"
  233. "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
  234. /* 3872 */ "$$/\0"
  235. /* 3876 */ ".tcprewriterc\0"
  236. /* 3890 */ "tcpreplay-users@lists.sourceforge.net\0"
  237. /* 3928 */ "Tcprewrite is a tool to rewrite packets stored in 'pcap(3)' file format,\n"
  238. "such as created by tools such as 'tcpdump(1)' and 'ethereal(1)'. Once a\n"
  239. "pcap file has had it's packets rewritten, they can be replayed back out on\n"
  240. "the network using 'tcpreplay(1)'.\n\n"
  241. "tcprewrite currently supports reading the following DLT types:\n\n\n"
  242. "'DLT_C_HDLC' aka Cisco HDLC\n\n\n"
  243. "'DLT_EN10MB' aka Ethernet\n\n\n"
  244. "'DLT_LINUX_SLL' aka Linux Cooked Socket\n\n\n"
  245. "'DLT_RAW' aka RAW IP\n\n\n"
  246. "'DLT_NULL' aka BSD Loopback\n\n\n"
  247. "'DLT_LOOP' aka OpenBSD Loopback\n\n\n"
  248. "'DLT_IEEE802_11' aka 802.11a/b/g\n\n\n"
  249. "'DLT_IEEE802_11_RADIO' aka 802.11a/b/g with Radiotap headers\n\n\n"
  250. "'DLT_JUNIPER_ETHER' aka Juniper Encapsulated Ethernet\n\n\n"
  251. "'DLT_PPP_SERIAL' aka PPP over Serial\n\n"
  252. "Please see the --dlt option for supported DLT types for writing.\n\n"
  253. "The packet editing features of tcprewrite which distinguish between\n"
  254. "\"client\" and \"server\" traffic requires a tcpprep(1) cache file.\n\n"
  255. "For more details, please see the Tcpreplay Manual at:\n"
  256. "http://tcpreplay.appneta.com\n";
  257. /**
  258. * tcpedit option description:
  259. */
  260. /** tcpedit option separation text */
  261. #define TCPEDIT_DESC (tcprewrite_opt_strs+894)
  262. #define TCPEDIT_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT)
  263. /**
  264. * portmap option description:
  265. */
  266. /** Descriptive text for the portmap option */
  267. #define PORTMAP_DESC (tcprewrite_opt_strs+896)
  268. /** Upper-cased name for the portmap option */
  269. #define PORTMAP_NAME (tcprewrite_opt_strs+918)
  270. /** Name string for the portmap option */
  271. #define PORTMAP_name (tcprewrite_opt_strs+926)
  272. /** Compiled in flag settings for the portmap option */
  273. #define PORTMAP_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  274. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  275. /**
  276. * seed option description with
  277. * "Must also have options" and "Incompatible options":
  278. */
  279. /** Descriptive text for the seed option */
  280. #define SEED_DESC (tcprewrite_opt_strs+934)
  281. /** Upper-cased name for the seed option */
  282. #define SEED_NAME (tcprewrite_opt_strs+984)
  283. /** Name string for the seed option */
  284. #define SEED_name (tcprewrite_opt_strs+989)
  285. /** Other options that appear in conjunction with the seed option */
  286. static int const aSeedCantList[] = {
  287. INDEX_OPT_FUZZ_SEED, NO_EQUIVALENT };
  288. /** Compiled in flag settings for the seed option */
  289. #define SEED_FLAGS (OPTST_DISABLED \
  290. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  291. /**
  292. * pnat option description with
  293. * "Must also have options" and "Incompatible options":
  294. */
  295. /** Descriptive text for the pnat option */
  296. #define PNAT_DESC (tcprewrite_opt_strs+994)
  297. /** Upper-cased name for the pnat option */
  298. #define PNAT_NAME (tcprewrite_opt_strs+1037)
  299. /** Name string for the pnat option */
  300. #define PNAT_name (tcprewrite_opt_strs+1042)
  301. /** Other options that appear in conjunction with the pnat option */
  302. static int const aPnatCantList[] = {
  303. INDEX_OPT_SRCIPMAP, NO_EQUIVALENT };
  304. /** Compiled in flag settings for the pnat option */
  305. #define PNAT_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  306. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  307. /**
  308. * srcipmap option description with
  309. * "Must also have options" and "Incompatible options":
  310. */
  311. /** Descriptive text for the srcipmap option */
  312. #define SRCIPMAP_DESC (tcprewrite_opt_strs+1047)
  313. /** Upper-cased name for the srcipmap option */
  314. #define SRCIPMAP_NAME (tcprewrite_opt_strs+1097)
  315. /** Name string for the srcipmap option */
  316. #define SRCIPMAP_name (tcprewrite_opt_strs+1106)
  317. /** Other options that appear in conjunction with the srcipmap option */
  318. static int const aSrcipmapCantList[] = {
  319. INDEX_OPT_PNAT, NO_EQUIVALENT };
  320. /** Compiled in flag settings for the srcipmap option */
  321. #define SRCIPMAP_FLAGS (OPTST_DISABLED \
  322. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  323. /**
  324. * dstipmap option description with
  325. * "Must also have options" and "Incompatible options":
  326. */
  327. /** Descriptive text for the dstipmap option */
  328. #define DSTIPMAP_DESC (tcprewrite_opt_strs+1115)
  329. /** Upper-cased name for the dstipmap option */
  330. #define DSTIPMAP_NAME (tcprewrite_opt_strs+1170)
  331. /** Name string for the dstipmap option */
  332. #define DSTIPMAP_name (tcprewrite_opt_strs+1179)
  333. /** Other options that appear in conjunction with the dstipmap option */
  334. static int const aDstipmapCantList[] = {
  335. INDEX_OPT_PNAT, NO_EQUIVALENT };
  336. /** Compiled in flag settings for the dstipmap option */
  337. #define DSTIPMAP_FLAGS (OPTST_DISABLED \
  338. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  339. /**
  340. * endpoints option description with
  341. * "Must also have options" and "Incompatible options":
  342. */
  343. #ifdef HAVE_CACHEFILE_SUPPORT
  344. /** Descriptive text for the endpoints option */
  345. #define ENDPOINTS_DESC (tcprewrite_opt_strs+1188)
  346. /** Upper-cased name for the endpoints option */
  347. #define ENDPOINTS_NAME (tcprewrite_opt_strs+1237)
  348. /** Name string for the endpoints option */
  349. #define ENDPOINTS_name (tcprewrite_opt_strs+1247)
  350. /** Other options that are required by the endpoints option */
  351. static int const aEndpointsMustList[] = {
  352. INDEX_OPT_CACHEFILE, NO_EQUIVALENT };
  353. /** Compiled in flag settings for the endpoints option */
  354. #define ENDPOINTS_FLAGS (OPTST_DISABLED \
  355. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  356. #else /* disable endpoints */
  357. #define ENDPOINTS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  358. #define aEndpointsMustList NULL
  359. #define ENDPOINTS_NAME NULL
  360. #define ENDPOINTS_DESC NULL
  361. #define ENDPOINTS_name NULL
  362. #endif /* HAVE_CACHEFILE_SUPPORT */
  363. /**
  364. * tcp-sequence option description:
  365. */
  366. /** Descriptive text for the tcp-sequence option */
  367. #define TCP_SEQUENCE_DESC (tcprewrite_opt_strs+1257)
  368. /** Upper-cased name for the tcp-sequence option */
  369. #define TCP_SEQUENCE_NAME (tcprewrite_opt_strs+1309)
  370. /** Name string for the tcp-sequence option */
  371. #define TCP_SEQUENCE_name (tcprewrite_opt_strs+1322)
  372. /** The compiled in default value for the tcp-sequence option argument */
  373. #define TCP_SEQUENCE_DFT_ARG ((char const*)0)
  374. /** Compiled in flag settings for the tcp-sequence option */
  375. #define TCP_SEQUENCE_FLAGS (OPTST_DISABLED \
  376. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  377. /**
  378. * skipbroadcast option description:
  379. */
  380. /** Descriptive text for the skipbroadcast option */
  381. #define SKIPBROADCAST_DESC (tcprewrite_opt_strs+1335)
  382. /** Upper-cased name for the skipbroadcast option */
  383. #define SKIPBROADCAST_NAME (tcprewrite_opt_strs+1388)
  384. /** Name string for the skipbroadcast option */
  385. #define SKIPBROADCAST_name (tcprewrite_opt_strs+1402)
  386. /** Compiled in flag settings for the skipbroadcast option */
  387. #define SKIPBROADCAST_FLAGS (OPTST_DISABLED)
  388. /**
  389. * fixcsum option description:
  390. */
  391. /** Descriptive text for the fixcsum option */
  392. #define FIXCSUM_DESC (tcprewrite_opt_strs+1416)
  393. /** Upper-cased name for the fixcsum option */
  394. #define FIXCSUM_NAME (tcprewrite_opt_strs+1469)
  395. /** Name string for the fixcsum option */
  396. #define FIXCSUM_name (tcprewrite_opt_strs+1477)
  397. /** Compiled in flag settings for the fixcsum option */
  398. #define FIXCSUM_FLAGS (OPTST_DISABLED)
  399. /**
  400. * mtu option description:
  401. */
  402. /** Descriptive text for the mtu option */
  403. #define MTU_DESC (tcprewrite_opt_strs+1485)
  404. /** Upper-cased name for the mtu option */
  405. #define MTU_NAME (tcprewrite_opt_strs+1526)
  406. /** Name string for the mtu option */
  407. #define MTU_name (tcprewrite_opt_strs+1530)
  408. /** Compiled in flag settings for the mtu option */
  409. #define MTU_FLAGS (OPTST_DISABLED \
  410. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  411. /**
  412. * mtu-trunc option description:
  413. */
  414. /** Descriptive text for the mtu-trunc option */
  415. #define MTU_TRUNC_DESC (tcprewrite_opt_strs+1534)
  416. /** Upper-cased name for the mtu-trunc option */
  417. #define MTU_TRUNC_NAME (tcprewrite_opt_strs+1577)
  418. /** Name string for the mtu-trunc option */
  419. #define MTU_TRUNC_name (tcprewrite_opt_strs+1587)
  420. /** Compiled in flag settings for the mtu-trunc option */
  421. #define MTU_TRUNC_FLAGS (OPTST_DISABLED)
  422. /**
  423. * efcs option description:
  424. */
  425. /** Descriptive text for the efcs option */
  426. #define EFCS_DESC (tcprewrite_opt_strs+1597)
  427. /** Upper-cased name for the efcs option */
  428. #define EFCS_NAME (tcprewrite_opt_strs+1648)
  429. /** Name string for the efcs option */
  430. #define EFCS_name (tcprewrite_opt_strs+1653)
  431. /** Compiled in flag settings for the efcs option */
  432. #define EFCS_FLAGS (OPTST_DISABLED)
  433. /**
  434. * ttl option description:
  435. */
  436. /** Descriptive text for the ttl option */
  437. #define TTL_DESC (tcprewrite_opt_strs+1658)
  438. /** Upper-cased name for the ttl option */
  439. #define TTL_NAME (tcprewrite_opt_strs+1691)
  440. /** Name string for the ttl option */
  441. #define TTL_name (tcprewrite_opt_strs+1695)
  442. /** Compiled in flag settings for the ttl option */
  443. #define TTL_FLAGS (OPTST_DISABLED \
  444. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  445. /**
  446. * tos option description:
  447. */
  448. /** Descriptive text for the tos option */
  449. #define TOS_DESC (tcprewrite_opt_strs+1699)
  450. /** Upper-cased name for the tos option */
  451. #define TOS_NAME (tcprewrite_opt_strs+1734)
  452. /** Name string for the tos option */
  453. #define TOS_name (tcprewrite_opt_strs+1738)
  454. /** Compiled in flag settings for the tos option */
  455. #define TOS_FLAGS (OPTST_DISABLED \
  456. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  457. /**
  458. * tclass option description:
  459. */
  460. /** Descriptive text for the tclass option */
  461. #define TCLASS_DESC (tcprewrite_opt_strs+1742)
  462. /** Upper-cased name for the tclass option */
  463. #define TCLASS_NAME (tcprewrite_opt_strs+1774)
  464. /** Name string for the tclass option */
  465. #define TCLASS_name (tcprewrite_opt_strs+1781)
  466. /** Compiled in flag settings for the tclass option */
  467. #define TCLASS_FLAGS (OPTST_DISABLED \
  468. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  469. /**
  470. * flowlabel option description:
  471. */
  472. /** Descriptive text for the flowlabel option */
  473. #define FLOWLABEL_DESC (tcprewrite_opt_strs+1788)
  474. /** Upper-cased name for the flowlabel option */
  475. #define FLOWLABEL_NAME (tcprewrite_opt_strs+1812)
  476. /** Name string for the flowlabel option */
  477. #define FLOWLABEL_name (tcprewrite_opt_strs+1822)
  478. /** Compiled in flag settings for the flowlabel option */
  479. #define FLOWLABEL_FLAGS (OPTST_DISABLED \
  480. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  481. /**
  482. * fixlen option description:
  483. */
  484. /** Descriptive text for the fixlen option */
  485. #define FIXLEN_DESC (tcprewrite_opt_strs+1832)
  486. /** Upper-cased name for the fixlen option */
  487. #define FIXLEN_NAME (tcprewrite_opt_strs+1883)
  488. /** Name string for the fixlen option */
  489. #define FIXLEN_name (tcprewrite_opt_strs+1890)
  490. /** Compiled in flag settings for the fixlen option */
  491. #define FIXLEN_FLAGS (OPTST_DISABLED \
  492. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  493. /**
  494. * fuzz-seed option description:
  495. */
  496. /** Descriptive text for the fuzz-seed option */
  497. #define FUZZ_SEED_DESC (tcprewrite_opt_strs+1897)
  498. /** Upper-cased name for the fuzz-seed option */
  499. #define FUZZ_SEED_NAME (tcprewrite_opt_strs+1962)
  500. /** Name string for the fuzz-seed option */
  501. #define FUZZ_SEED_name (tcprewrite_opt_strs+1972)
  502. /** The compiled in default value for the fuzz-seed option argument */
  503. #define FUZZ_SEED_DFT_ARG ((char const*)0)
  504. /** Compiled in flag settings for the fuzz-seed option */
  505. #define FUZZ_SEED_FLAGS (OPTST_DISABLED \
  506. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  507. /**
  508. * fuzz-factor option description with
  509. * "Must also have options" and "Incompatible options":
  510. */
  511. /** Descriptive text for the fuzz-factor option */
  512. #define FUZZ_FACTOR_DESC (tcprewrite_opt_strs+1982)
  513. /** Upper-cased name for the fuzz-factor option */
  514. #define FUZZ_FACTOR_NAME (tcprewrite_opt_strs+2040)
  515. /** Name string for the fuzz-factor option */
  516. #define FUZZ_FACTOR_name (tcprewrite_opt_strs+2052)
  517. /** The compiled in default value for the fuzz-factor option argument */
  518. #define FUZZ_FACTOR_DFT_ARG ((char const*)8)
  519. /** Other options that are required by the fuzz-factor option */
  520. static int const aFuzz_FactorMustList[] = {
  521. INDEX_OPT_FUZZ_SEED, NO_EQUIVALENT };
  522. /** Compiled in flag settings for the fuzz-factor option */
  523. #define FUZZ_FACTOR_FLAGS (OPTST_DISABLED \
  524. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  525. /**
  526. * skipl2broadcast option description:
  527. */
  528. /** Descriptive text for the skipl2broadcast option */
  529. #define SKIPL2BROADCAST_DESC (tcprewrite_opt_strs+2064)
  530. /** Upper-cased name for the skipl2broadcast option */
  531. #define SKIPL2BROADCAST_NAME (tcprewrite_opt_strs+2117)
  532. /** Name string for the skipl2broadcast option */
  533. #define SKIPL2BROADCAST_name (tcprewrite_opt_strs+2133)
  534. /** Compiled in flag settings for the skipl2broadcast option */
  535. #define SKIPL2BROADCAST_FLAGS (OPTST_DISABLED)
  536. /**
  537. * dlt option description:
  538. */
  539. /** Descriptive text for the dlt option */
  540. #define DLT_DESC (tcprewrite_opt_strs+2149)
  541. /** Upper-cased name for the dlt option */
  542. #define DLT_NAME (tcprewrite_opt_strs+2183)
  543. /** Name string for the dlt option */
  544. #define DLT_name (tcprewrite_opt_strs+2187)
  545. /** Compiled in flag settings for the dlt option */
  546. #define DLT_FLAGS (OPTST_DISABLED \
  547. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  548. /**
  549. * enet-dmac option description:
  550. */
  551. /** Descriptive text for the enet-dmac option */
  552. #define ENET_DMAC_DESC (tcprewrite_opt_strs+2191)
  553. /** Upper-cased name for the enet-dmac option */
  554. #define ENET_DMAC_NAME (tcprewrite_opt_strs+2235)
  555. /** Name string for the enet-dmac option */
  556. #define ENET_DMAC_name (tcprewrite_opt_strs+2245)
  557. /** Compiled in flag settings for the enet-dmac option */
  558. #define ENET_DMAC_FLAGS (OPTST_DISABLED \
  559. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  560. /**
  561. * enet-smac option description:
  562. */
  563. /** Descriptive text for the enet-smac option */
  564. #define ENET_SMAC_DESC (tcprewrite_opt_strs+2255)
  565. /** Upper-cased name for the enet-smac option */
  566. #define ENET_SMAC_NAME (tcprewrite_opt_strs+2294)
  567. /** Name string for the enet-smac option */
  568. #define ENET_SMAC_name (tcprewrite_opt_strs+2304)
  569. /** Compiled in flag settings for the enet-smac option */
  570. #define ENET_SMAC_FLAGS (OPTST_DISABLED \
  571. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  572. /**
  573. * enet-subsmac option description:
  574. */
  575. /** Descriptive text for the enet-subsmac option */
  576. #define ENET_SUBSMAC_DESC (tcprewrite_opt_strs+2314)
  577. /** Upper-cased name for the enet-subsmac option */
  578. #define ENET_SUBSMAC_NAME (tcprewrite_opt_strs+2339)
  579. /** Name string for the enet-subsmac option */
  580. #define ENET_SUBSMAC_name (tcprewrite_opt_strs+2352)
  581. /** Compiled in flag settings for the enet-subsmac option */
  582. #define ENET_SUBSMAC_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  583. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  584. /**
  585. * enet-mac-seed option description with
  586. * "Must also have options" and "Incompatible options":
  587. */
  588. /** Descriptive text for the enet-mac-seed option */
  589. #define ENET_MAC_SEED_DESC (tcprewrite_opt_strs+2365)
  590. /** Upper-cased name for the enet-mac-seed option */
  591. #define ENET_MAC_SEED_NAME (tcprewrite_opt_strs+2389)
  592. /** Name string for the enet-mac-seed option */
  593. #define ENET_MAC_SEED_name (tcprewrite_opt_strs+2403)
  594. /** Other options that appear in conjunction with the enet-mac-seed option */
  595. static int const aEnet_Mac_SeedCantList[] = {
  596. INDEX_OPT_ENET_SMAC,
  597. INDEX_OPT_ENET_DMAC,
  598. INDEX_OPT_ENET_SUBSMAC, NO_EQUIVALENT };
  599. /** Compiled in flag settings for the enet-mac-seed option */
  600. #define ENET_MAC_SEED_FLAGS (OPTST_DISABLED \
  601. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  602. /**
  603. * enet-mac-seed-keep-bytes option description with
  604. * "Must also have options" and "Incompatible options":
  605. */
  606. /** Descriptive text for the enet-mac-seed-keep-bytes option */
  607. #define ENET_MAC_SEED_KEEP_BYTES_DESC (tcprewrite_opt_strs+2365)
  608. /** Upper-cased name for the enet-mac-seed-keep-bytes option */
  609. #define ENET_MAC_SEED_KEEP_BYTES_NAME (tcprewrite_opt_strs+2417)
  610. /** Name string for the enet-mac-seed-keep-bytes option */
  611. #define ENET_MAC_SEED_KEEP_BYTES_name (tcprewrite_opt_strs+2442)
  612. /** Other options that are required by the enet-mac-seed-keep-bytes option */
  613. static int const aEnet_Mac_Seed_Keep_BytesMustList[] = {
  614. INDEX_OPT_ENET_MAC_SEED, NO_EQUIVALENT };
  615. /** Compiled in flag settings for the enet-mac-seed-keep-bytes option */
  616. #define ENET_MAC_SEED_KEEP_BYTES_FLAGS (OPTST_DISABLED \
  617. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  618. /**
  619. * enet-vlan option description:
  620. */
  621. /** Descriptive text for the enet-vlan option */
  622. #define ENET_VLAN_DESC (tcprewrite_opt_strs+2467)
  623. /** Upper-cased name for the enet-vlan option */
  624. #define ENET_VLAN_NAME (tcprewrite_opt_strs+2505)
  625. /** Name string for the enet-vlan option */
  626. #define ENET_VLAN_name (tcprewrite_opt_strs+2515)
  627. /** Compiled in flag settings for the enet-vlan option */
  628. #define ENET_VLAN_FLAGS (OPTST_DISABLED \
  629. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  630. /**
  631. * enet-vlan-tag option description with
  632. * "Must also have options" and "Incompatible options":
  633. */
  634. /** Descriptive text for the enet-vlan-tag option */
  635. #define ENET_VLAN_TAG_DESC (tcprewrite_opt_strs+2525)
  636. /** Upper-cased name for the enet-vlan-tag option */
  637. #define ENET_VLAN_TAG_NAME (tcprewrite_opt_strs+2572)
  638. /** Name string for the enet-vlan-tag option */
  639. #define ENET_VLAN_TAG_name (tcprewrite_opt_strs+2586)
  640. /** Other options that are required by the enet-vlan-tag option */
  641. static int const aEnet_Vlan_TagMustList[] = {
  642. INDEX_OPT_ENET_VLAN, NO_EQUIVALENT };
  643. /** Compiled in flag settings for the enet-vlan-tag option */
  644. #define ENET_VLAN_TAG_FLAGS (OPTST_DISABLED \
  645. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  646. /**
  647. * enet-vlan-cfi option description with
  648. * "Must also have options" and "Incompatible options":
  649. */
  650. /** Descriptive text for the enet-vlan-cfi option */
  651. #define ENET_VLAN_CFI_DESC (tcprewrite_opt_strs+2600)
  652. /** Upper-cased name for the enet-vlan-cfi option */
  653. #define ENET_VLAN_CFI_NAME (tcprewrite_opt_strs+2643)
  654. /** Name string for the enet-vlan-cfi option */
  655. #define ENET_VLAN_CFI_name (tcprewrite_opt_strs+2657)
  656. /** Other options that are required by the enet-vlan-cfi option */
  657. static int const aEnet_Vlan_CfiMustList[] = {
  658. INDEX_OPT_ENET_VLAN, NO_EQUIVALENT };
  659. /** Compiled in flag settings for the enet-vlan-cfi option */
  660. #define ENET_VLAN_CFI_FLAGS (OPTST_DISABLED \
  661. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  662. /**
  663. * enet-vlan-pri option description with
  664. * "Must also have options" and "Incompatible options":
  665. */
  666. /** Descriptive text for the enet-vlan-pri option */
  667. #define ENET_VLAN_PRI_DESC (tcprewrite_opt_strs+2671)
  668. /** Upper-cased name for the enet-vlan-pri option */
  669. #define ENET_VLAN_PRI_NAME (tcprewrite_opt_strs+2713)
  670. /** Name string for the enet-vlan-pri option */
  671. #define ENET_VLAN_PRI_name (tcprewrite_opt_strs+2727)
  672. /** Other options that are required by the enet-vlan-pri option */
  673. static int const aEnet_Vlan_PriMustList[] = {
  674. INDEX_OPT_ENET_VLAN, NO_EQUIVALENT };
  675. /** Compiled in flag settings for the enet-vlan-pri option */
  676. #define ENET_VLAN_PRI_FLAGS (OPTST_DISABLED \
  677. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  678. /**
  679. * hdlc-control option description:
  680. */
  681. /** Descriptive text for the hdlc-control option */
  682. #define HDLC_CONTROL_DESC (tcprewrite_opt_strs+2741)
  683. /** Upper-cased name for the hdlc-control option */
  684. #define HDLC_CONTROL_NAME (tcprewrite_opt_strs+2768)
  685. /** Name string for the hdlc-control option */
  686. #define HDLC_CONTROL_name (tcprewrite_opt_strs+2781)
  687. /** Compiled in flag settings for the hdlc-control option */
  688. #define HDLC_CONTROL_FLAGS (OPTST_DISABLED \
  689. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  690. /**
  691. * hdlc-address option description:
  692. */
  693. /** Descriptive text for the hdlc-address option */
  694. #define HDLC_ADDRESS_DESC (tcprewrite_opt_strs+2794)
  695. /** Upper-cased name for the hdlc-address option */
  696. #define HDLC_ADDRESS_NAME (tcprewrite_opt_strs+2815)
  697. /** Name string for the hdlc-address option */
  698. #define HDLC_ADDRESS_name (tcprewrite_opt_strs+2828)
  699. /** Compiled in flag settings for the hdlc-address option */
  700. #define HDLC_ADDRESS_FLAGS (OPTST_DISABLED \
  701. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  702. /**
  703. * user-dlt option description:
  704. */
  705. /** Descriptive text for the user-dlt option */
  706. #define USER_DLT_DESC (tcprewrite_opt_strs+2841)
  707. /** Upper-cased name for the user-dlt option */
  708. #define USER_DLT_NAME (tcprewrite_opt_strs+2866)
  709. /** Name string for the user-dlt option */
  710. #define USER_DLT_name (tcprewrite_opt_strs+2875)
  711. /** Compiled in flag settings for the user-dlt option */
  712. #define USER_DLT_FLAGS (OPTST_DISABLED \
  713. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  714. /**
  715. * user-dlink option description:
  716. */
  717. /** Descriptive text for the user-dlink option */
  718. #define USER_DLINK_DESC (tcprewrite_opt_strs+2884)
  719. /** Upper-cased name for the user-dlink option */
  720. #define USER_DLINK_NAME (tcprewrite_opt_strs+2933)
  721. /** Name string for the user-dlink option */
  722. #define USER_DLINK_name (tcprewrite_opt_strs+2944)
  723. /** Compiled in flag settings for the user-dlink option */
  724. #define USER_DLINK_FLAGS (OPTST_DISABLED | OPTST_STACKED \
  725. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  726. /**
  727. * dbug option description:
  728. */
  729. #ifdef DEBUG
  730. /** Descriptive text for the dbug option */
  731. #define DBUG_DESC (tcprewrite_opt_strs+2955)
  732. /** Upper-cased name for the dbug option */
  733. #define DBUG_NAME (tcprewrite_opt_strs+2979)
  734. /** Name string for the dbug option */
  735. #define DBUG_name (tcprewrite_opt_strs+2984)
  736. /** The compiled in default value for the dbug option argument */
  737. #define DBUG_DFT_ARG ((char const*)0)
  738. /** Compiled in flag settings for the dbug option */
  739. #define DBUG_FLAGS (OPTST_DISABLED | OPTST_IMM \
  740. | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
  741. #else /* disable dbug */
  742. #define DBUG_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  743. #define DBUG_DFT_ARG NULL
  744. #define DBUG_NAME NULL
  745. #define DBUG_DESC NULL
  746. #define DBUG_name NULL
  747. #endif /* DEBUG */
  748. /**
  749. * infile option description:
  750. */
  751. /** Descriptive text for the infile option */
  752. #define INFILE_DESC (tcprewrite_opt_strs+2989)
  753. /** Upper-cased name for the infile option */
  754. #define INFILE_NAME (tcprewrite_opt_strs+3021)
  755. /** Name string for the infile option */
  756. #define INFILE_name (tcprewrite_opt_strs+3028)
  757. /** Compiled in flag settings for the infile option */
  758. #define INFILE_FLAGS (OPTST_DISABLED | OPTST_MUST_SET | OPTST_IMM \
  759. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  760. /**
  761. * outfile option description:
  762. */
  763. /** Descriptive text for the outfile option */
  764. #define OUTFILE_DESC (tcprewrite_opt_strs+3035)
  765. /** Upper-cased name for the outfile option */
  766. #define OUTFILE_NAME (tcprewrite_opt_strs+3052)
  767. /** Name string for the outfile option */
  768. #define OUTFILE_name (tcprewrite_opt_strs+3060)
  769. /** Compiled in flag settings for the outfile option */
  770. #define OUTFILE_FLAGS (OPTST_DISABLED | OPTST_MUST_SET \
  771. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  772. /**
  773. * cachefile option description:
  774. */
  775. /** Descriptive text for the cachefile option */
  776. #define CACHEFILE_DESC (tcprewrite_opt_strs+3068)
  777. /** Upper-cased name for the cachefile option */
  778. #define CACHEFILE_NAME (tcprewrite_opt_strs+3105)
  779. /** Name string for the cachefile option */
  780. #define CACHEFILE_name (tcprewrite_opt_strs+3115)
  781. /** Compiled in flag settings for the cachefile option */
  782. #define CACHEFILE_FLAGS (OPTST_DISABLED \
  783. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  784. /**
  785. * verbose option description:
  786. */
  787. #ifdef ENABLE_VERBOSE
  788. /** Descriptive text for the verbose option */
  789. #define VERBOSE_DESC (tcprewrite_opt_strs+3125)
  790. /** Upper-cased name for the verbose option */
  791. #define VERBOSE_NAME (tcprewrite_opt_strs+3169)
  792. /** Name string for the verbose option */
  793. #define VERBOSE_name (tcprewrite_opt_strs+3177)
  794. /** Compiled in flag settings for the verbose option */
  795. #define VERBOSE_FLAGS (OPTST_DISABLED | OPTST_IMM)
  796. #else /* disable verbose */
  797. #define VERBOSE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  798. #define VERBOSE_NAME NULL
  799. #define VERBOSE_DESC NULL
  800. #define VERBOSE_name NULL
  801. #endif /* ENABLE_VERBOSE */
  802. /**
  803. * decode option description with
  804. * "Must also have options" and "Incompatible options":
  805. */
  806. #ifdef ENABLE_VERBOSE
  807. /** Descriptive text for the decode option */
  808. #define DECODE_DESC (tcprewrite_opt_strs+3185)
  809. /** Upper-cased name for the decode option */
  810. #define DECODE_NAME (tcprewrite_opt_strs+3221)
  811. /** Name string for the decode option */
  812. #define DECODE_name (tcprewrite_opt_strs+3228)
  813. /** Other options that are required by the decode option */
  814. static int const aDecodeMustList[] = {
  815. INDEX_OPT_VERBOSE, NO_EQUIVALENT };
  816. /** Compiled in flag settings for the decode option */
  817. #define DECODE_FLAGS (OPTST_DISABLED \
  818. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  819. #else /* disable decode */
  820. #define DECODE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  821. #define aDecodeMustList NULL
  822. #define DECODE_NAME NULL
  823. #define DECODE_DESC NULL
  824. #define DECODE_name NULL
  825. #endif /* ENABLE_VERBOSE */
  826. /**
  827. * fragroute option description:
  828. */
  829. #ifdef ENABLE_FRAGROUTE
  830. /** Descriptive text for the fragroute option */
  831. #define FRAGROUTE_DESC (tcprewrite_opt_strs+3235)
  832. /** Upper-cased name for the fragroute option */
  833. #define FRAGROUTE_NAME (tcprewrite_opt_strs+3270)
  834. /** Name string for the fragroute option */
  835. #define FRAGROUTE_name (tcprewrite_opt_strs+3280)
  836. /** Compiled in flag settings for the fragroute option */
  837. #define FRAGROUTE_FLAGS (OPTST_DISABLED \
  838. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  839. #else /* disable fragroute */
  840. #define FRAGROUTE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  841. #define FRAGROUTE_NAME NULL
  842. #define FRAGROUTE_DESC NULL
  843. #define FRAGROUTE_name NULL
  844. #endif /* ENABLE_FRAGROUTE */
  845. /**
  846. * fragdir option description with
  847. * "Must also have options" and "Incompatible options":
  848. */
  849. #ifdef ENABLE_FRAGROUTE
  850. /** Descriptive text for the fragdir option */
  851. #define FRAGDIR_DESC (tcprewrite_opt_strs+3290)
  852. /** Upper-cased name for the fragdir option */
  853. #define FRAGDIR_NAME (tcprewrite_opt_strs+3340)
  854. /** Name string for the fragdir option */
  855. #define FRAGDIR_name (tcprewrite_opt_strs+3348)
  856. /** Other options that are required by the fragdir option */
  857. static int const aFragdirMustList[] = {
  858. INDEX_OPT_CACHEFILE, NO_EQUIVALENT };
  859. /** Compiled in flag settings for the fragdir option */
  860. #define FRAGDIR_FLAGS (OPTST_DISABLED \
  861. | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
  862. #else /* disable fragdir */
  863. #define FRAGDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  864. #define aFragdirMustList NULL
  865. #define FRAGDIR_NAME NULL
  866. #define FRAGDIR_DESC NULL
  867. #define FRAGDIR_name NULL
  868. #endif /* ENABLE_FRAGROUTE */
  869. /**
  870. * skip-soft-errors option description:
  871. */
  872. /** Descriptive text for the skip-soft-errors option */
  873. #define SKIP_SOFT_ERRORS_DESC (tcprewrite_opt_strs+3356)
  874. /** Upper-cased name for the skip-soft-errors option */
  875. #define SKIP_SOFT_ERRORS_NAME (tcprewrite_opt_strs+3394)
  876. /** Name string for the skip-soft-errors option */
  877. #define SKIP_SOFT_ERRORS_name (tcprewrite_opt_strs+3411)
  878. /** Compiled in flag settings for the skip-soft-errors option */
  879. #define SKIP_SOFT_ERRORS_FLAGS (OPTST_DISABLED)
  880. /**
  881. * version option description:
  882. */
  883. /** Descriptive text for the version option */
  884. #define VERSION_DESC (tcprewrite_opt_strs+3428)
  885. /** Upper-cased name for the version option */
  886. #define VERSION_NAME (tcprewrite_opt_strs+3454)
  887. /** Name string for the version option */
  888. #define VERSION_name (tcprewrite_opt_strs+3462)
  889. /** Compiled in flag settings for the version option */
  890. #define VERSION_FLAGS (OPTST_DISABLED)
  891. /**
  892. * less-help option description:
  893. */
  894. /** Descriptive text for the less-help option */
  895. #define LESS_HELP_DESC (tcprewrite_opt_strs+3470)
  896. /** Upper-cased name for the less-help option */
  897. #define LESS_HELP_NAME (tcprewrite_opt_strs+3510)
  898. /** Name string for the less-help option */
  899. #define LESS_HELP_name (tcprewrite_opt_strs+3520)
  900. /** Compiled in flag settings for the less-help option */
  901. #define LESS_HELP_FLAGS (OPTST_DISABLED | OPTST_IMM)
  902. /*
  903. * Help/More_Help option descriptions:
  904. */
  905. #define HELP_DESC (tcprewrite_opt_strs+3530)
  906. #define HELP_name (tcprewrite_opt_strs+3574)
  907. #ifdef HAVE_WORKING_FORK
  908. #define MORE_HELP_DESC (tcprewrite_opt_strs+3579)
  909. #define MORE_HELP_name (tcprewrite_opt_strs+3624)
  910. #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
  911. #else
  912. #define MORE_HELP_DESC HELP_DESC
  913. #define MORE_HELP_name HELP_name
  914. #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
  915. #endif
  916. #define SAVE_OPTS_DESC (tcprewrite_opt_strs+3634)
  917. #define SAVE_OPTS_name (tcprewrite_opt_strs+3673)
  918. #define LOAD_OPTS_DESC (tcprewrite_opt_strs+3683)
  919. #define LOAD_OPTS_NAME (tcprewrite_opt_strs+3715)
  920. #define NO_LOAD_OPTS_name (tcprewrite_opt_strs+3725)
  921. #define LOAD_OPTS_pfx (tcprewrite_opt_strs+3738)
  922. #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
  923. /**
  924. * Declare option callback procedures
  925. */
  926. #ifdef DEBUG
  927. static tOptProc doOptDbug;
  928. #else /* not DEBUG */
  929. # define doOptDbug NULL
  930. #endif /* def/not DEBUG */
  931. extern tOptProc
  932. optionBooleanVal, optionNestedVal, optionNumericVal,
  933. optionPagedUsage, optionPrintVersion, optionResetOpt,
  934. optionStackArg, optionTimeDate, optionTimeVal,
  935. optionUnstackArg, optionVendorOption;
  936. static tOptProc
  937. doOptCachefile, doOptEnet_Mac_Seed_Keep_Bytes,
  938. doOptEnet_Vlan_Cfi, doOptEnet_Vlan_Pri,
  939. doOptEnet_Vlan_Tag, doOptFlowlabel,
  940. doOptFuzz_Factor, doOptFuzz_Seed,
  941. doOptLess_Help, doOptMtu,
  942. doOptTclass, doOptTcp_Sequence,
  943. doOptTos, doOptVersion,
  944. doUsageOpt;
  945. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  946. /**
  947. * Define the tcprewrite Option Descriptions.
  948. * This is an array of OPTION_CT entries, one for each
  949. * option that the tcprewrite program responds to.
  950. */
  951. static tOptDesc optDesc[OPTION_CT] = {
  952. { /* entry idx, value */ 0, 0,
  953. /* equiv idx, value */ 0, 0,
  954. /* equivalenced to */ NO_EQUIVALENT,
  955. /* min, max, act ct */ 0, 0, 0,
  956. /* opt state flags */ TCPEDIT_FLAGS, 0,
  957. /* last opt argumnt */ { NULL },
  958. /* arg list/cookie */ NULL,
  959. /* must/cannot opts */ NULL, NULL,
  960. /* option proc */ NULL,
  961. /* desc, NAME, name */ TCPEDIT_DESC, NULL, NULL,
  962. /* disablement strs */ NULL, NULL },
  963. { /* entry idx, value */ 1, VALUE_OPT_PORTMAP,
  964. /* equiv idx, value */ 1, VALUE_OPT_PORTMAP,
  965. /* equivalenced to */ NO_EQUIVALENT,
  966. /* min, max, act ct */ 0, 9999, 0,
  967. /* opt state flags */ PORTMAP_FLAGS, 0,
  968. /* last opt argumnt */ { NULL }, /* --portmap */
  969. /* arg list/cookie */ NULL,
  970. /* must/cannot opts */ NULL, NULL,
  971. /* option proc */ optionStackArg,
  972. /* desc, NAME, name */ PORTMAP_DESC, PORTMAP_NAME, PORTMAP_name,
  973. /* disablement strs */ NULL, NULL },
  974. { /* entry idx, value */ 2, VALUE_OPT_SEED,
  975. /* equiv idx, value */ 2, VALUE_OPT_SEED,
  976. /* equivalenced to */ NO_EQUIVALENT,
  977. /* min, max, act ct */ 0, 1, 0,
  978. /* opt state flags */ SEED_FLAGS, 0,
  979. /* last opt argumnt */ { NULL }, /* --seed */
  980. /* arg list/cookie */ NULL,
  981. /* must/cannot opts */ NULL, aSeedCantList,
  982. /* option proc */ optionNumericVal,
  983. /* desc, NAME, name */ SEED_DESC, SEED_NAME, SEED_name,
  984. /* disablement strs */ NULL, NULL },
  985. { /* entry idx, value */ 3, VALUE_OPT_PNAT,
  986. /* equiv idx, value */ 3, VALUE_OPT_PNAT,
  987. /* equivalenced to */ NO_EQUIVALENT,
  988. /* min, max, act ct */ 0, 2, 0,
  989. /* opt state flags */ PNAT_FLAGS, 0,
  990. /* last opt argumnt */ { NULL }, /* --pnat */
  991. /* arg list/cookie */ NULL,
  992. /* must/cannot opts */ NULL, aPnatCantList,
  993. /* option proc */ optionStackArg,
  994. /* desc, NAME, name */ PNAT_DESC, PNAT_NAME, PNAT_name,
  995. /* disablement strs */ NULL, NULL },
  996. { /* entry idx, value */ 4, VALUE_OPT_SRCIPMAP,
  997. /* equiv idx, value */ 4, VALUE_OPT_SRCIPMAP,
  998. /* equivalenced to */ NO_EQUIVALENT,
  999. /* min, max, act ct */ 0, 1, 0,
  1000. /* opt state flags */ SRCIPMAP_FLAGS, 0,
  1001. /* last opt argumnt */ { NULL }, /* --srcipmap */
  1002. /* arg list/cookie */ NULL,
  1003. /* must/cannot opts */ NULL, aSrcipmapCantList,
  1004. /* option proc */ NULL,
  1005. /* desc, NAME, name */ SRCIPMAP_DESC, SRCIPMAP_NAME, SRCIPMAP_name,
  1006. /* disablement strs */ NULL, NULL },
  1007. { /* entry idx, value */ 5, VALUE_OPT_DSTIPMAP,
  1008. /* equiv idx, value */ 5, VALUE_OPT_DSTIPMAP,
  1009. /* equivalenced to */ NO_EQUIVALENT,
  1010. /* min, max, act ct */ 0, 1, 0,
  1011. /* opt state flags */ DSTIPMAP_FLAGS, 0,
  1012. /* last opt argumnt */ { NULL }, /* --dstipmap */
  1013. /* arg list/cookie */ NULL,
  1014. /* must/cannot opts */ NULL, aDstipmapCantList,
  1015. /* option proc */ NULL,
  1016. /* desc, NAME, name */ DSTIPMAP_DESC, DSTIPMAP_NAME, DSTIPMAP_name,
  1017. /* disablement strs */ NULL, NULL },
  1018. { /* entry idx, value */ 6, VALUE_OPT_ENDPOINTS,
  1019. /* equiv idx, value */ 6, VALUE_OPT_ENDPOINTS,
  1020. /* equivalenced to */ NO_EQUIVALENT,
  1021. /* min, max, act ct */ 0, 1, 0,
  1022. /* opt state flags */ ENDPOINTS_FLAGS, 0,
  1023. /* last opt argumnt */ { NULL }, /* --endpoints */
  1024. /* arg list/cookie */ NULL,
  1025. /* must/cannot opts */ aEndpointsMustList, NULL,
  1026. /* option proc */ NULL,
  1027. /* desc, NAME, name */ ENDPOINTS_DESC, ENDPOINTS_NAME, ENDPOINTS_name,
  1028. /* disablement strs */ NULL, NULL },
  1029. { /* entry idx, value */ 7, VALUE_OPT_TCP_SEQUENCE,
  1030. /* equiv idx, value */ 7, VALUE_OPT_TCP_SEQUENCE,
  1031. /* equivalenced to */ NO_EQUIVALENT,
  1032. /* min, max, act ct */ 0, 1, 0,
  1033. /* opt state flags */ TCP_SEQUENCE_FLAGS, 0,
  1034. /* last opt argumnt */ { TCP_SEQUENCE_DFT_ARG },
  1035. /* arg list/cookie */ NULL,
  1036. /* must/cannot opts */ NULL, NULL,
  1037. /* option proc */ doOptTcp_Sequence,
  1038. /* desc, NAME, name */ TCP_SEQUENCE_DESC, TCP_SEQUENCE_NAME, TCP_SEQUENCE_name,
  1039. /* disablement strs */ NULL, NULL },
  1040. { /* entry idx, value */ 8, VALUE_OPT_SKIPBROADCAST,
  1041. /* equiv idx, value */ 8, VALUE_OPT_SKIPBROADCAST,
  1042. /* equivalenced to */ NO_EQUIVALENT,
  1043. /* min, max, act ct */ 0, 1, 0,
  1044. /* opt state flags */ SKIPBROADCAST_FLAGS, 0,
  1045. /* last opt argumnt */ { NULL }, /* --skipbroadcast */
  1046. /* arg list/cookie */ NULL,
  1047. /* must/cannot opts */ NULL, NULL,
  1048. /* option proc */ NULL,
  1049. /* desc, NAME, name */ SKIPBROADCAST_DESC, SKIPBROADCAST_NAME, SKIPBROADCAST_name,
  1050. /* disablement strs */ NULL, NULL },
  1051. { /* entry idx, value */ 9, VALUE_OPT_FIXCSUM,
  1052. /* equiv idx, value */ 9, VALUE_OPT_FIXCSUM,
  1053. /* equivalenced to */ NO_EQUIVALENT,
  1054. /* min, max, act ct */ 0, 1, 0,
  1055. /* opt state flags */ FIXCSUM_FLAGS, 0,
  1056. /* last opt argumnt */ { NULL }, /* --fixcsum */
  1057. /* arg list/cookie */ NULL,
  1058. /* must/cannot opts */ NULL, NULL,
  1059. /* option proc */ NULL,
  1060. /* desc, NAME, name */ FIXCSUM_DESC, FIXCSUM_NAME, FIXCSUM_name,
  1061. /* disablement strs */ NULL, NULL },
  1062. { /* entry idx, value */ 10, VALUE_OPT_MTU,
  1063. /* equiv idx, value */ 10, VALUE_OPT_MTU,
  1064. /* equivalenced to */ NO_EQUIVALENT,
  1065. /* min, max, act ct */ 0, 1, 0,
  1066. /* opt state flags */ MTU_FLAGS, 0,
  1067. /* last opt argumnt */ { NULL }, /* --mtu */
  1068. /* arg list/cookie */ NULL,
  1069. /* must/cannot opts */ NULL, NULL,
  1070. /* option proc */ doOptMtu,
  1071. /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name,
  1072. /* disablement strs */ NULL, NULL },
  1073. { /* entry idx, value */ 11, VALUE_OPT_MTU_TRUNC,
  1074. /* equiv idx, value */ 11, VALUE_OPT_MTU_TRUNC,
  1075. /* equivalenced to */ NO_EQUIVALENT,
  1076. /* min, max, act ct */ 0, 1, 0,
  1077. /* opt state flags */ MTU_TRUNC_FLAGS, 0,
  1078. /* last opt argumnt */ { NULL }, /* --mtu-trunc */
  1079. /* arg list/cookie */ NULL,
  1080. /* must/cannot opts */ NULL, NULL,
  1081. /* option proc */ NULL,
  1082. /* desc, NAME, name */ MTU_TRUNC_DESC, MTU_TRUNC_NAME, MTU_TRUNC_name,
  1083. /* disablement strs */ NULL, NULL },
  1084. { /* entry idx, value */ 12, VALUE_OPT_EFCS,
  1085. /* equiv idx, value */ 12, VALUE_OPT_EFCS,
  1086. /* equivalenced to */ NO_EQUIVALENT,
  1087. /* min, max, act ct */ 0, 1, 0,
  1088. /* opt state flags */ EFCS_FLAGS, 0,
  1089. /* last opt argumnt */ { NULL }, /* --efcs */
  1090. /* arg list/cookie */ NULL,
  1091. /* must/cannot opts */ NULL, NULL,
  1092. /* option proc */ NULL,
  1093. /* desc, NAME, name */ EFCS_DESC, EFCS_NAME, EFCS_name,
  1094. /* disablement strs */ NULL, NULL },
  1095. { /* entry idx, value */ 13, VALUE_OPT_TTL,
  1096. /* equiv idx, value */ 13, VALUE_OPT_TTL,
  1097. /* equivalenced to */ NO_EQUIVALENT,
  1098. /* min, max, act ct */ 0, 1, 0,
  1099. /* opt state flags */ TTL_FLAGS, 0,
  1100. /* last opt argumnt */ { NULL }, /* --ttl */
  1101. /* arg list/cookie */ NULL,
  1102. /* must/cannot opts */ NULL, NULL,
  1103. /* option proc */ NULL,
  1104. /* desc, NAME, name */ TTL_DESC, TTL_NAME, TTL_name,
  1105. /* disablement strs */ NULL, NULL },
  1106. { /* entry idx, value */ 14, VALUE_OPT_TOS,
  1107. /* equiv idx, value */ 14, VALUE_OPT_TOS,
  1108. /* equivalenced to */ NO_EQUIVALENT,
  1109. /* min, max, act ct */ 0, 1, 0,
  1110. /* opt state flags */ TOS_FLAGS, 0,
  1111. /* last opt argumnt */ { NULL }, /* --tos */
  1112. /* arg list/cookie */ NULL,
  1113. /* must/cannot opts */ NULL, NULL,
  1114. /* option proc */ doOptTos,
  1115. /* desc, NAME, name */ TOS_DESC, TOS_NAME, TOS_name,
  1116. /* disablement strs */ NULL, NULL },
  1117. { /* entry idx, value */ 15, VALUE_OPT_TCLASS,
  1118. /* equiv idx, value */ 15, VALUE_OPT_TCLASS,
  1119. /* equivalenced to */ NO_EQUIVALENT,
  1120. /* min, max, act ct */ 0, 1, 0,
  1121. /* opt state flags */ TCLASS_FLAGS, 0,
  1122. /* last opt argumnt */ { NULL }, /* --tclass */
  1123. /* arg list/cookie */ NULL,
  1124. /* must/cannot opts */ NULL, NULL,
  1125. /* option proc */ doOptTclass,
  1126. /* desc, NAME, name */ TCLASS_DESC, TCLASS_NAME, TCLASS_name,
  1127. /* disablement strs */ NULL, NULL },
  1128. { /* entry idx, value */ 16, VALUE_OPT_FLOWLABEL,
  1129. /* equiv idx, value */ 16, VALUE_OPT_FLOWLABEL,
  1130. /* equivalenced to */ NO_EQUIVALENT,
  1131. /* min, max, act ct */ 0, 1, 0,
  1132. /* opt state flags */ FLOWLABEL_FLAGS, 0,
  1133. /* last opt argumnt */ { NULL }, /* --flowlabel */
  1134. /* arg list/cookie */ NULL,
  1135. /* must/cannot opts */ NULL, NULL,
  1136. /* option proc */ doOptFlowlabel,
  1137. /* desc, NAME, name */ FLOWLABEL_DESC, FLOWLABEL_NAME, FLOWLABEL_name,
  1138. /* disablement strs */ NULL, NULL },
  1139. { /* entry idx, value */ 17, VALUE_OPT_FIXLEN,
  1140. /* equiv idx, value */ 17, VALUE_OPT_FIXLEN,
  1141. /* equivalenced to */ NO_EQUIVALENT,
  1142. /* min, max, act ct */ 0, 1, 0,
  1143. /* opt state flags */ FIXLEN_FLAGS, 0,
  1144. /* last opt argumnt */ { NULL }, /* --fixlen */
  1145. /* arg list/cookie */ NULL,
  1146. /* must/cannot opts */ NULL, NULL,
  1147. /* option proc */ NULL,
  1148. /* desc, NAME, name */ FIXLEN_DESC, FIXLEN_NAME, FIXLEN_name,
  1149. /* disablement strs */ NULL, NULL },
  1150. { /* entry idx, value */ 18, VALUE_OPT_FUZZ_SEED,
  1151. /* equiv idx, value */ 18, VALUE_OPT_FUZZ_SEED,
  1152. /* equivalenced to */ NO_EQUIVALENT,
  1153. /* min, max, act ct */ 0, 1, 0,
  1154. /* opt state flags */ FUZZ_SEED_FLAGS, 0,
  1155. /* last opt argumnt */ { FUZZ_SEED_DFT_ARG },
  1156. /* arg list/cookie */ NULL,
  1157. /* must/cannot opts */ NULL, NULL,
  1158. /* option proc */ doOptFuzz_Seed,
  1159. /* desc, NAME, name */ FUZZ_SEED_DESC, FUZZ_SEED_NAME, FUZZ_SEED_name,
  1160. /* disablement strs */ NULL, NULL },
  1161. { /* entry idx, value */ 19, VALUE_OPT_FUZZ_FACTOR,
  1162. /* equiv idx, value */ 19, VALUE_OPT_FUZZ_FACTOR,
  1163. /* equivalenced to */ NO_EQUIVALENT,
  1164. /* min, max, act ct */ 0, 1, 0,
  1165. /* opt state flags */ FUZZ_FACTOR_FLAGS, 0,
  1166. /* last opt argumnt */ { FUZZ_FACTOR_DFT_ARG },
  1167. /* arg list/cookie */ NULL,
  1168. /* must/cannot opts */ aFuzz_FactorMustList, NULL,
  1169. /* option proc */ doOptFuzz_Factor,
  1170. /* desc, NAME, name */ FUZZ_FACTOR_DESC, FUZZ_FACTOR_NAME, FUZZ_FACTOR_name,
  1171. /* disablement strs */ NULL, NULL },
  1172. { /* entry idx, value */ 20, VALUE_OPT_SKIPL2BROADCAST,
  1173. /* equiv idx, value */ 20, VALUE_OPT_SKIPL2BROADCAST,
  1174. /* equivalenced to */ NO_EQUIVALENT,
  1175. /* min, max, act ct */ 0, 1, 0,
  1176. /* opt state flags */ SKIPL2BROADCAST_FLAGS, 0,
  1177. /* last opt argumnt */ { NULL }, /* --skipl2broadcast */
  1178. /* arg list/cookie */ NULL,
  1179. /* must/cannot opts */ NULL, NULL,
  1180. /* option proc */ NULL,
  1181. /* desc, NAME, name */ SKIPL2BROADCAST_DESC, SKIPL2BROADCAST_NAME, SKIPL2BROADCAST_name,
  1182. /* disablement strs */ NULL, NULL },
  1183. { /* entry idx, value */ 21, VALUE_OPT_DLT,
  1184. /* equiv idx, value */ 21, VALUE_OPT_DLT,
  1185. /* equivalenced to */ NO_EQUIVALENT,
  1186. /* min, max, act ct */ 0, 1, 0,
  1187. /* opt state flags */ DLT_FLAGS, 0,
  1188. /* last opt argumnt */ { NULL }, /* --dlt */
  1189. /* arg list/cookie */ NULL,
  1190. /* must/cannot opts */ NULL, NULL,
  1191. /* option proc */ NULL,
  1192. /* desc, NAME, name */ DLT_DESC, DLT_NAME, DLT_name,
  1193. /* disablement strs */ NULL, NULL },
  1194. { /* entry idx, value */ 22, VALUE_OPT_ENET_DMAC,
  1195. /* equiv idx, value */ 22, VALUE_OPT_ENET_DMAC,
  1196. /* equivalenced to */ NO_EQUIVALENT,
  1197. /* min, max, act ct */ 0, 1, 0,
  1198. /* opt state flags */ ENET_DMAC_FLAGS, 0,
  1199. /* last opt argumnt */ { NULL }, /* --enet-dmac */
  1200. /* arg list/cookie */ NULL,
  1201. /* must/cannot opts */ NULL, NULL,
  1202. /* option proc */ NULL,
  1203. /* desc, NAME, name */ ENET_DMAC_DESC, ENET_DMAC_NAME, ENET_DMAC_name,
  1204. /* disablement strs */ NULL, NULL },
  1205. { /* entry idx, value */ 23, VALUE_OPT_ENET_SMAC,
  1206. /* equiv idx, value */ 23, VALUE_OPT_ENET_SMAC,
  1207. /* equivalenced to */ NO_EQUIVALENT,
  1208. /* min, max, act ct */ 0, 1, 0,
  1209. /* opt state flags */ ENET_SMAC_FLAGS, 0,
  1210. /* last opt argumnt */ { NULL }, /* --enet-smac */
  1211. /* arg list/cookie */ NULL,
  1212. /* must/cannot opts */ NULL, NULL,
  1213. /* option proc */ NULL,
  1214. /* desc, NAME, name */ ENET_SMAC_DESC, ENET_SMAC_NAME, ENET_SMAC_name,
  1215. /* disablement strs */ NULL, NULL },
  1216. { /* entry idx, value */ 24, VALUE_OPT_ENET_SUBSMAC,
  1217. /* equiv idx, value */ 24, VALUE_OPT_ENET_SUBSMAC,
  1218. /* equivalenced to */ NO_EQUIVALENT,
  1219. /* min, max, act ct */ 0, 9999, 0,
  1220. /* opt state flags */ ENET_SUBSMAC_FLAGS, 0,
  1221. /* last opt argumnt */ { NULL }, /* --enet-subsmac */
  1222. /* arg list/cookie */ NULL,
  1223. /* must/cannot opts */ NULL, NULL,
  1224. /* option proc */ optionStackArg,
  1225. /* desc, NAME, name */ ENET_SUBSMAC_DESC, ENET_SUBSMAC_NAME, ENET_SUBSMAC_name,
  1226. /* disablement strs */ NULL, NULL },
  1227. { /* entry idx, value */ 25, VALUE_OPT_ENET_MAC_SEED,
  1228. /* equiv idx, value */ 25, VALUE_OPT_ENET_MAC_SEED,
  1229. /* equivalenced to */ NO_EQUIVALENT,
  1230. /* min, max, act ct */ 0, 1, 0,
  1231. /* opt state flags */ ENET_MAC_SEED_FLAGS, 0,
  1232. /* last opt argumnt */ { NULL }, /* --enet-mac-seed */
  1233. /* arg list/cookie */ NULL,
  1234. /* must/cannot opts */ NULL, aEnet_Mac_SeedCantList,
  1235. /* option proc */ optionNumericVal,
  1236. /* desc, NAME, name */ ENET_MAC_SEED_DESC, ENET_MAC_SEED_NAME, ENET_MAC_SEED_name,
  1237. /* disablement strs */ NULL, NULL },
  1238. { /* entry idx, value */ 26, VALUE_OPT_ENET_MAC_SEED_KEEP_BYTES,
  1239. /* equiv idx, value */ 26, VALUE_OPT_ENET_MAC_SEED_KEEP_BYTES,
  1240. /* equivalenced to */ NO_EQUIVALENT,
  1241. /* min, max, act ct */ 0, 1, 0,
  1242. /* opt state flags */ ENET_MAC_SEED_KEEP_BYTES_FLAGS, 0,
  1243. /* last opt argumnt */ { NULL }, /* --enet-mac-seed-keep-bytes */
  1244. /* arg list/cookie */ NULL,
  1245. /* must/cannot opts */ aEnet_Mac_Seed_Keep_BytesMustList, NULL,
  1246. /* option proc */ doOptEnet_Mac_Seed_Keep_Bytes,
  1247. /* desc, NAME, name */ ENET_MAC_SEED_KEEP_BYTES_DESC, ENET_MAC_SEED_KEEP_BYTES_NAME, ENET_MAC_SEED_KEEP_BYTES_name,
  1248. /* disablement strs */ NULL, NULL },
  1249. { /* entry idx, value */ 27, VALUE_OPT_ENET_VLAN,
  1250. /* equiv idx, value */ 27, VALUE_OPT_ENET_VLAN,
  1251. /* equivalenced to */ NO_EQUIVALENT,
  1252. /* min, max, act ct */ 0, 1, 0,
  1253. /* opt state flags */ ENET_VLAN_FLAGS, 0,
  1254. /* last opt argumnt */ { NULL }, /* --enet-vlan */
  1255. /* arg list/cookie */ NULL,
  1256. /* must/cannot opts */ NULL, NULL,
  1257. /* option proc */ NULL,
  1258. /* desc, NAME, name */ ENET_VLAN_DESC, ENET_VLAN_NAME, ENET_VLAN_name,
  1259. /* disablement strs */ NULL, NULL },
  1260. { /* entry idx, value */ 28, VALUE_OPT_ENET_VLAN_TAG,
  1261. /* equiv idx, value */ 28, VALUE_OPT_ENET_VLAN_TAG,
  1262. /* equivalenced to */ NO_EQUIVALENT,
  1263. /* min, max, act ct */ 0, 1, 0,
  1264. /* opt state flags */ ENET_VLAN_TAG_FLAGS, 0,
  1265. /* last opt argumnt */ { NULL }, /* --enet-vlan-tag */
  1266. /* arg list/cookie */ NULL,
  1267. /* must/cannot opts */ aEnet_Vlan_TagMustList, NULL,
  1268. /* option proc */ doOptEnet_Vlan_Tag,
  1269. /* desc, NAME, name */ ENET_VLAN_TAG_DESC, ENET_VLAN_TAG_NAME, ENET_VLAN_TAG_name,
  1270. /* disablement strs */ NULL, NULL },
  1271. { /* entry idx, value */ 29, VALUE_OPT_ENET_VLAN_CFI,
  1272. /* equiv idx, value */ 29, VALUE_OPT_ENET_VLAN_CFI,
  1273. /* equivalenced to */ NO_EQUIVALENT,
  1274. /* min, max, act ct */ 0, 1, 0,
  1275. /* opt state flags */ ENET_VLAN_CFI_FLAGS, 0,
  1276. /* last opt argumnt */ { NULL }, /* --enet-vlan-cfi */
  1277. /* arg list/cookie */ NULL,
  1278. /* must/cannot opts */ aEnet_Vlan_CfiMustList, NULL,
  1279. /* option proc */ doOptEnet_Vlan_Cfi,
  1280. /* desc, NAME, name */ ENET_VLAN_CFI_DESC, ENET_VLAN_CFI_NAME, ENET_VLAN_CFI_name,
  1281. /* disablement strs */ NULL, NULL },
  1282. { /* entry idx, value */ 30, VALUE_OPT_ENET_VLAN_PRI,
  1283. /* equiv idx, value */ 30, VALUE_OPT_ENET_VLAN_PRI,
  1284. /* equivalenced to */ NO_EQUIVALENT,
  1285. /* min, max, act ct */ 0, 1, 0,
  1286. /* opt state flags */ ENET_VLAN_PRI_FLAGS, 0,
  1287. /* last opt argumnt */ { NULL }, /* --enet-vlan-pri */
  1288. /* arg list/cookie */ NULL,
  1289. /* must/cannot opts */ aEnet_Vlan_PriMustList, NULL,
  1290. /* option proc */ doOptEnet_Vlan_Pri,
  1291. /* desc, NAME, name */ ENET_VLAN_PRI_DESC, ENET_VLAN_PRI_NAME, ENET_VLAN_PRI_name,
  1292. /* disablement strs */ NULL, NULL },
  1293. { /* entry idx, value */ 31, VALUE_OPT_HDLC_CONTROL,
  1294. /* equiv idx, value */ 31, VALUE_OPT_HDLC_CONTROL,
  1295. /* equivalenced to */ NO_EQUIVALENT,
  1296. /* min, max, act ct */ 0, 1, 0,
  1297. /* opt state flags */ HDLC_CONTROL_FLAGS, 0,
  1298. /* last opt argumnt */ { NULL }, /* --hdlc-control */
  1299. /* arg list/cookie */ NULL,
  1300. /* must/cannot opts */ NULL, NULL,
  1301. /* option proc */ optionNumericVal,
  1302. /* desc, NAME, name */ HDLC_CONTROL_DESC, HDLC_CONTROL_NAME, HDLC_CONTROL_name,
  1303. /* disablement strs */ NULL, NULL },
  1304. { /* entry idx, value */ 32, VALUE_OPT_HDLC_ADDRESS,
  1305. /* equiv idx, value */ 32, VALUE_OPT_HDLC_ADDRESS,
  1306. /* equivalenced to */ NO_EQUIVALENT,
  1307. /* min, max, act ct */ 0, 1, 0,
  1308. /* opt state flags */ HDLC_ADDRESS_FLAGS, 0,
  1309. /* last opt argumnt */ { NULL }, /* --hdlc-address */
  1310. /* arg list/cookie */ NULL,
  1311. /* must/cannot opts */ NULL, NULL,
  1312. /* option proc */ optionNumericVal,
  1313. /* desc, NAME, name */ HDLC_ADDRESS_DESC, HDLC_ADDRESS_NAME, HDLC_ADDRESS_name,
  1314. /* disablement strs */ NULL, NULL },
  1315. { /* entry idx, value */ 33, VALUE_OPT_USER_DLT,
  1316. /* equiv idx, value */ 33, VALUE_OPT_USER_DLT,
  1317. /* equivalenced to */ NO_EQUIVALENT,
  1318. /* min, max, act ct */ 0, 1, 0,
  1319. /* opt state flags */ USER_DLT_FLAGS, 0,
  1320. /* last opt argumnt */ { NULL }, /* --user-dlt */
  1321. /* arg list/cookie */ NULL,
  1322. /* must/cannot opts */ NULL, NULL,
  1323. /* option proc */ optionNumericVal,
  1324. /* desc, NAME, name */ USER_DLT_DESC, USER_DLT_NAME, USER_DLT_name,
  1325. /* disablement strs */ NULL, NULL },
  1326. { /* entry idx, value */ 34, VALUE_OPT_USER_DLINK,
  1327. /* equiv idx, value */ 34, VALUE_OPT_USER_DLINK,
  1328. /* equivalenced to */ NO_EQUIVALENT,
  1329. /* min, max, act ct */ 0, 2, 0,
  1330. /* opt state flags */ USER_DLINK_FLAGS, 0,
  1331. /* last opt argumnt */ { NULL }, /* --user-dlink */
  1332. /* arg list/cookie */ NULL,
  1333. /* must/cannot opts */ NULL, NULL,
  1334. /* option proc */ optionStackArg,
  1335. /* desc, NAME, name */ USER_DLINK_DESC, USER_DLINK_NAME, USER_DLINK_name,
  1336. /* disablement strs */ NULL, NULL },
  1337. { /* entry idx, value */ 35, VALUE_OPT_DBUG,
  1338. /* equiv idx, value */ 35, VALUE_OPT_DBUG,
  1339. /* equivalenced to */ NO_EQUIVALENT,
  1340. /* min, max, act ct */ 0, 1, 0,
  1341. /* opt state flags */ DBUG_FLAGS, 0,
  1342. /* last opt argumnt */ { DBUG_DFT_ARG },
  1343. /* arg list/cookie */ NULL,
  1344. /* must/cannot opts */ NULL, NULL,
  1345. /* option proc */ doOptDbug,
  1346. /* desc, NAME, name */ DBUG_DESC, DBUG_NAME, DBUG_name,
  1347. /* disablement strs */ NULL, NULL },
  1348. { /* entry idx, value */ 36, VALUE_OPT_INFILE,
  1349. /* equiv idx, value */ 36, VALUE_OPT_INFILE,
  1350. /* equivalenced to */ NO_EQUIVALENT,
  1351. /* min, max, act ct */ 1, 1, 0,
  1352. /* opt state flags */ INFILE_FLAGS, 0,
  1353. /* last opt argumnt */ { NULL }, /* --infile */
  1354. /* arg list/cookie */ NULL,
  1355. /* must/cannot opts */ NULL, NULL,
  1356. /* option proc */ NULL,
  1357. /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name,
  1358. /* disablement strs */ NULL, NULL },
  1359. { /* entry idx, value */ 37, VALUE_OPT_OUTFILE,
  1360. /* equiv idx, value */ 37, VALUE_OPT_OUTFILE,
  1361. /* equivalenced to */ NO_EQUIVALENT,
  1362. /* min, max, act ct */ 1, 1, 0,
  1363. /* opt state flags */ OUTFILE_FLAGS, 0,
  1364. /* last opt argumnt */ { NULL }, /* --outfile */
  1365. /* arg list/cookie */ NULL,
  1366. /* must/cannot opts */ NULL, NULL,
  1367. /* option proc */ NULL,
  1368. /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name,
  1369. /* disablement strs */ NULL, NULL },
  1370. { /* entry idx, value */ 38, VALUE_OPT_CACHEFILE,
  1371. /* equiv idx, value */ 38, VALUE_OPT_CACHEFILE,
  1372. /* equivalenced to */ NO_EQUIVALENT,
  1373. /* min, max, act ct */ 0, 1, 0,
  1374. /* opt state flags */ CACHEFILE_FLAGS, 0,
  1375. /* last opt argumnt */ { NULL }, /* --cachefile */
  1376. /* arg list/cookie */ NULL,
  1377. /* must/cannot opts */ NULL, NULL,
  1378. /* option proc */ doOptCachefile,
  1379. /* desc, NAME, name */ CACHEFILE_DESC, CACHEFILE_NAME, CACHEFILE_name,
  1380. /* disablement strs */ NULL, NULL },
  1381. { /* entry idx, value */ 39, VALUE_OPT_VERBOSE,
  1382. /* equiv idx, value */ 39, VALUE_OPT_VERBOSE,
  1383. /* equivalenced to */ NO_EQUIVALENT,
  1384. /* min, max, act ct */ 0, 1, 0,
  1385. /* opt state flags */ VERBOSE_FLAGS, 0,
  1386. /* last opt argumnt */ { NULL }, /* --verbose */
  1387. /* arg list/cookie */ NULL,
  1388. /* must/cannot opts */ NULL, NULL,
  1389. /* option proc */ NULL,
  1390. /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
  1391. /* disablement strs */ NULL, NULL },
  1392. { /* entry idx, value */ 40, VALUE_OPT_DECODE,
  1393. /* equiv idx, value */ 40, VALUE_OPT_DECODE,
  1394. /* equivalenced to */ NO_EQUIVALENT,
  1395. /* min, max, act ct */ 0, 1, 0,
  1396. /* opt state flags */ DECODE_FLAGS, 0,
  1397. /* last opt argumnt */ { NULL }, /* --decode */
  1398. /* arg list/cookie */ NULL,
  1399. /* must/cannot opts */ aDecodeMustList, NULL,
  1400. /* option proc */ NULL,
  1401. /* desc, NAME, name */ DECODE_DESC, DECODE_NAME, DECODE_name,
  1402. /* disablement strs */ NULL, NULL },
  1403. { /* entry idx, value */ 41, VALUE_OPT_FRAGROUTE,
  1404. /* equiv idx, value */ 41, VALUE_OPT_FRAGROUTE,
  1405. /* equivalenced to */ NO_EQUIVALENT,
  1406. /* min, max, act ct */ 0, 1, 0,
  1407. /* opt state flags */ FRAGROUTE_FLAGS, 0,
  1408. /* last opt argumnt */ { NULL }, /* --fragroute */
  1409. /* arg list/cookie */ NULL,
  1410. /* must/cannot opts */ NULL, NULL,
  1411. /* option proc */ NULL,
  1412. /* desc, NAME, name */ FRAGROUTE_DESC, FRAGROUTE_NAME, FRAGROUTE_name,
  1413. /* disablement strs */ NULL, NULL },
  1414. { /* entry idx, value */ 42, VALUE_OPT_FRAGDIR,
  1415. /* equiv idx, value */ 42, VALUE_OPT_FRAGDIR,
  1416. /* equivalenced to */ NO_EQUIVALENT,
  1417. /* min, max, act ct */ 0, 1, 0,
  1418. /* opt state flags */ FRAGDIR_FLAGS, 0,
  1419. /* last opt argumnt */ { NULL }, /* --fragdir */
  1420. /* arg list/cookie */ NULL,
  1421. /* must/cannot opts */ aFragdirMustList, NULL,
  1422. /* option proc */ NULL,
  1423. /* desc, NAME, name */ FRAGDIR_DESC, FRAGDIR_NAME, FRAGDIR_name,
  1424. /* disablement strs */ NULL, NULL },
  1425. { /* entry idx, value */ 43, VALUE_OPT_SKIP_SOFT_ERRORS,
  1426. /* equiv idx, value */ 43, VALUE_OPT_SKIP_SOFT_ERRORS,
  1427. /* equivalenced to */ NO_EQUIVALENT,
  1428. /* min, max, act ct */ 0, 1, 0,
  1429. /* opt state flags */ SKIP_SOFT_ERRORS_FLAGS, 0,
  1430. /* last opt argumnt */ { NULL }, /* --skip-soft-errors */
  1431. /* arg list/cookie */ NULL,
  1432. /* must/cannot opts */ NULL, NULL,
  1433. /* option proc */ NULL,
  1434. /* desc, NAME, name */ SKIP_SOFT_ERRORS_DESC, SKIP_SOFT_ERRORS_NAME, SKIP_SOFT_ERRORS_name,
  1435. /* disablement strs */ NULL, NULL },
  1436. { /* entry idx, value */ 44, VALUE_OPT_VERSION,
  1437. /* equiv idx, value */ 44, VALUE_OPT_VERSION,
  1438. /* equivalenced to */ NO_EQUIVALENT,
  1439. /* min, max, act ct */ 0, 1, 0,
  1440. /* opt state flags */ VERSION_FLAGS, 0,
  1441. /* last opt argumnt */ { NULL }, /* --version */
  1442. /* arg list/cookie */ NULL,
  1443. /* must/cannot opts */ NULL, NULL,
  1444. /* option proc */ doOptVersion,
  1445. /* desc, NAME, name */ VERSION_DESC, VERSION_NAME, VERSION_name,
  1446. /* disablement strs */ NULL, NULL },
  1447. { /* entry idx, value */ 45, VALUE_OPT_LESS_HELP,
  1448. /* equiv idx, value */ 45, VALUE_OPT_LESS_HELP,
  1449. /* equivalenced to */ NO_EQUIVALENT,
  1450. /* min, max, act ct */ 0, 1, 0,
  1451. /* opt state flags */ LESS_HELP_FLAGS, 0,
  1452. /* last opt argumnt */ { NULL }, /* --less-help */
  1453. /* arg list/cookie */ NULL,
  1454. /* must/cannot opts */ NULL, NULL,
  1455. /* option proc */ doOptLess_Help,
  1456. /* desc, NAME, name */ LESS_HELP_DESC, LESS_HELP_NAME, LESS_HELP_name,
  1457. /* disablement strs */ NULL, NULL },
  1458. { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
  1459. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
  1460. /* equivalenced to */ NO_EQUIVALENT,
  1461. /* min, max, act ct */ 0, 1, 0,
  1462. /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
  1463. /* last opt argumnt */ { NULL },
  1464. /* arg list/cookie */ NULL,
  1465. /* must/cannot opts */ NULL, NULL,
  1466. /* option proc */ doUsageOpt,
  1467. /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
  1468. /* disablement strs */ NULL, NULL },
  1469. { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
  1470. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
  1471. /* equivalenced to */ NO_EQUIVALENT,
  1472. /* min, max, act ct */ 0, 1, 0,
  1473. /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
  1474. /* last opt argumnt */ { NULL },
  1475. /* arg list/cookie */ NULL,
  1476. /* must/cannot opts */ NULL, NULL,
  1477. /* option proc */ optionPagedUsage,
  1478. /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
  1479. /* disablement strs */ NULL, NULL },
  1480. { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
  1481. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
  1482. /* equivalenced to */ NO_EQUIVALENT,
  1483. /* min, max, act ct */ 0, 1, 0,
  1484. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
  1485. | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
  1486. /* last opt argumnt */ { NULL },
  1487. /* arg list/cookie */ NULL,
  1488. /* must/cannot opts */ NULL, NULL,
  1489. /* option proc */ NULL,
  1490. /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
  1491. /* disablement strs */ NULL, NULL },
  1492. { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
  1493. /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
  1494. /* equivalenced to */ NO_EQUIVALENT,
  1495. /* min, max, act ct */ 0, NOLIMIT, 0,
  1496. /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
  1497. | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
  1498. /* last opt argumnt */ { NULL },
  1499. /* arg list/cookie */ NULL,
  1500. /* must/cannot opts */ NULL, NULL,
  1501. /* option proc */ optionLoadOpt,
  1502. /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
  1503. /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
  1504. };
  1505. tOptDesc * const tcpedit_tcpedit_optDesc_p = optDesc + 0;
  1506. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1507. /** Reference to the upper cased version of tcprewrite. */
  1508. #define zPROGNAME (tcprewrite_opt_strs+3741)
  1509. /** Reference to the title line for tcprewrite usage. */
  1510. #define zUsageTitle (tcprewrite_opt_strs+3752)
  1511. /** tcprewrite configuration file name. */
  1512. #define zRcName (tcprewrite_opt_strs+3876)
  1513. /** Directories to search for tcprewrite config files. */
  1514. static char const * const apzHomeList[2] = {
  1515. tcprewrite_opt_strs+3872,
  1516. NULL };
  1517. /** The tcprewrite program bug email address. */
  1518. #define zBugsAddr (tcprewrite_opt_strs+3890)
  1519. /** Clarification/explanation of what tcprewrite does. */
  1520. #define zExplain (NULL)
  1521. /** Extra detail explaining what tcprewrite does. */
  1522. #define zDetail (tcprewrite_opt_strs+3928)
  1523. /** The full version string for tcprewrite. */
  1524. #define zFullVersion (NULL)
  1525. /* extracted from optcode.tlib near line 364 */
  1526. #if defined(ENABLE_NLS)
  1527. # define OPTPROC_BASE OPTPROC_TRANSLATE
  1528. static tOptionXlateProc translate_option_strings;
  1529. #else
  1530. # define OPTPROC_BASE OPTPROC_NONE
  1531. # define translate_option_strings NULL
  1532. #endif /* ENABLE_NLS */
  1533. #define tcprewrite_full_usage (NULL)
  1534. #define tcprewrite_short_usage (NULL)
  1535. #endif /* not defined __doxygen__ */
  1536. /*
  1537. * Create the static procedure(s) declared above.
  1538. */
  1539. /**
  1540. * The callout function that invokes the optionUsage function.
  1541. *
  1542. * @param[in] opts the AutoOpts option description structure
  1543. * @param[in] od the descriptor for the "help" (usage) option.
  1544. * @noreturn
  1545. */
  1546. static void
  1547. doUsageOpt(tOptions * opts, tOptDesc * od)
  1548. {
  1549. int ex_code;
  1550. ex_code = TCPREWRITE_EXIT_SUCCESS;
  1551. optionUsage(&tcprewriteOptions, ex_code);
  1552. /* NOTREACHED */
  1553. exit(TCPREWRITE_EXIT_FAILURE);
  1554. (void)opts;
  1555. (void)od;
  1556. }
  1557. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1558. /**
  1559. * Code to handle the tcp-sequence option.
  1560. * Change all TCP sequence numbers, and related sequence-acknowledgement numbers.
  1561. * They will be shifted by a random amount based on the provided seed.
  1562. * @param[in] pOptions the tcprewrite options data structure
  1563. * @param[in,out] pOptDesc the option descriptor for this option.
  1564. */
  1565. static void
  1566. doOptTcp_Sequence(tOptions* pOptions, tOptDesc* pOptDesc)
  1567. {
  1568. static struct {long rmin, rmax;} const rng[1] = {
  1569. { 1, LONG_MAX } };
  1570. int ix;
  1571. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1572. goto emit_ranges;
  1573. optionNumericVal(pOptions, pOptDesc);
  1574. for (ix = 0; ix < 1; ix++) {
  1575. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1576. continue; /* ranges need not be ordered. */
  1577. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1578. return;
  1579. if (rng[ix].rmax == LONG_MIN)
  1580. continue;
  1581. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1582. return;
  1583. }
  1584. option_usage_fp = stderr;
  1585. emit_ranges:
  1586. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1587. }
  1588. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1589. /**
  1590. * Code to handle the mtu option.
  1591. * Override the default 1500 byte MTU size for determining the maximum padding length
  1592. * (--fixlen=pad) or when truncating (--mtu-trunc).
  1593. * @param[in] pOptions the tcprewrite options data structure
  1594. * @param[in,out] pOptDesc the option descriptor for this option.
  1595. */
  1596. static void
  1597. doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc)
  1598. {
  1599. static struct {long rmin, rmax;} const rng[1] = {
  1600. { 1, MAXPACKET } };
  1601. int ix;
  1602. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1603. goto emit_ranges;
  1604. optionNumericVal(pOptions, pOptDesc);
  1605. for (ix = 0; ix < 1; ix++) {
  1606. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1607. continue; /* ranges need not be ordered. */
  1608. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1609. return;
  1610. if (rng[ix].rmax == LONG_MIN)
  1611. continue;
  1612. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1613. return;
  1614. }
  1615. option_usage_fp = stderr;
  1616. emit_ranges:
  1617. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1618. }
  1619. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1620. /**
  1621. * Code to handle the tos option.
  1622. * Allows you to override the TOS (also known as DiffServ/ECN) value in IPv4.
  1623. * @param[in] pOptions the tcprewrite options data structure
  1624. * @param[in,out] pOptDesc the option descriptor for this option.
  1625. */
  1626. static void
  1627. doOptTos(tOptions* pOptions, tOptDesc* pOptDesc)
  1628. {
  1629. static struct {long rmin, rmax;} const rng[1] = {
  1630. { 0, 255 } };
  1631. int ix;
  1632. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1633. goto emit_ranges;
  1634. optionNumericVal(pOptions, pOptDesc);
  1635. for (ix = 0; ix < 1; ix++) {
  1636. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1637. continue; /* ranges need not be ordered. */
  1638. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1639. return;
  1640. if (rng[ix].rmax == LONG_MIN)
  1641. continue;
  1642. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1643. return;
  1644. }
  1645. option_usage_fp = stderr;
  1646. emit_ranges:
  1647. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1648. }
  1649. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1650. /**
  1651. * Code to handle the tclass option.
  1652. * Allows you to override the IPv6 Traffic Class field.
  1653. * @param[in] pOptions the tcprewrite options data structure
  1654. * @param[in,out] pOptDesc the option descriptor for this option.
  1655. */
  1656. static void
  1657. doOptTclass(tOptions* pOptions, tOptDesc* pOptDesc)
  1658. {
  1659. static struct {long rmin, rmax;} const rng[1] = {
  1660. { 0, 255 } };
  1661. int ix;
  1662. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1663. goto emit_ranges;
  1664. optionNumericVal(pOptions, pOptDesc);
  1665. for (ix = 0; ix < 1; ix++) {
  1666. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1667. continue; /* ranges need not be ordered. */
  1668. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1669. return;
  1670. if (rng[ix].rmax == LONG_MIN)
  1671. continue;
  1672. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1673. return;
  1674. }
  1675. option_usage_fp = stderr;
  1676. emit_ranges:
  1677. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1678. }
  1679. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1680. /**
  1681. * Code to handle the flowlabel option.
  1682. * Allows you to override the 20bit IPv6 Flow Label field. Has no effect on IPv4
  1683. * packets.
  1684. * @param[in] pOptions the tcprewrite options data structure
  1685. * @param[in,out] pOptDesc the option descriptor for this option.
  1686. */
  1687. static void
  1688. doOptFlowlabel(tOptions* pOptions, tOptDesc* pOptDesc)
  1689. {
  1690. static struct {long rmin, rmax;} const rng[1] = {
  1691. { 0, 1048575 } };
  1692. int ix;
  1693. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1694. goto emit_ranges;
  1695. optionNumericVal(pOptions, pOptDesc);
  1696. for (ix = 0; ix < 1; ix++) {
  1697. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1698. continue; /* ranges need not be ordered. */
  1699. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1700. return;
  1701. if (rng[ix].rmax == LONG_MIN)
  1702. continue;
  1703. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1704. return;
  1705. }
  1706. option_usage_fp = stderr;
  1707. emit_ranges:
  1708. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1709. }
  1710. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1711. /**
  1712. * Code to handle the fuzz-seed option.
  1713. * This fuzzing was designed as to test layer 7 protocols such as voip protocols.
  1714. * It modifies randomly 1 out of X packets (where X = @var{--fuzz-factor}) in order
  1715. * for stateful protocols to cover more of their code. The random fuzzing actions
  1716. * focus on data start and end because it often is the part of the data application
  1717. * protocols base their decisions on.
  1718. *
  1719. * Possible fuzzing actions list:
  1720. * * drop packet
  1721. * * reduce packet size
  1722. * * edit packet Bytes:
  1723. * * Not all Bytes have the same probability of appearance in real life.
  1724. * Replace with 0x00, 0xFF, or a random byte with equal likelihood.
  1725. * * Not all Bytes have the same significance in a packet.
  1726. * Replace the start, the end, or the middle of the packet with equal likelihood.
  1727. * * do nothing (7 out of 8 packets)
  1728. *
  1729. * @param[in] pOptions the tcprewrite options data structure
  1730. * @param[in,out] pOptDesc the option descriptor for this option.
  1731. */
  1732. static void
  1733. doOptFuzz_Seed(tOptions* pOptions, tOptDesc* pOptDesc)
  1734. {
  1735. static struct {long rmin, rmax;} const rng[1] = {
  1736. { 0, LONG_MAX } };
  1737. int ix;
  1738. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1739. goto emit_ranges;
  1740. optionNumericVal(pOptions, pOptDesc);
  1741. for (ix = 0; ix < 1; ix++) {
  1742. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1743. continue; /* ranges need not be ordered. */
  1744. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1745. return;
  1746. if (rng[ix].rmax == LONG_MIN)
  1747. continue;
  1748. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1749. return;
  1750. }
  1751. option_usage_fp = stderr;
  1752. emit_ranges:
  1753. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1754. }
  1755. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1756. /**
  1757. * Code to handle the fuzz-factor option.
  1758. * Sets the ratio of for @var{--fuzz-seed} option. By default this value is 8,
  1759. * which means 1 in 8 packets are modified by fuzzing. Note that this ratio is
  1760. * based on the random number generated by the supplied fuzz seed. Therefore by
  1761. * default you cannot expect that exactly every eighth packet will be modified.
  1762. * @param[in] pOptions the tcprewrite options data structure
  1763. * @param[in,out] pOptDesc the option descriptor for this option.
  1764. */
  1765. static void
  1766. doOptFuzz_Factor(tOptions* pOptions, tOptDesc* pOptDesc)
  1767. {
  1768. static struct {long rmin, rmax;} const rng[1] = {
  1769. { 1, LONG_MAX } };
  1770. int ix;
  1771. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1772. goto emit_ranges;
  1773. optionNumericVal(pOptions, pOptDesc);
  1774. for (ix = 0; ix < 1; ix++) {
  1775. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1776. continue; /* ranges need not be ordered. */
  1777. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1778. return;
  1779. if (rng[ix].rmax == LONG_MIN)
  1780. continue;
  1781. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1782. return;
  1783. }
  1784. option_usage_fp = stderr;
  1785. emit_ranges:
  1786. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1787. }
  1788. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1789. /**
  1790. * Code to handle the enet-mac-seed-keep-bytes option.
  1791. * Keep some bytes untouched when usinging @var{--enet-mac-seed} option.
  1792. * @param[in] pOptions the tcprewrite options data structure
  1793. * @param[in,out] pOptDesc the option descriptor for this option.
  1794. */
  1795. static void
  1796. doOptEnet_Mac_Seed_Keep_Bytes(tOptions* pOptions, tOptDesc* pOptDesc)
  1797. {
  1798. static struct {long rmin, rmax;} const rng[1] = {
  1799. { 1, 6 } };
  1800. int ix;
  1801. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1802. goto emit_ranges;
  1803. optionNumericVal(pOptions, pOptDesc);
  1804. for (ix = 0; ix < 1; ix++) {
  1805. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1806. continue; /* ranges need not be ordered. */
  1807. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1808. return;
  1809. if (rng[ix].rmax == LONG_MIN)
  1810. continue;
  1811. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1812. return;
  1813. }
  1814. option_usage_fp = stderr;
  1815. emit_ranges:
  1816. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1817. }
  1818. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1819. /**
  1820. * Code to handle the enet-vlan-tag option.
  1821. *
  1822. * @param[in] pOptions the tcprewrite options data structure
  1823. * @param[in,out] pOptDesc the option descriptor for this option.
  1824. */
  1825. static void
  1826. doOptEnet_Vlan_Tag(tOptions* pOptions, tOptDesc* pOptDesc)
  1827. {
  1828. static struct {long rmin, rmax;} const rng[1] = {
  1829. { 0, 4095 } };
  1830. int ix;
  1831. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1832. goto emit_ranges;
  1833. optionNumericVal(pOptions, pOptDesc);
  1834. for (ix = 0; ix < 1; ix++) {
  1835. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1836. continue; /* ranges need not be ordered. */
  1837. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1838. return;
  1839. if (rng[ix].rmax == LONG_MIN)
  1840. continue;
  1841. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1842. return;
  1843. }
  1844. option_usage_fp = stderr;
  1845. emit_ranges:
  1846. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1847. }
  1848. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1849. /**
  1850. * Code to handle the enet-vlan-cfi option.
  1851. *
  1852. * @param[in] pOptions the tcprewrite options data structure
  1853. * @param[in,out] pOptDesc the option descriptor for this option.
  1854. */
  1855. static void
  1856. doOptEnet_Vlan_Cfi(tOptions* pOptions, tOptDesc* pOptDesc)
  1857. {
  1858. static struct {long rmin, rmax;} const rng[1] = {
  1859. { 0, 1 } };
  1860. int ix;
  1861. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1862. goto emit_ranges;
  1863. optionNumericVal(pOptions, pOptDesc);
  1864. for (ix = 0; ix < 1; ix++) {
  1865. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1866. continue; /* ranges need not be ordered. */
  1867. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1868. return;
  1869. if (rng[ix].rmax == LONG_MIN)
  1870. continue;
  1871. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1872. return;
  1873. }
  1874. option_usage_fp = stderr;
  1875. emit_ranges:
  1876. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1877. }
  1878. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1879. /**
  1880. * Code to handle the enet-vlan-pri option.
  1881. *
  1882. * @param[in] pOptions the tcprewrite options data structure
  1883. * @param[in,out] pOptDesc the option descriptor for this option.
  1884. */
  1885. static void
  1886. doOptEnet_Vlan_Pri(tOptions* pOptions, tOptDesc* pOptDesc)
  1887. {
  1888. static struct {long rmin, rmax;} const rng[1] = {
  1889. { 0, 7 } };
  1890. int ix;
  1891. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1892. goto emit_ranges;
  1893. optionNumericVal(pOptions, pOptDesc);
  1894. for (ix = 0; ix < 1; ix++) {
  1895. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1896. continue; /* ranges need not be ordered. */
  1897. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1898. return;
  1899. if (rng[ix].rmax == LONG_MIN)
  1900. continue;
  1901. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1902. return;
  1903. }
  1904. option_usage_fp = stderr;
  1905. emit_ranges:
  1906. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1907. }
  1908. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1909. /**
  1910. * Code to handle the dbug option, when DEBUG is #define-d.
  1911. * If configured with --enable-debug, then you can specify a verbosity
  1912. * level for debugging output. Higher numbers increase verbosity.
  1913. * @param[in] pOptions the tcprewrite options data structure
  1914. * @param[in,out] pOptDesc the option descriptor for this option.
  1915. */
  1916. #ifdef DEBUG
  1917. static void
  1918. doOptDbug(tOptions* pOptions, tOptDesc* pOptDesc)
  1919. {
  1920. static struct {long rmin, rmax;} const rng[1] = {
  1921. { 0, 5 } };
  1922. int ix;
  1923. if (pOptions <= OPTPROC_EMIT_LIMIT)
  1924. goto emit_ranges;
  1925. optionNumericVal(pOptions, pOptDesc);
  1926. for (ix = 0; ix < 1; ix++) {
  1927. if (pOptDesc->optArg.argInt < rng[ix].rmin)
  1928. continue; /* ranges need not be ordered. */
  1929. if (pOptDesc->optArg.argInt == rng[ix].rmin)
  1930. return;
  1931. if (rng[ix].rmax == LONG_MIN)
  1932. continue;
  1933. if (pOptDesc->optArg.argInt <= rng[ix].rmax)
  1934. return;
  1935. }
  1936. option_usage_fp = stderr;
  1937. emit_ranges:
  1938. optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
  1939. }
  1940. #endif /* defined DEBUG */
  1941. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1942. /**
  1943. * Code to handle the cachefile option.
  1944. * Use tcpprep cache file to split traffic based upon client/server relationships.
  1945. * @param[in] pOptions the tcprewrite options data structure
  1946. * @param[in,out] pOptDesc the option descriptor for this option.
  1947. */
  1948. static void
  1949. doOptCachefile(tOptions* pOptions, tOptDesc* pOptDesc)
  1950. {
  1951. /*
  1952. * Be sure the flag-code[0] handles special values for the options pointer
  1953. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  1954. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  1955. * reset its state.
  1956. */
  1957. /* extracted from tcprewrite_opts.def, line 155 */
  1958. options.cache_packets =
  1959. read_cache(&options.cachedata, OPT_ARG(CACHEFILE), &options.comment);
  1960. (void)pOptDesc;
  1961. (void)pOptions;
  1962. }
  1963. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1964. /**
  1965. * Code to handle the version option.
  1966. *
  1967. * @param[in] pOptions the tcprewrite options data structure
  1968. * @param[in,out] pOptDesc the option descriptor for this option.
  1969. */
  1970. static void
  1971. doOptVersion(tOptions* pOptions, tOptDesc* pOptDesc)
  1972. {
  1973. /*
  1974. * Be sure the flag-code[0] handles special values for the options pointer
  1975. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  1976. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  1977. * reset its state.
  1978. */
  1979. /* extracted from tcprewrite_opts.def, line 246 */
  1980. fprintf(stderr, "tcprewrite version: %s (build %s)", VERSION, git_version());
  1981. #ifdef DEBUG
  1982. fprintf(stderr, " (debug)");
  1983. #endif
  1984. fprintf(stderr, "\n");
  1985. fprintf(stderr, "Copyright 2013-2018 by Fred Klassen <tcpreplay at appneta dot com> - AppNeta\n");
  1986. fprintf(stderr, "Copyright 2000-2012 by Aaron Turner <aturner at synfin dot net>\n");
  1987. fprintf(stderr, "The entire Tcpreplay Suite is licensed under the GPLv3\n");
  1988. fprintf(stderr, "Cache file supported: %s\n", CACHEVERSION);
  1989. #ifdef HAVE_LIBDNET
  1990. fprintf(stderr, "Compiled against libdnet: %s\n", LIBDNET_VERSION);
  1991. #else
  1992. fprintf(stderr, "Not compiled with libdnet.\n");
  1993. #endif
  1994. #ifdef HAVE_WINPCAP
  1995. fprintf(stderr, "Compiled against winpcap: %s\n", get_pcap_version());
  1996. #elif defined HAVE_PF_RING_PCAP
  1997. fprintf(stderr, "Compiled against PF_RING libpcap: %s\n", get_pcap_version());
  1998. #else
  1999. fprintf(stderr, "Compiled against libpcap: %s\n", get_pcap_version());
  2000. #endif
  2001. #ifdef ENABLE_64BITS
  2002. fprintf(stderr, "64 bit packet counters: enabled\n");
  2003. #else
  2004. fprintf(stderr, "64 bit packet counters: disabled\n");
  2005. #endif
  2006. #ifdef ENABLE_VERBOSE
  2007. fprintf(stderr, "Verbose printing via tcpdump: enabled\n");
  2008. #else
  2009. fprintf(stderr, "Verbose printing via tcpdump: disabled\n");
  2010. #endif
  2011. #ifdef ENABLE_FRAGROUTE
  2012. fprintf(stderr, "Fragroute engine: enabled\n");
  2013. #else
  2014. fprintf(stderr, "Fragroute engine: disabled\n");
  2015. #endif
  2016. exit(0);
  2017. (void)pOptDesc;
  2018. (void)pOptions;
  2019. }
  2020. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  2021. /**
  2022. * Code to handle the less-help option.
  2023. *
  2024. * @param[in] pOptions the tcprewrite options data structure
  2025. * @param[in,out] pOptDesc the option descriptor for this option.
  2026. */
  2027. static void
  2028. doOptLess_Help(tOptions* pOptions, tOptDesc* pOptDesc)
  2029. {
  2030. /*
  2031. * Be sure the flag-code[0] handles special values for the options pointer
  2032. * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
  2033. * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
  2034. * reset its state.
  2035. */
  2036. /* extracted from tcprewrite_opts.def, line 295 */
  2037. USAGE(EXIT_FAILURE);
  2038. (void)pOptDesc;
  2039. (void)pOptions;
  2040. }
  2041. /* extracted from optmain.tlib near line 1250 */
  2042. /**
  2043. * The directory containing the data associated with tcprewrite.
  2044. */
  2045. #ifndef PKGDATADIR
  2046. # define PKGDATADIR ""
  2047. #endif
  2048. /**
  2049. * Information about the person or institution that packaged tcprewrite
  2050. * for the current distribution.
  2051. */
  2052. #ifndef WITH_PACKAGER
  2053. # define tcprewrite_packager_info NULL
  2054. #else
  2055. /** Packager information for tcprewrite. */
  2056. static char const tcprewrite_packager_info[] =
  2057. "Packaged by " WITH_PACKAGER
  2058. # ifdef WITH_PACKAGER_VERSION
  2059. " ("WITH_PACKAGER_VERSION")"
  2060. # endif
  2061. # ifdef WITH_PACKAGER_BUG_REPORTS
  2062. "\nReport tcprewrite bugs to " WITH_PACKAGER_BUG_REPORTS
  2063. # endif
  2064. "\n";
  2065. #endif
  2066. #ifndef __doxygen__
  2067. #endif /* __doxygen__ */
  2068. /**
  2069. * The option definitions for tcprewrite. The one structure that
  2070. * binds them all.
  2071. */
  2072. tOptions tcprewriteOptions = {
  2073. OPTIONS_STRUCT_VERSION,
  2074. 0, NULL, /* original argc + argv */
  2075. ( OPTPROC_BASE
  2076. + OPTPROC_ERRSTOP
  2077. + OPTPROC_SHORTOPT
  2078. + OPTPROC_LONGOPT
  2079. + OPTPROC_NO_REQ_OPT
  2080. + OPTPROC_NO_ARGS
  2081. + OPTPROC_GNUUSAGE ),
  2082. 0, NULL, /* current option index, current option */
  2083. NULL, NULL, zPROGNAME,
  2084. zRcName, zCopyright, zLicenseDescrip,
  2085. zFullVersion, apzHomeList, zUsageTitle,
  2086. zExplain, zDetail, optDesc,
  2087. zBugsAddr, /* address to send bugs to */
  2088. NULL, NULL, /* extensions/saved state */
  2089. optionUsage, /* usage procedure */
  2090. translate_option_strings, /* translation procedure */
  2091. /*
  2092. * Indexes to special options
  2093. */
  2094. { INDEX_OPT_MORE_HELP, /* more-help option index */
  2095. INDEX_OPT_SAVE_OPTS, /* save option index */
  2096. NO_EQUIVALENT, /* '-#' option index */
  2097. 10 /* index of default opt */
  2098. },
  2099. 50 /* full option count */, 46 /* user option count */,
  2100. tcprewrite_full_usage, tcprewrite_short_usage,
  2101. NULL, NULL,
  2102. PKGDATADIR, tcprewrite_packager_info
  2103. };
  2104. #if ENABLE_NLS
  2105. /**
  2106. * This code is designed to translate translatable option text for the
  2107. * tcprewrite program. These translations happen upon entry
  2108. * to optionProcess().
  2109. */
  2110. #include <stdio.h>
  2111. #include <stdlib.h>
  2112. #include <string.h>
  2113. #include <unistd.h>
  2114. #ifdef HAVE_DCGETTEXT
  2115. # include <gettext.h>
  2116. #endif
  2117. #include <autoopts/usage-txt.h>
  2118. static char * AO_gettext(char const * pz);
  2119. static void coerce_it(void ** s);
  2120. /**
  2121. * AutoGen specific wrapper function for gettext. It relies on the macro _()
  2122. * to convert from English to the target language, then strdup-duplicates the
  2123. * result string. It tries the "libopts" domain first, then whatever has been
  2124. * set via the \a textdomain(3) call.
  2125. *
  2126. * @param[in] pz the input text used as a lookup key.
  2127. * @returns the translated text (if there is one),
  2128. * or the original text (if not).
  2129. */
  2130. static char *
  2131. AO_gettext(char const * pz)
  2132. {
  2133. char * res;
  2134. if (pz == NULL)
  2135. return NULL;
  2136. #ifdef HAVE_DCGETTEXT
  2137. /*
  2138. * While processing the option_xlateable_txt data, try to use the
  2139. * "libopts" domain. Once we switch to the option descriptor data,
  2140. * do *not* use that domain.
  2141. */
  2142. if (option_xlateable_txt.field_ct != 0) {
  2143. res = dgettext("libopts", pz);
  2144. if (res == pz)
  2145. res = (char *)VOIDP(_(pz));
  2146. } else
  2147. res = (char *)VOIDP(_(pz));
  2148. #else
  2149. res = (char *)VOIDP(_(pz));
  2150. #endif
  2151. if (res == pz)
  2152. return res;
  2153. res = strdup(res);
  2154. if (res == NULL) {
  2155. fputs(_("No memory for duping translated strings\n"), stderr);
  2156. exit(TCPREWRITE_EXIT_FAILURE);
  2157. }
  2158. return res;
  2159. }
  2160. /**
  2161. * All the pointers we use are marked "* const", but they are stored in
  2162. * writable memory. Coerce the mutability and set the pointer.
  2163. */
  2164. static void coerce_it(void ** s) { *s = AO_gettext(*s);
  2165. }
  2166. /**
  2167. * Translate all the translatable strings in the tcprewriteOptions
  2168. * structure defined above. This is done only once.
  2169. */
  2170. static void
  2171. translate_option_strings(void)
  2172. {
  2173. tOptions * const opts = &tcprewriteOptions;
  2174. /*
  2175. * Guard against re-translation. It won't work. The strings will have
  2176. * been changed by the first pass through this code. One shot only.
  2177. */
  2178. if (option_xlateable_txt.field_ct != 0) {
  2179. /*
  2180. * Do the translations. The first pointer follows the field count
  2181. * field. The field count field is the size of a pointer.
  2182. */
  2183. char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
  2184. int ix = option_xlateable_txt.field_ct;
  2185. do {
  2186. ppz++; /* skip over field_ct */
  2187. *ppz = AO_gettext(*ppz);
  2188. } while (--ix > 0);
  2189. /* prevent re-translation and disable "libopts" domain lookup */
  2190. option_xlateable_txt.field_ct = 0;
  2191. coerce_it(VOIDP(&(opts->pzCopyright)));
  2192. coerce_it(VOIDP(&(opts->pzCopyNotice)));
  2193. coerce_it(VOIDP(&(opts->pzFullVersion)));
  2194. coerce_it(VOIDP(&(opts->pzUsageTitle)));
  2195. coerce_it(VOIDP(&(opts->pzExplain)));
  2196. coerce_it(VOIDP(&(opts->pzDetail)));
  2197. {
  2198. tOptDesc * od = opts->pOptDesc;
  2199. for (ix = opts->optCt; ix > 0; ix--, od++)
  2200. coerce_it(VOIDP(&(od->pzText)));
  2201. }
  2202. }
  2203. }
  2204. #endif /* ENABLE_NLS */
  2205. #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
  2206. /** I18N function strictly for xgettext. Do not compile. */
  2207. static void bogus_function(void) {
  2208. /* TRANSLATORS:
  2209. The following dummy function was crated solely so that xgettext can
  2210. extract the correct strings. These strings are actually referenced
  2211. by a field name in the tcprewriteOptions structure noted in the
  2212. comments below. The literal text is defined in tcprewrite_opt_strs.
  2213. NOTE: the strings below are segmented with respect to the source string
  2214. tcprewrite_opt_strs. The strings above are handed off for translation
  2215. at run time a paragraph at a time. Consequently, they are presented here
  2216. for translation a paragraph at a time.
  2217. ALSO: often the description for an option will reference another option
  2218. by name. These are set off with apostrophe quotes (I hope). Do not
  2219. translate option names.
  2220. */
  2221. /* referenced via tcprewriteOptions.pzCopyright */
  2222. puts(_("tcprewrite (tcprewrite)\n\
  2223. Copyright (C) 2000-2018 Aaron Turner and Fred Klassen, all rights reserved.\n\
  2224. This is free software. It is licensed for use, modification and\n\
  2225. redistribution under the terms of the GNU General Public License,\n\
  2226. version 3 or later <http://gnu.org/licenses/gpl.html>\n"));
  2227. /* referenced via tcprewriteOptions.pzCopyNotice */
  2228. puts(_("tcprewrite is free software: you can redistribute it and/or modify it under\n\
  2229. the terms of the GNU General Public License as published by the Free\n\
  2230. Software Foundation, either version 3 of the License, or (at your option)\n\
  2231. any later version.\n\n"));
  2232. puts(_("tcprewrite is distributed in the hope that it will be useful, but WITHOUT\n\
  2233. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
  2234. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n\
  2235. more details.\n\n"));
  2236. puts(_("You should have received a copy of the GNU General Public License along\n\
  2237. with this program. If not, see <http://www.gnu.org/licenses/>.\n"));
  2238. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2239. puts(_(":"));
  2240. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2241. puts(_("Rewrite TCP/UDP ports"));
  2242. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2243. puts(_("Randomize src/dst IPv4/v6 addresses w/ given seed"));
  2244. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2245. puts(_("Rewrite IPv4/v6 addresses using pseudo-NAT"));
  2246. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2247. puts(_("Rewrite source IPv4/v6 addresses using pseudo-NAT"));
  2248. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2249. puts(_("Rewrite destination IPv4/v6 addresses using pseudo-NAT"));
  2250. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2251. puts(_("Rewrite IP addresses to be between two endpoints"));
  2252. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2253. puts(_("Change TCP Sequence (and ACK) numbers /w given seed"));
  2254. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2255. puts(_("Skip rewriting broadcast/multicast IPv4/v6 addresses"));
  2256. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2257. puts(_("Force recalculation of IPv4/TCP/UDP header checksums"));
  2258. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2259. puts(_("Override default MTU length (1500 bytes)"));
  2260. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2261. puts(_("Truncate packets larger then specified MTU"));
  2262. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2263. puts(_("Remove Ethernet checksums (FCS) from end of frames"));
  2264. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2265. puts(_("Modify the IPv4/v6 TTL/Hop Limit"));
  2266. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2267. puts(_("Set the IPv4 TOS/DiffServ/ECN byte"));
  2268. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2269. puts(_("Set the IPv6 Traffic Class byte"));
  2270. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2271. puts(_("Set the IPv6 Flow Label"));
  2272. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2273. puts(_("Pad or truncate packet data to match header length"));
  2274. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2275. puts(_("Fuzz 1 in X packets. Edit bytes, length, or emulate packet drop"));
  2276. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2277. puts(_("Set the Fuzz 1 in X packet ratio (default 1 in 8 packets)"));
  2278. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2279. puts(_("Skip rewriting broadcast/multicast Layer 2 addresses"));
  2280. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2281. puts(_("Override output DLT encapsulation"));
  2282. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2283. puts(_("Override destination ethernet MAC addresses"));
  2284. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2285. puts(_("Override source ethernet MAC addresses"));
  2286. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2287. puts(_("Substitute MAC addresses"));
  2288. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2289. puts(_("Randomize MAC addresses"));
  2290. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2291. puts(_("Randomize MAC addresses"));
  2292. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2293. puts(_("Specify ethernet 802.1q VLAN tag mode"));
  2294. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2295. puts(_("Specify the new ethernet 802.1q VLAN tag value"));
  2296. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2297. puts(_("Specify the ethernet 802.1q VLAN CFI value"));
  2298. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2299. puts(_("Specify the ethernet 802.1q VLAN priority"));
  2300. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2301. puts(_("Specify HDLC control value"));
  2302. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2303. puts(_("Specify HDLC address"));
  2304. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2305. puts(_("Set output file DLT type"));
  2306. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2307. puts(_("Rewrite Data-Link layer with user specified data"));
  2308. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2309. puts(_("Enable debugging output"));
  2310. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2311. puts(_("Input pcap file to be processed"));
  2312. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2313. puts(_("Output pcap file"));
  2314. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2315. puts(_("Split traffic via tcpprep cache file"));
  2316. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2317. puts(_("Print decoded packets via tcpdump to STDOUT"));
  2318. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2319. puts(_("Arguments passed to tcpdump decoder"));
  2320. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2321. puts(_("Parse fragroute configuration file"));
  2322. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2323. puts(_("Which flows to apply fragroute to: c2s, s2c, both"));
  2324. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2325. puts(_("Skip writing packets with soft errors"));
  2326. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2327. puts(_("Print version information"));
  2328. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2329. puts(_("Display less usage information and exit"));
  2330. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2331. puts(_("display extended usage information and exit"));
  2332. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2333. puts(_("extended usage information passed thru pager"));
  2334. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2335. puts(_("save the option state to a config file"));
  2336. /* referenced via tcprewriteOptions.pOptDesc->pzText */
  2337. puts(_("load options from a config file"));
  2338. /* referenced via tcprewriteOptions.pzUsageTitle */
  2339. puts(_("tcprewrite (tcprewrite) - Rewrite the packets in a pcap file.\n\
  2340. Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
  2341. /* referenced via tcprewriteOptions.pzDetail */
  2342. puts(_("Tcprewrite is a tool to rewrite packets stored in 'pcap(3)' file format,\n\
  2343. such as created by tools such as 'tcpdump(1)' and 'ethereal(1)'. Once a\n\
  2344. pcap file has had it's packets rewritten, they can be replayed back out on\n\
  2345. the network using 'tcpreplay(1)'.\n\n"));
  2346. puts(_("tcprewrite currently supports reading the following DLT types:\n\n\n"));
  2347. puts(_("'DLT_C_HDLC' aka Cisco HDLC\n\n\n\
  2348. 'DLT_EN10MB' aka Ethernet\n\n\n"));
  2349. puts(_("'DLT_LINUX_SLL' aka Linux Cooked Socket\n\n\n"));
  2350. puts(_("'DLT_RAW' aka RAW IP\n\n\n\
  2351. 'DLT_NULL' aka BSD Loopback\n\n\n"));
  2352. puts(_("'DLT_LOOP' aka OpenBSD Loopback\n\n\n\
  2353. 'DLT_IEEE802_11' aka 802.11a/b/g\n\n\n"));
  2354. puts(_("'DLT_IEEE802_11_RADIO' aka 802.11a/b/g with Radiotap headers\n\n\n"));
  2355. puts(_("'DLT_JUNIPER_ETHER' aka Juniper Encapsulated Ethernet\n\n\n"));
  2356. puts(_("'DLT_PPP_SERIAL' aka PPP over Serial\n\n\
  2357. Please see the --dlt option for supported DLT types for writing.\n\n"));
  2358. puts(_("The packet editing features of tcprewrite which distinguish between\n\
  2359. \"client\" and \"server\" traffic requires a tcpprep(1) cache file.\n\n\
  2360. For more details, please see the Tcpreplay Manual at:\n\
  2361. http://tcpreplay.appneta.com\n"));
  2362. /* referenced via tcprewriteOptions.pzFullUsage */
  2363. puts(_("<<<NOT-FOUND>>>"));
  2364. /* referenced via tcprewriteOptions.pzShortUsage */
  2365. puts(_("<<<NOT-FOUND>>>"));
  2366. /* LIBOPTS-MESSAGES: */
  2367. #line 67 "../autoopts.c"
  2368. puts(_("allocation of %d bytes failed\n"));
  2369. #line 93 "../autoopts.c"
  2370. puts(_("allocation of %d bytes failed\n"));
  2371. #line 53 "../init.c"
  2372. puts(_("AutoOpts function called without option descriptor\n"));
  2373. #line 86 "../init.c"
  2374. puts(_("\tThis exceeds the compiled library version: "));
  2375. #line 84 "../init.c"
  2376. puts(_("Automated Options Processing Error!\n"
  2377. "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
  2378. #line 80 "../autoopts.c"
  2379. puts(_("realloc of %d bytes at 0x%p failed\n"));
  2380. #line 88 "../init.c"
  2381. puts(_("\tThis is less than the minimum library version: "));
  2382. #line 121 "../version.c"
  2383. puts(_("Automated Options version %s\n"
  2384. "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
  2385. #line 87 "../makeshell.c"
  2386. puts(_("(AutoOpts bug): %s.\n"));
  2387. #line 90 "../reset.c"
  2388. puts(_("optionResetOpt() called, but reset-option not configured"));
  2389. #line 295 "../usage.c"
  2390. puts(_("could not locate the 'help' option"));
  2391. #line 336 "../autoopts.c"
  2392. puts(_("optionProcess() was called with invalid data"));
  2393. #line 751 "../usage.c"
  2394. puts(_("invalid argument type specified"));
  2395. #line 598 "../find.c"
  2396. puts(_("defaulted to option with optional arg"));
  2397. #line 76 "../alias.c"
  2398. puts(_("aliasing option is out of range."));
  2399. #line 235 "../enum.c"
  2400. puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
  2401. #line 108 "../find.c"
  2402. puts(_(" The following options match:\n"));
  2403. #line 293 "../find.c"
  2404. puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
  2405. #line 161 "../check.c"
  2406. puts(_("%s: Command line arguments required\n"));
  2407. #line 43 "../alias.c"
  2408. puts(_("%d %s%s options allowed\n"));
  2409. #line 94 "../makeshell.c"
  2410. puts(_("%s error %d (%s) calling %s for '%s'\n"));
  2411. #line 306 "../makeshell.c"
  2412. puts(_("interprocess pipe"));
  2413. #line 168 "../version.c"
  2414. puts(_("error: version option argument '%c' invalid. Use:\n"
  2415. "\t'v' - version only\n"
  2416. "\t'c' - version and copyright\n"
  2417. "\t'n' - version and full copyright notice\n"));
  2418. #line 58 "../check.c"
  2419. puts(_("%s error: the '%s' and '%s' options conflict\n"));
  2420. #line 217 "../find.c"
  2421. puts(_("%s: The '%s' option has been disabled."));
  2422. #line 430 "../find.c"
  2423. puts(_("%s: The '%s' option has been disabled."));
  2424. #line 38 "../alias.c"
  2425. puts(_("-equivalence"));
  2426. #line 469 "../find.c"
  2427. puts(_("%s: illegal option -- %c\n"));
  2428. #line 110 "../reset.c"
  2429. puts(_("%s: illegal option -- %c\n"));
  2430. #line 271 "../find.c"
  2431. puts(_("%s: illegal option -- %s\n"));
  2432. #line 755 "../find.c"
  2433. puts(_("%s: illegal option -- %s\n"));
  2434. #line 118 "../reset.c"
  2435. puts(_("%s: illegal option -- %s\n"));
  2436. #line 335 "../find.c"
  2437. puts(_("%s: unknown vendor extension option -- %s\n"));
  2438. #line 160 "../enum.c"
  2439. puts(_(" or an integer from %d through %d\n"));
  2440. #line 170 "../enum.c"
  2441. puts(_(" or an integer from %d through %d\n"));
  2442. #line 750 "../usage.c"
  2443. puts(_("%s error: invalid option descriptor for %s\n"));
  2444. #line 1084 "../usage.c"
  2445. puts(_("%s error: invalid option descriptor for %s\n"));
  2446. #line 385 "../find.c"
  2447. puts(_("%s: invalid option name: %s\n"));
  2448. #line 527 "../find.c"
  2449. puts(_("%s: The '%s' option requires an argument.\n"));
  2450. #line 156 "../autoopts.c"
  2451. puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
  2452. "\t'%s' and '%s'."));
  2453. #line 94 "../check.c"
  2454. puts(_("%s error: The %s option is required\n"));
  2455. #line 632 "../find.c"
  2456. puts(_("%s: The '%s' option cannot have an argument.\n"));
  2457. #line 151 "../check.c"
  2458. puts(_("%s: Command line arguments are not allowed.\n"));
  2459. #line 536 "../save.c"
  2460. puts(_("error %d (%s) creating %s\n"));
  2461. #line 235 "../enum.c"
  2462. puts(_("%s error: '%s' does not match any %s keywords.\n"));
  2463. #line 93 "../reset.c"
  2464. puts(_("%s error: The '%s' option requires an argument.\n"));
  2465. #line 186 "../save.c"
  2466. puts(_("error %d (%s) stat-ing %s\n"));
  2467. #line 239 "../save.c"
  2468. puts(_("error %d (%s) stat-ing %s\n"));
  2469. #line 143 "../restore.c"
  2470. puts(_("%s error: no saved option state\n"));
  2471. #line 231 "../autoopts.c"
  2472. puts(_("'%s' is not a command line option.\n"));
  2473. #line 113 "../time.c"
  2474. puts(_("%s error: '%s' is not a recognizable date/time.\n"));
  2475. #line 131 "../save.c"
  2476. puts(_("'%s' not defined\n"));
  2477. #line 50 "../time.c"
  2478. puts(_("%s error: '%s' is not a recognizable time duration.\n"));
  2479. #line 92 "../check.c"
  2480. puts(_("%s error: The %s option must appear %d times.\n"));
  2481. #line 165 "../numeric.c"
  2482. puts(_("%s error: '%s' is not a recognizable number.\n"));
  2483. #line 201 "../enum.c"
  2484. puts(_("%s error: %s exceeds %s keyword count\n"));
  2485. #line 333 "../usage.c"
  2486. puts(_("Try '%s %s' for more information.\n"));
  2487. #line 45 "../alias.c"
  2488. puts(_("one %s%s option allowed\n"));
  2489. #line 208 "../makeshell.c"
  2490. puts(_("standard output"));
  2491. #line 943 "../makeshell.c"
  2492. puts(_("standard output"));
  2493. #line 277 "../usage.c"
  2494. puts(_("standard output"));
  2495. #line 418 "../usage.c"
  2496. puts(_("standard output"));
  2497. #line 628 "../usage.c"
  2498. puts(_("standard output"));
  2499. #line 175 "../version.c"
  2500. puts(_("standard output"));
  2501. #line 277 "../usage.c"
  2502. puts(_("standard error"));
  2503. #line 418 "../usage.c"
  2504. puts(_("standard error"));
  2505. #line 628 "../usage.c"
  2506. puts(_("standard error"));
  2507. #line 175 "../version.c"
  2508. puts(_("standard error"));
  2509. #line 208 "../makeshell.c"
  2510. puts(_("write"));
  2511. #line 943 "../makeshell.c"
  2512. puts(_("write"));
  2513. #line 276 "../usage.c"
  2514. puts(_("write"));
  2515. #line 417 "../usage.c"
  2516. puts(_("write"));
  2517. #line 627 "../usage.c"
  2518. puts(_("write"));
  2519. #line 174 "../version.c"
  2520. puts(_("write"));
  2521. #line 60 "../numeric.c"
  2522. puts(_("%s error: %s option value %ld is out of range.\n"));
  2523. #line 44 "../check.c"
  2524. puts(_("%s error: %s option requires the %s option\n"));
  2525. #line 130 "../save.c"
  2526. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2527. #line 185 "../save.c"
  2528. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2529. #line 238 "../save.c"
  2530. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2531. #line 257 "../save.c"
  2532. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2533. #line 535 "../save.c"
  2534. puts(_("%s warning: cannot save options - %s not regular file\n"));
  2535. /* END-LIBOPTS-MESSAGES */
  2536. /* USAGE-TEXT: */
  2537. #line 876 "../usage.c"
  2538. puts(_("\t\t\t\t- an alternate for '%s'\n"));
  2539. #line 1151 "../usage.c"
  2540. puts(_("Version, usage and configuration options:"));
  2541. #line 927 "../usage.c"
  2542. puts(_("\t\t\t\t- default option for unnamed options\n"));
  2543. #line 840 "../usage.c"
  2544. puts(_("\t\t\t\t- disabled as '--%s'\n"));
  2545. #line 1120 "../usage.c"
  2546. puts(_(" --- %-14s %s\n"));
  2547. #line 1118 "../usage.c"
  2548. puts(_("This option has been disabled"));
  2549. #line 867 "../usage.c"
  2550. puts(_("\t\t\t\t- enabled by default\n"));
  2551. #line 40 "../alias.c"
  2552. puts(_("%s error: only "));
  2553. #line 1197 "../usage.c"
  2554. puts(_(" - examining environment variables named %s_*\n"));
  2555. #line 168 "../file.c"
  2556. puts(_("\t\t\t\t- file must not pre-exist\n"));
  2557. #line 172 "../file.c"
  2558. puts(_("\t\t\t\t- file must pre-exist\n"));
  2559. #line 383 "../usage.c"
  2560. puts(_("Options are specified by doubled hyphens and their name or by a single\n"
  2561. "hyphen and the flag character.\n"));
  2562. #line 921 "../makeshell.c"
  2563. puts(_("\n"
  2564. "= = = = = = = =\n\n"
  2565. "This incarnation of genshell will produce\n"
  2566. "a shell script to parse the options for %s:\n\n"));
  2567. #line 167 "../enum.c"
  2568. puts(_(" or an integer mask with any of the lower %d bits set\n"));
  2569. #line 900 "../usage.c"
  2570. puts(_("\t\t\t\t- is a set membership option\n"));
  2571. #line 921 "../usage.c"
  2572. puts(_("\t\t\t\t- must appear between %d and %d times\n"));
  2573. #line 385 "../usage.c"
  2574. puts(_("Options are specified by single or double hyphens and their name.\n"));
  2575. #line 907 "../usage.c"
  2576. puts(_("\t\t\t\t- may appear multiple times\n"));
  2577. #line 894 "../usage.c"
  2578. puts(_("\t\t\t\t- may not be preset\n"));
  2579. #line 1312 "../usage.c"
  2580. puts(_(" Arg Option-Name Description\n"));
  2581. #line 1248 "../usage.c"
  2582. puts(_(" Flg Arg Option-Name Description\n"));
  2583. #line 1306 "../usage.c"
  2584. puts(_(" Flg Arg Option-Name Description\n"));
  2585. #line 1307 "../usage.c"
  2586. puts(_(" %3s %s"));
  2587. #line 1313 "../usage.c"
  2588. puts(_(" %3s %s"));
  2589. #line 390 "../usage.c"
  2590. puts(_("The '-#<number>' option may omit the hash char\n"));
  2591. #line 386 "../usage.c"
  2592. puts(_("All arguments are named options.\n"));
  2593. #line 974 "../usage.c"
  2594. puts(_(" - reading file %s"));
  2595. #line 412 "../usage.c"
  2596. puts(_("\n"
  2597. "Please send bug reports to: <%s>\n"));
  2598. #line 100 "../version.c"
  2599. puts(_("\n"
  2600. "Please send bug reports to: <%s>\n"));
  2601. #line 129 "../version.c"
  2602. puts(_("\n"
  2603. "Please send bug reports to: <%s>\n"));
  2604. #line 906 "../usage.c"
  2605. puts(_("\t\t\t\t- may NOT appear - preset only\n"));
  2606. #line 947 "../usage.c"
  2607. puts(_("\n"
  2608. "The following option preset mechanisms are supported:\n"));
  2609. #line 1195 "../usage.c"
  2610. puts(_("\n"
  2611. "The following option preset mechanisms are supported:\n"));
  2612. #line 685 "../usage.c"
  2613. puts(_("prohibits these options:\n"));
  2614. #line 680 "../usage.c"
  2615. puts(_("prohibits the option '%s'\n"));
  2616. #line 81 "../numeric.c"
  2617. puts(_("%s%ld to %ld"));
  2618. #line 79 "../numeric.c"
  2619. puts(_("%sgreater than or equal to %ld"));
  2620. #line 75 "../numeric.c"
  2621. puts(_("%s%ld exactly"));
  2622. #line 68 "../numeric.c"
  2623. puts(_("%sit must lie in one of the ranges:\n"));
  2624. #line 68 "../numeric.c"
  2625. puts(_("%sit must be in the range:\n"));
  2626. #line 88 "../numeric.c"
  2627. puts(_(", or\n"));
  2628. #line 66 "../numeric.c"
  2629. puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
  2630. #line 77 "../numeric.c"
  2631. puts(_("%sless than or equal to %ld"));
  2632. #line 393 "../usage.c"
  2633. puts(_("Operands and options may be intermixed. They will be reordered.\n"));
  2634. #line 655 "../usage.c"
  2635. puts(_("requires the option '%s'\n"));
  2636. #line 658 "../usage.c"
  2637. puts(_("requires these options:\n"));
  2638. #line 1324 "../usage.c"
  2639. puts(_(" Arg Option-Name Req? Description\n"));
  2640. #line 1318 "../usage.c"
  2641. puts(_(" Flg Arg Option-Name Req? Description\n"));
  2642. #line 168 "../enum.c"
  2643. puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
  2644. "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
  2645. "will set them all. Multiple entries may be passed as an option\n"
  2646. "argument list.\n"));
  2647. #line 913 "../usage.c"
  2648. puts(_("\t\t\t\t- may appear up to %d times\n"));
  2649. #line 77 "../enum.c"
  2650. puts(_("The valid \"%s\" option keywords are:\n"));
  2651. #line 1155 "../usage.c"
  2652. puts(_("The next option supports vendor supported extra options:"));
  2653. #line 776 "../usage.c"
  2654. puts(_("These additional options are:"));
  2655. /* END-USAGE-TEXT */
  2656. }
  2657. #endif /* uncompilable code */
  2658. #ifdef __cplusplus
  2659. }
  2660. #endif
  2661. /* tcprewrite_opts.c ends here */