diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-02-01 21:14:37 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-02-01 21:14:37 +0000 |
commit | 54a0cec780c773071a56dc1ac61fe7bbfe3a0461 (patch) | |
tree | eeec4bc8a48f995e3eff17b1c11ad12e4ee3f0ff /net/trafshow | |
parent | 4d673e066337ea24becb963f7480fe1a937a5c74 (diff) | |
download | ports-54a0cec780c773071a56dc1ac61fe7bbfe3a0461.tar.gz ports-54a0cec780c773071a56dc1ac61fe7bbfe3a0461.zip |
Notes
Diffstat (limited to 'net/trafshow')
-rw-r--r-- | net/trafshow/Makefile | 8 | ||||
-rw-r--r-- | net/trafshow/distinfo | 6 | ||||
-rw-r--r-- | net/trafshow/files/patch-show_dump.c | 31 | ||||
-rw-r--r-- | net/trafshow/files/patch-trafshow.c | 35 |
4 files changed, 65 insertions, 15 deletions
diff --git a/net/trafshow/Makefile b/net/trafshow/Makefile index 26586d4ef158..a707cabce798 100644 --- a/net/trafshow/Makefile +++ b/net/trafshow/Makefile @@ -6,15 +6,13 @@ # PORTNAME= trafshow -PORTVERSION= 5.2.1 -PORTREVISION= 1 +PORTVERSION= 5.2.2 PORTEPOCH= 1 CATEGORIES= net -MASTER_SITES= ${MASTER_SITE_NETBSD} \ - ftp://ftp.nsk.su/pub/RinetSoftware/ +MASTER_SITES= ftp://ftp.nsk.su/pub/RinetSoftware/ EXTRACT_SUFX= .tgz -MAINTAINER= ports@FreeBSD.org +MAINTAINER= jylefort@FreeBSD.org COMMENT= Full screen visualization of network traffic USE_REINPLACE= yes diff --git a/net/trafshow/distinfo b/net/trafshow/distinfo index 48a7b772769e..f24ce555ad45 100644 --- a/net/trafshow/distinfo +++ b/net/trafshow/distinfo @@ -1,3 +1,3 @@ -MD5 (trafshow-5.2.1.tgz) = e3ad2e3f1aac2e1bac9b467df44cf8f0 -SHA256 (trafshow-5.2.1.tgz) = 7aa55cd88fe25b212ef15420fdf4a812d8296f6df3005ea77cde7c6716e9c574 -SIZE (trafshow-5.2.1.tgz) = 123770 +MD5 (trafshow-5.2.2.tgz) = 6fbf6668b87415ff0baa75021204a264 +SHA256 (trafshow-5.2.2.tgz) = 7b6b014d9e67c9a09e66caa002208071d603067782c3b86e1ddb9a6aefe5ff25 +SIZE (trafshow-5.2.2.tgz) = 124191 diff --git a/net/trafshow/files/patch-show_dump.c b/net/trafshow/files/patch-show_dump.c new file mode 100644 index 000000000000..6e7fc4bbfc35 --- /dev/null +++ b/net/trafshow/files/patch-show_dump.c @@ -0,0 +1,31 @@ +--- show_dump.c.orig Mon Jul 12 07:21:09 2004 ++++ show_dump.c Wed Feb 1 18:07:01 2006 +@@ -21,6 +21,7 @@ + #include <sys/param.h> + #include <sys/types.h> + #include <sys/socket.h> ++#include <sys/ioctl.h> + #include <sys/time.h> + #include <netinet/in.h> + #include <arpa/inet.h> +@@ -118,6 +119,7 @@ + bpf_u_int32 net; + bpf_u_int32 mask; + char name[100], buf[256]; ++ u_int v; + + /* sanity check */ + if (!ph || !ns) return -1; +@@ -141,6 +143,12 @@ + if (!live_pcap) return -1; + if (pcap_setnonblock(live_pcap, 1, buf) < 0) { + screen_status("%s: %s", ph->name, buf); ++ show_dump_close(); ++ return -1; ++ } ++ v = 1; ++ if (ioctl(pcap_fileno(live_pcap), BIOCIMMEDIATE, &v) < 0) { ++ screen_status("%s: %s", ph->name, strerror(errno)); + show_dump_close(); + return -1; + } diff --git a/net/trafshow/files/patch-trafshow.c b/net/trafshow/files/patch-trafshow.c index e2db3953903e..a797fa9409fc 100644 --- a/net/trafshow/files/patch-trafshow.c +++ b/net/trafshow/files/patch-trafshow.c @@ -1,11 +1,32 @@ ---- trafshow.c.orig Mon Jul 12 07:20:41 2004 -+++ trafshow.c Mon Nov 7 22:25:56 2005 -@@ -305,7 +305,7 @@ - fprintf(stderr, "%s: %s\n", dp->name, buf); - err++; +--- trafshow.c.orig Sun Jan 8 08:05:29 2006 ++++ trafshow.c Wed Feb 1 18:07:33 2006 +@@ -20,6 +20,7 @@ + #endif + #include <sys/types.h> + #include <sys/socket.h> ++#include <sys/ioctl.h> + #include <stdio.h> + #include <stdlib.h> + #include <signal.h> +@@ -281,6 +282,7 @@ + pcap_t *pd; + PCAP_HANDLER *ph, *ph_prev = 0; + char buf[256]; ++ u_int v; + + if (!ph_list) return -1; + +@@ -307,6 +309,13 @@ } -- if (pcap_setnonblock(pd, 1, buf) < 0) { -+ if (pcap_setnonblock(pd, 0, buf) < 0) { + if (pcap_setnonblock(pd, 1, buf) < 0) { fprintf(stderr, "%s: %s\n", dp->name, buf); ++ pcap_close(pd); ++ err++; ++ continue; ++ } ++ v = 1; ++ if (ioctl(pcap_fileno(pd), BIOCIMMEDIATE, &v) < 0) { ++ fprintf(stderr, "%s: %s\n", dp->name, strerror(errno)); pcap_close(pd); err++; + continue; |