summaryrefslogtreecommitdiff
path: root/net/tcpflow/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'net/tcpflow/patches/patch-ab')
-rw-r--r--net/tcpflow/patches/patch-ab60
1 files changed, 60 insertions, 0 deletions
diff --git a/net/tcpflow/patches/patch-ab b/net/tcpflow/patches/patch-ab
new file mode 100644
index 00000000000..db1cc8d152f
--- /dev/null
+++ b/net/tcpflow/patches/patch-ab
@@ -0,0 +1,60 @@
+$NetBSD: patch-ab,v 1.1 2006/01/02 19:23:40 adrianp Exp $
+
+--- src/main.c.orig 2003-08-07 08:35:24.000000000 +0100
++++ src/main.c
+@@ -70,7 +70,9 @@ int bytes_per_flow = 0;
+ int max_flows = 0;
+ int max_desired_fds = 0;
+ int console_only = 0;
++int supress_header = 0;
+ int strip_nonprint = 0;
++int use_colour = 0;
+
+ char error[PCAP_ERRBUF_SIZE];
+
+@@ -79,11 +81,13 @@ void print_usage(char *progname)
+ {
+ fprintf(stderr, "%s version %s by Jeremy Elson <jelson@circlemud.org>\n\n",
+ PACKAGE, VERSION);
+- fprintf(stderr, "usage: %s [-chpsv] [-b max_bytes] [-d debug_level] [-f max_fds]\n", progname);
++ fprintf(stderr, "usage: %s [-cCehpsv] [-b max_bytes] [-d debug_level] [-f max_fds]\n", progname);
+ fprintf(stderr, " [-i iface] [-w file] [expression]\n\n");
+ fprintf(stderr, " -b: max number of bytes per flow to save\n");
+ fprintf(stderr, " -c: console print only (don't create files)\n");
++ fprintf(stderr, " -C: console print only, but without the display of source/dest header\n");
+ fprintf(stderr, " -d: debug level; default is %d\n", DEFAULT_DEBUG_LEVEL);
++ fprintf(stderr, " -e: use colours when printing to console\n");
+ fprintf(stderr, " -f: maximum number of file descriptors to use\n");
+ fprintf(stderr, " -h: print this help message\n");
+ fprintf(stderr, " -i: network interface on which to listen\n");
+@@ -124,7 +128,7 @@ int main(int argc, char *argv[])
+
+ opterr = 0;
+
+- while ((arg = getopt(argc, argv, "b:cd:f:hi:pr:sv")) != EOF) {
++ while ((arg = getopt(argc, argv, "b:cCd:ef:hi:pr:sv")) != EOF) {
+ switch (arg) {
+ case 'b':
+ if ((bytes_per_flow = atoi(optarg)) < 0) {
+@@ -134,6 +138,10 @@ int main(int argc, char *argv[])
+ DEBUG(10) ("capturing max of %d bytes per flow", bytes_per_flow);
+ }
+ break;
++ case 'C':
++ supress_header = 1;
++ DEBUG(10) ("packet header dump suppressed");
++ /* fall through */
+ case 'c':
+ console_only = 1;
+ DEBUG(10) ("printing packets to console only");
+@@ -148,6 +156,10 @@ int main(int argc, char *argv[])
+ DEBUG(1) ("warning: -d flag with 0 debug level '%s'", optarg);
+ }
+ break;
++ case 'e':
++ use_colour = 1;
++ DEBUG(10) ("Using colours");
++ break;
+ case 'f':
+ if ((max_desired_fds = atoi(optarg)) < (NUM_RESERVED_FDS + 2)) {
+ DEBUG(1) ("warning: -f flag must be used with argument >= %d",