tcpbridge_opts.c 115 KB

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