tcpedit_opts.def 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. descrip = "Rewrite IP addresses using pseudo-NAT";
  42. doc = <<- EOText
  43. Takes a comma delimited series of colon delimited CIDR
  44. netblock pairs. Each netblock pair is evaluated in order against
  45. the IP addresses. If the IP address in the packet matches the
  46. first netblock, it is rewriten using the second netblock as a
  47. mask against the high order bits.
  48. Example:
  49. @example
  50. --pnat=192.168.0.0/16:10.77.0.0/16,172.16.0.0/12:10.1.0.0/24
  51. @end example
  52. EOText;
  53. };
  54. flag = {
  55. ifdef = HAVE_CACHEFILE_SUPPORT;
  56. name = endpoints;
  57. value = e;
  58. arg-type = string;
  59. max = 1;
  60. flags-must = cachefile;
  61. descrip = "Rewrite IP addresses to be between two endpoints";
  62. doc = <<- EOText
  63. Takes a pair of colon delimited IP addresses which will be used to rewrite
  64. all traffic to appear to be between the two IP's.
  65. Example:
  66. @example
  67. --endpoints=172.16.0.1:172.16.0.2
  68. @end example
  69. EOText;
  70. };
  71. flag = {
  72. name = skipbroadcast;
  73. value = b;
  74. descrip = "Skip rewriting broadcast/multicast IP's";
  75. doc = <<- EOText
  76. By default --seed, --pnat and --endpoints will rewrite
  77. broadcast and multicast IP and MAC addresses. Setting this flag
  78. will keep broadcast/multicast IP and MAC addresses from being rewritten.
  79. EOText;
  80. };
  81. flag = {
  82. name = fixcsum;
  83. value = C;
  84. descrip = "Force recalculation of IP/TCP/UDP checksums";
  85. doc = <<- EOText
  86. Causes each IP packet to have it's checksums recalcualted and
  87. fixed. Automatically enabled for packets modified with @samp{--seed},
  88. @samp{--pnat}, @samp{--endpoints} or @samp{--fixlen}.
  89. EOText;
  90. };
  91. flag = {
  92. name = mtu;
  93. value = m;
  94. arg-type = number;
  95. max = 1;
  96. arg-range = "1->MAXPACKET";
  97. default = DEFAULT_MTU;
  98. descrip = "Override default MTU length (1500 bytes)";
  99. doc = <<- EOText
  100. Override the default 1500 byte MTU size for determining the maximum padding length.
  101. EOText;
  102. };
  103. flag = {
  104. name = efcs;
  105. value = E;
  106. descrip = "Remove Ethernet checksums (FCS) from end of frames";
  107. doc = <<- EOText
  108. Note, this option is pretty dangerous! We don't actually check to see if a FCS
  109. actually exists in the frame, we just blindly delete the last two bytes. Hence,
  110. you should only use this if you know know that your OS provides the FCS when
  111. reading raw packets.
  112. EOText;
  113. };
  114. flag = {
  115. name = fixlen;
  116. value = F;
  117. arg-type = string;
  118. descrip = "Pad or truncate packet data to match header length";
  119. max = 1;
  120. doc = <<- EOText
  121. Packets may be truncated during capture if the snaplen is smaller then the
  122. packet. This option allows you to modify the packet to pad the packet back
  123. out to the size stored in the IPv4 header or rewrite the IP header total length
  124. to reflect the stored packet length.
  125. @table @bullet
  126. @item
  127. @var{pad}
  128. Truncated packets will be padded out so that the packet length matches the
  129. IPv4 total length
  130. @item
  131. @var{trunc}
  132. Truncated packets will have their IPv4 total length field rewritten to match
  133. the actual packet length
  134. @item
  135. @var{del}
  136. Delete the packet
  137. EOText;
  138. };
  139. #include plugins/dlt_stub.def