tcpbridge.1 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. .de1 NOP
  2. . it 1 an-trap
  3. . if \\n[.$] \,\\$*\/
  4. ..
  5. .ie t \
  6. .ds B-Font [CB]
  7. .ds I-Font [CI]
  8. .ds R-Font [CR]
  9. .el \
  10. .ds B-Font B
  11. .ds I-Font I
  12. .ds R-Font R
  13. .TH tcpbridge 1 "08 May 2017" "tcpbridge" "User Commands"
  14. .\"
  15. .\" DO NOT EDIT THIS FILE (in-mem file)
  16. .\"
  17. .\" It has been AutoGen-ed
  18. .\" From the definitions tcpbridge_opts.def
  19. .\" and the template file agman-cmd.tpl
  20. .SH NAME
  21. \f\*[B-Font]tcpbridge\fP
  22. \- Bridge network traffic across two interfaces
  23. .SH SYNOPSIS
  24. \f\*[B-Font]tcpbridge\fP
  25. .\" Mixture of short (flag) options and long options
  26. [\f\*[B-Font]\-flags\f[]]
  27. [\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
  28. [\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
  29. .sp \n(Ppu
  30. .ne 2
  31. All arguments must be options.
  32. .sp \n(Ppu
  33. .ne 2
  34. tcpbridge is a tool for selectively briding network traffic across two interfaces
  35. and optionally modifying the packets in between
  36. .SH "DESCRIPTION"
  37. The basic operation of tcpbridge is to be a network bridge between two
  38. subnets. All packets received on one interface are sent via the other.
  39. .sp
  40. Optionally, packets can be edited in a variety of ways according to your needs.
  41. .sp
  42. For more details, please see the Tcpreplay Manual at:
  43. http://tcpreplay.appneta.com
  44. .SH "OPTIONS"
  45. .SS ""
  46. .TP
  47. .NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-portmap\f[]=\f\*[I-Font]string\f[]
  48. Rewrite TCP/UDP ports.
  49. This option may appear up to 9999 times.
  50. .sp
  51. Specify a list of comma delimited port mappingings consisting of
  52. colon delimited port number pairs. Each colon delimited port pair
  53. consists of the port to match followed by the port number to rewrite.
  54. .sp
  55. Examples:
  56. .nf
  57. \--portmap=80:8000 \--portmap=8080:80 # 80->8000 and 8080->80
  58. \--portmap=8000,8080,88888:80 # 3 different ports become 80
  59. \--portmap=8000-8999:80 # ports 8000 to 8999 become 80
  60. .fi
  61. .TP
  62. .NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-seed\f[]=\f\*[I-Font]number\f[]
  63. Randomize src/dst IPv4/v6 addresses w/ given seed.
  64. This option may appear up to 1 times.
  65. This option must not appear in combination with any of the following options:
  66. fuzz-seed.
  67. This option takes an integer number as its argument.
  68. .sp
  69. Causes the source and destination IPv4/v6 addresses to be pseudo
  70. randomized but still maintain client/server relationships.
  71. Since the randomization is deterministic based on the seed,
  72. you can reuse the same seed value to recreate the traffic.
  73. .TP
  74. .NOP \f\*[B-Font]\-N\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-pnat\f[]=\f\*[I-Font]string\f[]
  75. Rewrite IPv4/v6 addresses using pseudo-NAT.
  76. This option may appear up to 2 times.
  77. This option must not appear in combination with any of the following options:
  78. srcipmap.
  79. .sp
  80. Takes a comma delimited series of colon delimited CIDR
  81. netblock pairs. Each netblock pair is evaluated in order against
  82. the IP addresses. If the IP address in the packet matches the
  83. first netblock, it is rewritten using the second netblock as a
  84. mask against the high order bits.
  85. .sp
  86. IPv4 Example:
  87. .nf
  88. \--pnat=192.168.0.0/16:10.77.0.0/16,172.16.0.0/12:10.1.0.0/24
  89. .fi
  90. IPv6 Example:
  91. .nf
  92. \--pnat=[2001:db8::/32]:[dead::/16],[2001:db8::/32]:[::ffff:0:0/96]
  93. .fi
  94. .TP
  95. .NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-srcipmap\f[]=\f\*[I-Font]string\f[]
  96. Rewrite source IPv4/v6 addresses using pseudo-NAT.
  97. This option may appear up to 1 times.
  98. This option must not appear in combination with any of the following options:
  99. pnat.
  100. .sp
  101. Works just like the \--pnat option, but only affects the source IP
  102. addresses in the IPv4/v6 header.
  103. .TP
  104. .NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-dstipmap\f[]=\f\*[I-Font]string\f[]
  105. Rewrite destination IPv4/v6 addresses using pseudo-NAT.
  106. This option may appear up to 1 times.
  107. This option must not appear in combination with any of the following options:
  108. pnat.
  109. .sp
  110. Works just like the \--pnat option, but only affects the destination IP
  111. addresses in the IPv4/v6 header.
  112. .TP
  113. .NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-endpoints\f[]=\f\*[I-Font]string\f[]
  114. Rewrite IP addresses to be between two endpoints.
  115. This option may appear up to 1 times.
  116. This option must appear in combination with the following options:
  117. cachefile.
  118. .sp
  119. Takes a pair of colon delimited IPv4/v6 addresses which will be used to rewrite
  120. all traffic to appear to be between the two IP addresses.
  121. .sp
  122. IPv4 Example:
  123. .nf
  124. \--endpoints=172.16.0.1:172.16.0.2
  125. .fi
  126. IPv6 Example:
  127. .nf
  128. \--endpoints=[2001:db8::dead:beef]:[::ffff:0:0:ac:f:0:2]
  129. .fi
  130. .TP
  131. .NOP \f\*[B-Font]\-b\f[], \f\*[B-Font]\-\-skipbroadcast\f[]
  132. Skip rewriting broadcast/multicast IPv4/v6 addresses.
  133. .sp
  134. By default \--seed, \--pnat and \--endpoints will rewrite
  135. broadcast and multicast IPv4/v6 and MAC addresses. Setting this flag
  136. will keep broadcast/multicast IPv4/v6 and MAC addresses from being rewritten.
  137. .TP
  138. .NOP \f\*[B-Font]\-C\f[], \f\*[B-Font]\-\-fixcsum\f[]
  139. Force recalculation of IPv4/TCP/UDP header checksums.
  140. .sp
  141. Causes each IPv4/v6 packet to have their checksums recalculated and
  142. fixed. Automatically enabled for packets modified with \fB--seed\fP,
  143. \fB--pnat\fP, \fB--endpoints\fP or \fB--fixlen\fP.
  144. .TP
  145. .NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-mtu\f[]=\f\*[I-Font]number\f[]
  146. Override default MTU length (1500 bytes).
  147. This option may appear up to 1 times.
  148. This option takes an integer number as its argument.
  149. The value of
  150. \f\*[I-Font]number\f[]
  151. is constrained to being:
  152. .in +4
  153. .nf
  154. .na
  155. in the range 1 through MAXPACKET
  156. .fi
  157. .in -4
  158. .sp
  159. Override the default 1500 byte MTU size for determining the maximum padding length
  160. (--fixlen=pad) or when truncating (--mtu-trunc).
  161. .TP
  162. .NOP \f\*[B-Font]\-\-mtu\-trunc\f[]
  163. Truncate packets larger then specified MTU.
  164. This option may appear up to 1 times.
  165. .sp
  166. Similar to \--fixlen, this option will truncate data in packets from Layer 3 and above to be
  167. no larger then the MTU.
  168. .TP
  169. .NOP \f\*[B-Font]\-E\f[], \f\*[B-Font]\-\-efcs\f[]
  170. Remove Ethernet checksums (FCS) from end of frames.
  171. .sp
  172. Note, this option is pretty dangerous! We do not actually check to see if a FCS
  173. actually exists in the frame, we just blindly delete the last 4 bytes. Hence,
  174. you should only use this if you know know that your OS provides the FCS when
  175. reading raw packets.
  176. .TP
  177. .NOP \f\*[B-Font]\-\-ttl\f[]=\f\*[I-Font]string\f[]
  178. Modify the IPv4/v6 TTL/Hop Limit.
  179. .sp
  180. Allows you to modify the TTL/Hop Limit of all the IPv4/v6 packets. Specify a number to hard-code
  181. the value or +/-value to increase or decrease by the value provided (limited to 1-255).
  182. .sp
  183. Examples:
  184. .nf
  185. \--ttl=10
  186. \--ttl=+7
  187. \--ttl=-64
  188. .fi
  189. .TP
  190. .NOP \f\*[B-Font]\-\-tos\f[]=\f\*[I-Font]number\f[]
  191. Set the IPv4 TOS/DiffServ/ECN byte.
  192. This option may appear up to 1 times.
  193. This option takes an integer number as its argument.
  194. The value of
  195. \f\*[I-Font]number\f[]
  196. is constrained to being:
  197. .in +4
  198. .nf
  199. .na
  200. in the range 0 through 255
  201. .fi
  202. .in -4
  203. .sp
  204. Allows you to override the TOS (also known as DiffServ/ECN) value in IPv4.
  205. .TP
  206. .NOP \f\*[B-Font]\-\-tclass\f[]=\f\*[I-Font]number\f[]
  207. Set the IPv6 Traffic Class byte.
  208. This option may appear up to 1 times.
  209. This option takes an integer number as its argument.
  210. The value of
  211. \f\*[I-Font]number\f[]
  212. is constrained to being:
  213. .in +4
  214. .nf
  215. .na
  216. in the range 0 through 255
  217. .fi
  218. .in -4
  219. .sp
  220. Allows you to override the IPv6 Traffic Class field.
  221. .TP
  222. .NOP \f\*[B-Font]\-\-flowlabel\f[]=\f\*[I-Font]number\f[]
  223. Set the IPv6 Flow Label.
  224. This option may appear up to 1 times.
  225. This option takes an integer number as its argument.
  226. The value of
  227. \f\*[I-Font]number\f[]
  228. is constrained to being:
  229. .in +4
  230. .nf
  231. .na
  232. in the range 0 through 1048575
  233. .fi
  234. .in -4
  235. .sp
  236. Allows you to override the 20bit IPv6 Flow Label field. Has no effect on IPv4
  237. packets.
  238. .TP
  239. .NOP \f\*[B-Font]\-F\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-fixlen\f[]=\f\*[I-Font]string\f[]
  240. Pad or truncate packet data to match header length.
  241. This option may appear up to 1 times.
  242. .sp
  243. Packets may be truncated during capture if the snaplen is smaller then the
  244. packet. This option allows you to modify the packet to pad the packet back
  245. out to the size stored in the IPv4/v6 header or rewrite the IP header total length
  246. to reflect the stored packet length.
  247. .sp 1
  248. \fBpad\fP
  249. Truncated packets will be padded out so that the packet length matches the
  250. IPv4 total length
  251. .sp 1
  252. \fBtrunc\fP
  253. Truncated packets will have their IPv4 total length field rewritten to match
  254. the actual packet length
  255. .sp 1
  256. \fBdel\fP
  257. Delete the packet
  258. .TP
  259. .NOP \f\*[B-Font]\-\-fuzz\-seed\f[]=\f\*[I-Font]number\f[]
  260. Fuzz 1 in X packets. Edit bytes, length, or emulate packet drop.
  261. This option takes an integer number as its argument.
  262. The value of
  263. \f\*[I-Font]number\f[]
  264. is constrained to being:
  265. .in +4
  266. .nf
  267. .na
  268. greater than or equal to 0
  269. .fi
  270. .in -4
  271. The default
  272. \f\*[I-Font]number\f[]
  273. for this option is:
  274. .ti +4
  275. 0
  276. .sp
  277. This fuzzing was designed as to test layer 7 protocols such as voip protocols.
  278. It modifies randomly 1 out of X packets (where X = \fB--fuzz-factor\fP) in order
  279. for stateful protocols to cover more of their code. The random fuzzing actions
  280. focus on data start and end because it often is the part of the data application
  281. protocols base their decisions on.
  282. .sp
  283. Possible fuzzing actions list:
  284. * drop packet
  285. * reduce packet size
  286. * edit packet Bytes:
  287. * Not all Bytes have the same probability of appearance in real life.
  288. Replace with 0x00, 0xFF, or a random byte with equal likelyhook
  289. * Not all Bytes have the same significance in a packet.
  290. Replace the start, the end, or the middle of the packet with equal likelihood.
  291. * do nothing (7 out of 8 packets)
  292. .TP
  293. .NOP \f\*[B-Font]\-\-fuzz\-factor\f[]=\f\*[I-Font]number\f[]
  294. Set the Fuzz 1 in X packet ratio (default 1 in 8 packets).
  295. This option must appear in combination with the following options:
  296. fuzz-seed.
  297. This option takes an integer number as its argument.
  298. The value of
  299. \f\*[I-Font]number\f[]
  300. is constrained to being:
  301. .in +4
  302. .nf
  303. .na
  304. greater than or equal to 1
  305. .fi
  306. .in -4
  307. The default
  308. \f\*[I-Font]number\f[]
  309. for this option is:
  310. .ti +4
  311. 8
  312. .sp
  313. Sets the ratio of for \fB--fuzz-seed\fP option. By default this value is 8,
  314. which means 1 in 8 packets are modified by fuzzing. Note that this ratio is
  315. based on the random number genereated by the supplied fuzz seed. Therefore by
  316. default you cannot expect that exactly every eighth packet will be modified.
  317. .TP
  318. .NOP \f\*[B-Font]\-\-skipl2broadcast\f[]
  319. Skip rewriting broadcast/multicast Layer 2 addresses.
  320. .sp
  321. By default, editing Layer 2 addresses will rewrite
  322. broadcast and multicast MAC addresses. Setting this flag
  323. will keep broadcast/multicast MAC addresses from being rewritten.
  324. .TP
  325. .NOP \f\*[B-Font]\-\-dlt\f[]=\f\*[I-Font]string\f[]
  326. Override output DLT encapsulation.
  327. This option may appear up to 1 times.
  328. .sp
  329. By default, no DLT (data link type) conversion will be made.
  330. To change the DLT type of the output pcap, select one of the following values:
  331. .sp 1
  332. \fBenet\fP
  333. Ethernet aka DLT_EN10MB
  334. .sp 1
  335. \fBhdlc\fP
  336. Cisco HDLC aka DLT_C_HDLC
  337. .sp 1
  338. \fBjnpr_ether\fP
  339. Juniper Ethernet DLT_C_JNPR_ETHER
  340. .sp 1
  341. \fBpppserial\fP
  342. PPP Serial aka DLT_PPP_SERIAL
  343. .sp 1
  344. \fBuser\fP
  345. User specified Layer 2 header and DLT type
  346. .br
  347. .TP
  348. .NOP \f\*[B-Font]\-\-enet\-dmac\f[]=\f\*[I-Font]string\f[]
  349. Override destination ethernet MAC addresses.
  350. This option may appear up to 1 times.
  351. .sp
  352. Takes a pair of comma deliminated ethernet MAC addresses which
  353. will replace the destination MAC address of outbound packets.
  354. The first MAC address will be used for the server to client traffic
  355. and the optional second MAC address will be used for the client
  356. to server traffic.
  357. .sp
  358. Example:
  359. .nf
  360. \--enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66
  361. .fi
  362. .TP
  363. .NOP \f\*[B-Font]\-\-enet\-smac\f[]=\f\*[I-Font]string\f[]
  364. Override source ethernet MAC addresses.
  365. This option may appear up to 1 times.
  366. .sp
  367. Takes a pair of comma deliminated ethernet MAC addresses which
  368. will replace the source MAC address of outbound packets.
  369. The first MAC address will be used for the server to client traffic
  370. and the optional second MAC address will be used for the client
  371. to server traffic.
  372. .sp
  373. Example:
  374. .nf
  375. \--enet-smac=00:12:13:14:15:16,00:22:33:44:55:66
  376. .fi
  377. .TP
  378. .NOP \f\*[B-Font]\-\-enet\-subsmac\f[]=\f\*[I-Font]string\f[]
  379. Substitute MAC addresses.
  380. This option may appear up to 9999 times.
  381. .sp
  382. Allows you to rewrite ethernet MAC addresses of packets. It takes
  383. comma delimited pair or MACs address and rewrites all occurrences of
  384. the first MAC with the value of the second MAC.
  385. Example:
  386. .nf
  387. \--enet-subsmac=00:12:13:14:15:16,00:22:33:44:55:66
  388. .fi
  389. .TP
  390. .NOP \f\*[B-Font]\-\-enet\-mac\-seed\f[]=\f\*[I-Font]number\f[]
  391. Randomize MAC addresses.
  392. This option may appear up to 1 times.
  393. This option must not appear in combination with any of the following options:
  394. enet-smac, enet-dmac, enet-subsmac.
  395. This option takes an integer number as its argument.
  396. .sp
  397. Allows you to randomize ethernet MAC addresses of packets, mostly
  398. like what \fB--seed\fP option does for IPv4/IPv6 addresses.
  399. .TP
  400. .NOP \f\*[B-Font]\-\-enet\-mac\-seed\-keep\-bytes\f[]=\f\*[I-Font]number\f[]
  401. Randomize MAC addresses.
  402. This option may appear up to 1 times.
  403. This option must appear in combination with the following options:
  404. enet-mac-seed.
  405. This option takes an integer number as its argument.
  406. The value of
  407. \f\*[I-Font]number\f[]
  408. is constrained to being:
  409. .in +4
  410. .nf
  411. .na
  412. in the range 1 through 6
  413. .fi
  414. .in -4
  415. .sp
  416. Keep some bytes untouched when usinging \fB--enet-mac-seed\fP option.
  417. .TP
  418. .NOP \f\*[B-Font]\-\-enet\-vlan\f[]=\f\*[I-Font]string\f[]
  419. Specify ethernet 802.1q VLAN tag mode.
  420. This option may appear up to 1 times.
  421. .sp
  422. Allows you to rewrite ethernet frames to add a 802.1q header to standard 802.3
  423. ethernet headers or remove the 802.1q VLAN tag information.
  424. .sp 1
  425. \fBadd\fP
  426. Rewrites the existing 802.3 ethernet header as an 802.1q VLAN header
  427. .sp 1
  428. \fBdel\fP
  429. Rewrites the existing 802.1q VLAN header as an 802.3 ethernet header
  430. .TP
  431. .NOP \f\*[B-Font]\-\-enet\-vlan\-tag\f[]=\f\*[I-Font]number\f[]
  432. Specify the new ethernet 802.1q VLAN tag value.
  433. This option may appear up to 1 times.
  434. This option must appear in combination with the following options:
  435. enet-vlan.
  436. This option takes an integer number as its argument.
  437. The value of
  438. \f\*[I-Font]number\f[]
  439. is constrained to being:
  440. .in +4
  441. .nf
  442. .na
  443. in the range 0 through 4095
  444. .fi
  445. .in -4
  446. .sp
  447. .TP
  448. .NOP \f\*[B-Font]\-\-enet\-vlan\-cfi\f[]=\f\*[I-Font]number\f[]
  449. Specify the ethernet 802.1q VLAN CFI value.
  450. This option may appear up to 1 times.
  451. This option must appear in combination with the following options:
  452. enet-vlan.
  453. This option takes an integer number as its argument.
  454. The value of
  455. \f\*[I-Font]number\f[]
  456. is constrained to being:
  457. .in +4
  458. .nf
  459. .na
  460. in the range 0 through 1
  461. .fi
  462. .in -4
  463. .sp
  464. .TP
  465. .NOP \f\*[B-Font]\-\-enet\-vlan\-pri\f[]=\f\*[I-Font]number\f[]
  466. Specify the ethernet 802.1q VLAN priority.
  467. This option may appear up to 1 times.
  468. This option must appear in combination with the following options:
  469. enet-vlan.
  470. This option takes an integer number as its argument.
  471. The value of
  472. \f\*[I-Font]number\f[]
  473. is constrained to being:
  474. .in +4
  475. .nf
  476. .na
  477. in the range 0 through 7
  478. .fi
  479. .in -4
  480. .sp
  481. .TP
  482. .NOP \f\*[B-Font]\-\-hdlc\-control\f[]=\f\*[I-Font]number\f[]
  483. Specify HDLC control value.
  484. This option may appear up to 1 times.
  485. This option takes an integer number as its argument.
  486. .sp
  487. The Cisco HDLC header has a 1 byte "control" field. Apparently this should
  488. always be 0, but if you can use any 1 byte value.
  489. .TP
  490. .NOP \f\*[B-Font]\-\-hdlc\-address\f[]=\f\*[I-Font]number\f[]
  491. Specify HDLC address.
  492. This option may appear up to 1 times.
  493. This option takes an integer number as its argument.
  494. .sp
  495. The Cisco HDLC header has a 1 byte "address" field which has two valid
  496. values:
  497. .sp 1
  498. \fB0x0F\fP
  499. Unicast
  500. .sp 1
  501. \fB0xBF\fP
  502. Broadcast
  503. .br
  504. You can however specify any single byte value.
  505. .TP
  506. .NOP \f\*[B-Font]\-\-user\-dlt\f[]=\f\*[I-Font]number\f[]
  507. Set output file DLT type.
  508. This option may appear up to 1 times.
  509. This option takes an integer number as its argument.
  510. .sp
  511. Set the DLT value of the output pcap file.
  512. .TP
  513. .NOP \f\*[B-Font]\-\-user\-dlink\f[]=\f\*[I-Font]string\f[]
  514. Rewrite Data-Link layer with user specified data.
  515. This option may appear up to 2 times.
  516. .sp
  517. Provide a series of comma deliminated hex values which will be
  518. used to rewrite or create the Layer 2 header of the packets.
  519. The first instance of this argument will rewrite both server
  520. and client traffic, but if this argument is specified a second
  521. time, it will be used for the client traffic.
  522. .sp
  523. Example:
  524. .nf
  525. \--user-dlink=01,02,03,04,05,06,00,1A,2B,3C,4D,5E,6F,08,00
  526. .fi
  527. .TP
  528. .NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-dbug\f[]=\f\*[I-Font]number\f[]
  529. Enable debugging output.
  530. This option may appear up to 1 times.
  531. This option takes an integer number as its argument.
  532. The value of
  533. \f\*[I-Font]number\f[]
  534. is constrained to being:
  535. .in +4
  536. .nf
  537. .na
  538. in the range 0 through 5
  539. .fi
  540. .in -4
  541. The default
  542. \f\*[I-Font]number\f[]
  543. for this option is:
  544. .ti +4
  545. 0
  546. .sp
  547. If configured with \--enable-debug, then you can specify a verbosity
  548. level for debugging output. Higher numbers increase verbosity.
  549. .TP
  550. .NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-intf1\f[]=\f\*[I-Font]string\f[]
  551. Primary interface (listen in uni-directional mode).
  552. This option may appear up to 1 times.
  553. .sp
  554. .TP
  555. .NOP \f\*[B-Font]\-I\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-intf2\f[]=\f\*[I-Font]string\f[]
  556. Secondary interface (send in uni-directional mode).
  557. This option may appear up to 1 times.
  558. .sp
  559. .TP
  560. .NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unidir\f[]
  561. Send and receive in only one direction.
  562. This option may appear up to 1 times.
  563. .sp
  564. Normally, tcpbridge will send and receive traffic in both directions
  565. (bi-directionally). However, if you choose this option, traffic will
  566. be sent uni-directionally.
  567. .TP
  568. .NOP \f\*[B-Font]\-\-listnics\f[]
  569. List available network interfaces and exit.
  570. .sp
  571. .TP
  572. .NOP \f\*[B-Font]\-L\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-limit\f[]=\f\*[I-Font]number\f[]
  573. Limit the number of packets to send.
  574. This option may appear up to 1 times.
  575. This option takes an integer number as its argument.
  576. The value of
  577. \f\*[I-Font]number\f[]
  578. is constrained to being:
  579. .in +4
  580. .nf
  581. .na
  582. greater than or equal to 1
  583. .fi
  584. .in -4
  585. The default
  586. \f\*[I-Font]number\f[]
  587. for this option is:
  588. .ti +4
  589. \-1
  590. .sp
  591. By default, tcpbridge will send packets forever or until Ctrl-C. Alternatively,
  592. you can specify a maximum number of packets to send.
  593. .TP
  594. .NOP \f\*[B-Font]\-M\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-mac\f[]=\f\*[I-Font]string\f[]
  595. MAC addresses of local NIC's.
  596. This option may appear up to 2 times.
  597. .sp
  598. tcpbridge does not support detecting the MAC addresses of the local network
  599. interfaces under Windows. Please specify both MAC addresses of the interfaces
  600. used in the bridge: \-M <intf1 mac> \-M <intf2 mac>
  601. .TP
  602. .NOP \f\*[B-Font]\-x\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-include\f[]=\f\*[I-Font]string\f[]
  603. Include only packets matching rule.
  604. This option may appear up to 1 times.
  605. This option must not appear in combination with any of the following options:
  606. exclude.
  607. .sp
  608. Override default of sending all packets stored in the capture file and only
  609. send packets which match the provided rule. Rules can be one of:
  610. .sp
  611. .sp
  612. .IR "S:<CIDR1>,..."
  613. - Source IP must match specified CIDR(s)
  614. .sp
  615. .IR "D:<CIDR1>,..."
  616. - Destination IP must match specified CIDR(s)
  617. .sp
  618. .IR "B:<CIDR1>,..."
  619. - Both source and destination IP must match specified CIDR(s)
  620. .sp
  621. .IR "E:<CIDR1>,..."
  622. - Either IP must match specified CIDR(s)
  623. .sp
  624. .IR "P:<LIST>"
  625. - Must be one of the listed packets where the list
  626. corresponds to the packet number in the capture file.
  627. .nf
  628. \--include=P:1-5,9,15,72-
  629. .fi
  630. would send packets 1 thru 5, the 9th and 15th packet, and packets 72 until the
  631. end of the file
  632. .sp
  633. .IR "F:'<bpf>'"
  634. - BPF filter. See the \fItcpdump(8)\fP man page for syntax.
  635. .br
  636. .TP
  637. .NOP \f\*[B-Font]\-X\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-exclude\f[]=\f\*[I-Font]string\f[]
  638. Exclude any packet matching this rule.
  639. This option may appear up to 1 times.
  640. This option must not appear in combination with any of the following options:
  641. include.
  642. .sp
  643. Override default of sending all packets stored in the capture file and only
  644. send packets which do not match the provided rule. Rules can be one of:
  645. .sp
  646. .sp
  647. .IR "S:<CIDR1>,..."
  648. - Source IP must not match specified CIDR(s)
  649. .sp
  650. .IR "D:<CIDR1>,..."
  651. - Destination IP must not match specified CIDR(s)
  652. .sp
  653. .IR "B:<CIDR1>,..."
  654. - Both source and destination IP must not match specified CIDR(s)
  655. .sp
  656. .IR "E:<CIDR1>,..."
  657. - Either IP must not match specified CIDR(s)
  658. .sp
  659. .IR "P:<LIST>"
  660. - Must not be one of the listed packets where the list
  661. corresponds to the packet number in the capture file.
  662. .nf
  663. \--exclude=P:1-5,9,15,72-
  664. .fi
  665. would drop packets 1 thru 5, the 9th and 15th packet, and packets 72 until the
  666. end of the file
  667. .br
  668. .TP
  669. .NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pid\f[]
  670. Print the PID of tcpbridge at startup.
  671. .sp
  672. .TP
  673. .NOP \f\*[B-Font]\-v\f[], \f\*[B-Font]\-\-verbose\f[]
  674. Print decoded packets via tcpdump to STDOUT.
  675. This option may appear up to 1 times.
  676. .sp
  677. .TP
  678. .NOP \f\*[B-Font]\-A\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-decode\f[]=\f\*[I-Font]string\f[]
  679. Arguments passed to tcpdump decoder.
  680. This option may appear up to 1 times.
  681. This option must appear in combination with the following options:
  682. verbose.
  683. .sp
  684. When enabling verbose mode (\fB-v\fP) you may also specify one or more
  685. additional arguments to pass to \fBtcpdump\fP to modify the way packets
  686. are decoded. By default, \-n and \-l are used. Be sure to
  687. quote the arguments like: \--verbose="-axxx" so that they are not interpreted
  688. by tcpbridge. The following arguments are valid:
  689. [ \-aAeNqRStuvxX ]
  690. [ \-E spi@ipaddr algo:secret,... ]
  691. [ \-s snaplen ]
  692. .TP
  693. .NOP \f\*[B-Font]\-V\f[], \f\*[B-Font]\-\-version\f[]
  694. Print version information.
  695. .sp
  696. .TP
  697. .NOP \f\*[B-Font]\-h\f[], \f\*[B-Font]\-\-less\-help\f[]
  698. Display less usage information and exit.
  699. .sp
  700. .TP
  701. .NOP \f\*[B-Font]\-H\f[], \f\*[B-Font]\-\-help\f[]
  702. Display usage information and exit.
  703. .TP
  704. .NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
  705. Pass the extended usage information through a pager.
  706. .TP
  707. .NOP \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
  708. Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
  709. configuration file listed in the \fBOPTION PRESETS\fP section, below.
  710. The command will exit after updating the config file.
  711. .TP
  712. .NOP \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
  713. Load options from \fIcfgfile\fP.
  714. The \fIno-load-opts\fP form will disable the loading
  715. of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
  716. out of order.
  717. .PP
  718. .SH "OPTION PRESETS"
  719. Any option that is not marked as \fInot presettable\fP may be preset
  720. by loading values from configuration ("RC" or ".INI") file(s).
  721. The \fIhomerc\fP file is "\fI$$/\fP", unless that is a directory.
  722. In that case, the file "\fI.tcpbridgerc\fP"
  723. is searched for within that directory.
  724. .SH "FILES"
  725. See \fBOPTION PRESETS\fP for configuration files.
  726. .SH "EXIT STATUS"
  727. One of the following exit values will be returned:
  728. .TP
  729. .NOP 0 " (EXIT_SUCCESS)"
  730. Successful program execution.
  731. .TP
  732. .NOP 1 " (EXIT_FAILURE)"
  733. The operation failed or the command syntax was not valid.
  734. .TP
  735. .NOP 66 " (EX_NOINPUT)"
  736. A specified configuration file could not be loaded.
  737. .TP
  738. .NOP 70 " (EX_SOFTWARE)"
  739. libopts had an internal operational error. Please report
  740. it to autogen-users@lists.sourceforge.net. Thank you.
  741. .PP
  742. .SH "AUTHORS"
  743. Copyright 2013-2017 Fred Klassen \- AppNeta
  744. Copyright 2000-2012 Aaron Turner
  745. For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
  746. The latest version of this software is always available from:
  747. http://tcpreplay.appneta.com/
  748. .SH "COPYRIGHT"
  749. Copyright (C) 2000-2017 Aaron Turner and Fred Klassen all rights reserved.
  750. This program is released under the terms of the GNU General Public License, version 3 or later.
  751. .SH "BUGS"
  752. Please send bug reports to: tcpreplay-users@lists.sourceforge.net
  753. .SH "NOTES"
  754. This manual page was \fIAutoGen\fP-erated from the \fBtcpbridge\fP
  755. option definitions.