tcpedit_opts.def 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. flag = {
  2. name = tcpedit;
  3. documentation;
  4. lib-name = tcpedit;
  5. };
  6. flag = {
  7. name = portmap;
  8. value = r;
  9. arg-type = string;
  10. max = 1;
  11. descrip = "Rewrite TCP/UDP ports";
  12. doc = <<- EOText
  13. Specify a list of comma delimited port mappingings consisting of
  14. colon delimited port number pairs. Each colon delimited port pair
  15. consists of the port to match followed by the port number to rewrite.
  16. Example:
  17. @example
  18. --portmap=80:8000,8080:80
  19. @end example
  20. EOText;
  21. };
  22. flag = {
  23. name = seed;
  24. value = s;
  25. arg-type = number;
  26. descrip = "Randomize src/dst IP addresses w/ given seed";
  27. max = 1;
  28. doc = <<- EOText
  29. Causes the source and destination IP addresses to be pseudo
  30. randomized but still maintain client/server relationships.
  31. Since the randomization is deterministic based on the seed,
  32. you can reuse the same seed value to recreate the traffic.
  33. EOText;
  34. };
  35. flag = {
  36. name = pnat;
  37. value = N;
  38. arg-type = string;
  39. max = 2;
  40. stack-arg;
  41. flags-cant = srcipmap;
  42. flass-cant = dstipmap;
  43. descrip = "Rewrite IP addresses using pseudo-NAT";
  44. doc = <<- EOText
  45. Takes a comma delimited series of colon delimited CIDR
  46. netblock pairs. Each netblock pair is evaluated in order against
  47. the IP addresses. If the IP address in the packet matches the
  48. first netblock, it is rewriten using the second netblock as a
  49. mask against the high order bits.
  50. Example:
  51. @example
  52. --pnat=192.168.0.0/16:10.77.0.0/16,172.16.0.0/12:10.1.0.0/24
  53. @end example
  54. EOText;
  55. };
  56. flag = {
  57. name = srcipmap;
  58. value = S;
  59. arg-type = string;
  60. max = 1;
  61. flags-cant = pnat;
  62. descrip = "Rewrite source IP addresses using pseudo-NAT";
  63. doc = <<- EOText
  64. Works just like the --pnat option, but only affects the source IP
  65. addresses in the IPv4 header.
  66. EOText;
  67. };
  68. flag = {
  69. name = dstipmap;
  70. value = D;
  71. arg-type = string;
  72. max = 1;
  73. flags-cant = pnat;
  74. descrip = "Rewrite destination IP addresses using pseudo-NAT";
  75. doc = <<- EOText
  76. Works just like the --pnat option, but only affects the destination IP
  77. addresses in the IPv4 header.
  78. EOText;
  79. };
  80. flag = {
  81. ifdef = HAVE_CACHEFILE_SUPPORT;
  82. name = endpoints;
  83. value = e;
  84. arg-type = string;
  85. max = 1;
  86. flags-must = cachefile;
  87. descrip = "Rewrite IP addresses to be between two endpoints";
  88. doc = <<- EOText
  89. Takes a pair of colon delimited IP addresses which will be used to rewrite
  90. all traffic to appear to be between the two IP's.
  91. Example:
  92. @example
  93. --endpoints=172.16.0.1:172.16.0.2
  94. @end example
  95. EOText;
  96. };
  97. flag = {
  98. name = skipbroadcast;
  99. value = b;
  100. descrip = "Skip rewriting broadcast/multicast IP's";
  101. doc = <<- EOText
  102. By default --seed, --pnat and --endpoints will rewrite
  103. broadcast and multicast IP and MAC addresses. Setting this flag
  104. will keep broadcast/multicast IP and MAC addresses from being rewritten.
  105. EOText;
  106. };
  107. flag = {
  108. name = fixcsum;
  109. value = C;
  110. descrip = "Force recalculation of IP/TCP/UDP checksums";
  111. doc = <<- EOText
  112. Causes each IP packet to have it's checksums recalcualted and
  113. fixed. Automatically enabled for packets modified with @samp{--seed},
  114. @samp{--pnat}, @samp{--endpoints} or @samp{--fixlen}.
  115. EOText;
  116. };
  117. flag = {
  118. name = mtu;
  119. value = m;
  120. arg-type = number;
  121. max = 1;
  122. arg-range = "1->MAXPACKET";
  123. default = DEFAULT_MTU;
  124. descrip = "Override default MTU length (1500 bytes)";
  125. doc = <<- EOText
  126. Override the default 1500 byte MTU size for determining the maximum padding length.
  127. EOText;
  128. };
  129. flag = {
  130. name = efcs;
  131. value = E;
  132. descrip = "Remove Ethernet checksums (FCS) from end of frames";
  133. doc = <<- EOText
  134. Note, this option is pretty dangerous! We don't actually check to see if a FCS
  135. actually exists in the frame, we just blindly delete the last two bytes. Hence,
  136. you should only use this if you know know that your OS provides the FCS when
  137. reading raw packets.
  138. EOText;
  139. };
  140. flag = {
  141. name = ttl;
  142. descrip = "Modify the IPv4 TTL";
  143. arg-type = string;
  144. doc = <<- EOText
  145. Allows you to modify the TTL of all the IPv4 packets. Specify a number to hard-code
  146. the value or +/-value to increase or decrease by the value provided (limited to 1-255).
  147. Examples:
  148. @example
  149. --ttl=10
  150. --ttl=+7
  151. --ttl=-64
  152. @end example
  153. EOText;
  154. };
  155. flag = {
  156. name = fixlen;
  157. value = F;
  158. arg-type = string;
  159. descrip = "Pad or truncate packet data to match header length";
  160. max = 1;
  161. doc = <<- EOText
  162. Packets may be truncated during capture if the snaplen is smaller then the
  163. packet. This option allows you to modify the packet to pad the packet back
  164. out to the size stored in the IPv4 header or rewrite the IP header total length
  165. to reflect the stored packet length.
  166. @table @bullet
  167. @item
  168. @var{pad}
  169. Truncated packets will be padded out so that the packet length matches the
  170. IPv4 total length
  171. @item
  172. @var{trunc}
  173. Truncated packets will have their IPv4 total length field rewritten to match
  174. the actual packet length
  175. @item
  176. @var{del}
  177. Delete the packet
  178. EOText;
  179. };
  180. #include plugins/dlt_stub.def