diff options
author | Dmitry Morozovsky <marck@FreeBSD.org> | 2013-10-03 20:46:28 +0000 |
---|---|---|
committer | Dmitry Morozovsky <marck@FreeBSD.org> | 2013-10-03 20:46:28 +0000 |
commit | 11363adf3e9274a9e7baa7c5de28792204753016 (patch) | |
tree | 4ffe1093f8bc4bfce15d36f766a16c89ab88da4d /net-mgmt/ehnt | |
parent | 4274c6514aa62cbdb4c04301a8e05c8e4f88f6ff (diff) | |
download | ports-11363adf3e9274a9e7baa7c5de28792204753016.tar.gz ports-11363adf3e9274a9e7baa7c5de28792204753016.zip |
Notes
Diffstat (limited to 'net-mgmt/ehnt')
-rw-r--r-- | net-mgmt/ehnt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt__display.c | 49 |
2 files changed, 38 insertions, 12 deletions
diff --git a/net-mgmt/ehnt/Makefile b/net-mgmt/ehnt/Makefile index e44c2cf43835..b71c06e2e1c5 100644 --- a/net-mgmt/ehnt/Makefile +++ b/net-mgmt/ehnt/Makefile @@ -19,7 +19,6 @@ PORTDOCS= README MAN1= ehnt.1 MAN8= ehntserv.8 -NO_STAGE= yes post-extract: ${TOUCH} ${WRKSRC}/asnc.txt diff --git a/net-mgmt/ehnt/files/patch-ehnt__display.c b/net-mgmt/ehnt/files/patch-ehnt__display.c index fbe0d7b8a0ca..589de9de1828 100644 --- a/net-mgmt/ehnt/files/patch-ehnt__display.c +++ b/net-mgmt/ehnt/files/patch-ehnt__display.c @@ -3,7 +3,7 @@ $FreeBSD$ --- ehnt_display.c.orig +++ ehnt_display.c -@@ -22,10 +22,10 @@ +@@ -22,15 +22,16 @@ #include "config.h" #include "ehnt.h" @@ -16,9 +16,18 @@ $FreeBSD$ +void ShowTopUdpPort (double a[],char t[], int, double); +void ShowTopTcpPort (double a[],char t[], int, double); double GetTop (double a[], char t[]); - int ShowValue(char *, int, double, int, double); - int ShowReport(struct ehnt_stats *, struct ehnt_struct *); -@@ -110,7 +110,9 @@ +-int ShowValue(char *, int, double, int, double); +-int ShowReport(struct ehnt_stats *, struct ehnt_struct *); ++void ShowValue(char *, int, double, int, double); ++void ShowReport(struct ehnt_stats *, struct ehnt_struct *); ++void ShowReportTimeHeader(struct ehnt_stats *); + +-int ShowReport(struct ehnt_stats * stats, struct ehnt_struct * my_ehnt_struct) { ++void ShowReport(struct ehnt_stats * stats, struct ehnt_struct * my_ehnt_struct) { + struct ehnt_config * e_cfg=my_ehnt_struct->cfg; + struct ehnt_filter * e_flt=my_ehnt_struct->flt; + int report_inout=0; +@@ -110,7 +111,9 @@ ShowReportTimeHeader(stats); if ( ! report_inout ) { @@ -29,7 +38,7 @@ $FreeBSD$ if ( e_cfg->topmode != ETM_PROTO ) { printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); } -@@ -151,8 +153,9 @@ +@@ -151,8 +154,9 @@ printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); } printf("%s",header); @@ -41,7 +50,7 @@ $FreeBSD$ for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2 + 1; i++) { printf("%2d:",i); -@@ -183,8 +186,9 @@ +@@ -183,8 +187,9 @@ } printf("\n"); } @@ -53,7 +62,7 @@ $FreeBSD$ for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2; i++) { printf("%2d:",i); switch (e_cfg->topmode) { -@@ -246,7 +250,7 @@ +@@ -246,7 +251,7 @@ static char str[100]; @@ -62,7 +71,7 @@ $FreeBSD$ if (bytes < 1024) sprintf(str,"%4d", bytes); else if (bytes < (1024*1024)) sprintf(str,"%4dK",(bytes/1024)); -@@ -258,7 +262,7 @@ +@@ -258,7 +263,7 @@ return str; } @@ -71,7 +80,7 @@ $FreeBSD$ int i=-1,maxi=0; struct protoent *p; -@@ -269,7 +273,7 @@ +@@ -269,7 +274,7 @@ ShowValue(ASN_Lookup(maxi),maxi,a[maxi],interval,total); } @@ -80,7 +89,7 @@ $FreeBSD$ int i=-1,maxi=0; struct protoent *p; -@@ -285,7 +289,7 @@ +@@ -285,7 +290,7 @@ } } @@ -89,7 +98,7 @@ $FreeBSD$ int i=-1,maxi=0; struct servent *s; -@@ -301,7 +305,7 @@ +@@ -301,7 +306,7 @@ } } @@ -98,3 +107,21 @@ $FreeBSD$ int i=-1,maxi=0; struct servent *s; +@@ -336,7 +341,7 @@ + return maxi; + } + +-int ShowValue(char * name,int maxi, double val, int interval, double total) { ++void ShowValue(char * name,int maxi, double val, int interval, double total) { + float percent; + + if (maxi >= 0) percent=((val/total)*100); +@@ -351,7 +356,7 @@ + } + } + +-int ShowReportTimeHeader(struct ehnt_stats * stats) { ++void ShowReportTimeHeader(struct ehnt_stats * stats) { + struct tm *tmp_tm; + int in,h,m,s; + char * timestr; |