tcpbridge_opts.c 118 KB

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