Index: head/net-mgmt/rate/Makefile =================================================================== --- head/net-mgmt/rate/Makefile (revision 407635) +++ head/net-mgmt/rate/Makefile (revision 407636) @@ -1,22 +1,26 @@ # Created by: mich@FreeBSD.org # $FreeBSD$ PORTNAME= rate PORTVERSION= 0.9 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= http://s-tech.elsat.net.pl/bmtools/ MAINTAINER= mich@FreeBSD.org COMMENT= Traffic analysis command-line utility + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" LDFLAGS+= -lcompat CFLAGS+= -DOPEN_BSD=1 -DHAVE_REGEX -DSTREAM_ANALYZER -DIOCTL_GETWINSIZE -DAUTOSENSE_DLH PLIST_FILES= bin/rate man/man1/rate.1.gz do-install: ${INSTALL_SCRIPT} ${WRKSRC}/rate ${STAGEDIR}${PREFIX}/bin/rate ${INSTALL_MAN} ${WRKSRC}/doc/rate.1 ${STAGEDIR}${MANPREFIX}/man/man1 .include Index: head/net-mgmt/rate/files/patch-rate.c =================================================================== --- head/net-mgmt/rate/files/patch-rate.c (revision 407635) +++ head/net-mgmt/rate/files/patch-rate.c (revision 407636) @@ -1,44 +1,44 @@ ---- rate.c.orig +--- rate.c.orig 2003-08-20 15:22:28 UTC +++ rate.c -@@ -74,6 +74,7 @@ +@@ -74,6 +74,7 @@ int opt_separator = 0; int opt_cls = 0; int opt_dns = 1; int opt_cols = 80; +int opt_promisc = 0; #ifdef HAVE_REGEX char * opt_regex = NULL; -@@ -214,6 +215,7 @@ +@@ -214,6 +215,7 @@ void help(unsigned char * name) printf(" -p Datalink layer header size (gets substracted from each packet size, default: 14)\n"); printf(" -s Capture l bytes (default: 40)\n"); printf(" -i Bind to interface - default eth0\n"); + printf(" -P Bring the interface into promiscuous mode\n"); printf(" -n Numeric IPs. Don't do reverse DNS lookups.\n"); printf(" -c Use colors (ANSI-compatible) whenever possible.\n"); printf(" -v Print exact values, do not use SI prefixes.\n"); -@@ -264,7 +266,7 @@ +@@ -264,7 +266,7 @@ int main(int argc, char ** argv) } } - while((c = getopt(argc, argv, "?hr:q:f:p:s:i:S:x:0:glkcvwenRATE")) != EOF) + while((c = getopt(argc, argv, "?hr:q:f:p:s:i:P:S:x:0:glkcvwenRATE")) != EOF) { if(c == 'R' || c == 'A' || c == 'T' || c == 'E') break; -@@ -284,6 +286,7 @@ +@@ -284,6 +286,7 @@ int main(int argc, char ** argv) case 'k': opt_onkeyboard = 1; break; case 'c': opt_color = 1; break; case 'v': opt_human = 0; break; + case 'P': opt_promisc = 1; break; case 'e': opt_separator = 1; break; case 'w': opt_cls = 1; break; case 'n': opt_dns = 0; break; -@@ -311,7 +314,7 @@ +@@ -311,7 +314,7 @@ int main(int argc, char ** argv) } } - if((handle = pcap_open_live(interface, 2048, -1, 50, ebuff))==NULL) + if((handle = pcap_open_live(interface, 2048, opt_promisc, 50, ebuff))==NULL) { fprintf(stderr, "pcap_open_live(): %s\n", ebuff); return(0); Index: head/net-mgmt/rate/files/patch-streamstat.c =================================================================== --- head/net-mgmt/rate/files/patch-streamstat.c (nonexistent) +++ head/net-mgmt/rate/files/patch-streamstat.c (revision 407636) @@ -0,0 +1,10 @@ +--- streamstat.c.orig 2016-01-15 08:36:19 UTC ++++ streamstat.c +@@ -282,6 +282,7 @@ char * customize_format(int cols, int ou + { + static char fmtstring[256]; + int n = (cols - outlen - 1) / 2; ++ if (n < 15) n = 15; /* minimum required chars for IPv4 */ + snprintf(fmtstring, 256, fmt, n, n, n, n); + return(fmtstring); + } Property changes on: head/net-mgmt/rate/files/patch-streamstat.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property