tcpbridge.1 24 KB

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