tcpbridge_opts.c 109 KB

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