diff options
author | Sergey A. Osokin <osa@FreeBSD.org> | 2004-06-23 12:01:33 +0000 |
---|---|---|
committer | Sergey A. Osokin <osa@FreeBSD.org> | 2004-06-23 12:01:33 +0000 |
commit | 79c3a398f469d146fb0eedbae6b08cb6a237bb65 (patch) | |
tree | 2291def8660a02a883fa9d8a596b2a831dfe6f50 /net-mgmt | |
parent | d8f20aab80afc033a21b8da1308d8ffffee94231 (diff) | |
download | ports-79c3a398f469d146fb0eedbae6b08cb6a237bb65.tar.gz ports-79c3a398f469d146fb0eedbae6b08cb6a237bb65.zip |
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/ehnt/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt.h | 12 | ||||
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt__display.c | 39 | ||||
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt__processflow.c | 40 |
4 files changed, 85 insertions, 8 deletions
diff --git a/net-mgmt/ehnt/Makefile b/net-mgmt/ehnt/Makefile index 85e353c1bcc5..94a6f8da3b62 100644 --- a/net-mgmt/ehnt/Makefile +++ b/net-mgmt/ehnt/Makefile @@ -7,7 +7,7 @@ PORTNAME= ehnt PORTVERSION= 0.3 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/net-mgmt/ehnt/files/patch-ehnt.h b/net-mgmt/ehnt/files/patch-ehnt.h index 01c7f6df9ae7..d5e9ab288c67 100644 --- a/net-mgmt/ehnt/files/patch-ehnt.h +++ b/net-mgmt/ehnt/files/patch-ehnt.h @@ -2,8 +2,16 @@ $FreeBSD$ --- ehnt.h.orig Thu Oct 4 22:18:29 2001 -+++ ehnt.h Thu May 20 16:07:24 2004 -@@ -93,7 +93,7 @@ ++++ ehnt.h Wed Jun 23 14:35:08 2004 +@@ -59,6 +59,7 @@ + + struct ehnt_stats { + double InBoundTotal, OutBoundTotal; ++ double InBoundTotalPkts, OutBoundTotalPkts; + double *InBoundSrcAS, *InBoundDstAS, *OutBoundSrcAS, *OutBoundDstAS; + double *InBoundProto, *OutBoundProto; + double *InBoundSrcTcpPort, *InBoundDstTcpPort, +@@ -93,7 +94,7 @@ int ProcessFlow(struct flow_ver5_rec *, struct in_addr *, struct ehnt_struct *); int Init_ASN_Lookups(void); char * ASN_Lookup(int); diff --git a/net-mgmt/ehnt/files/patch-ehnt__display.c b/net-mgmt/ehnt/files/patch-ehnt__display.c index a88d33586331..a0af8adcd2d3 100644 --- a/net-mgmt/ehnt/files/patch-ehnt__display.c +++ b/net-mgmt/ehnt/files/patch-ehnt__display.c @@ -2,8 +2,43 @@ $FreeBSD$ --- ehnt_display.c.orig Thu Oct 4 22:18:29 2001 -+++ ehnt_display.c Thu May 20 16:06:07 2004 -@@ -246,7 +246,7 @@ ++++ ehnt_display.c Wed Jun 23 14:35:08 2004 +@@ -110,7 +110,9 @@ + ShowReportTimeHeader(stats); + + if ( ! report_inout ) { +- printf (" Total %10.0fkbits/s\n",stats->InBoundTotal*8/((interval)*1024)); ++ printf (" Total %10.0fkbits/s, %10.0fkpps\n", ++ stats->InBoundTotal*8/((interval)*1024), ++ stats->InBoundTotalPkts/((interval)*1024)); + if ( e_cfg->topmode != ETM_PROTO ) { + printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); + } +@@ -151,8 +153,9 @@ + printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); + } + printf("%s",header); +- printf (" O U T B O U N D (total %.0fkbits/s)\n", +- stats->OutBoundTotal*8/((interval)*1024)); ++ printf (" O U T B O U N D (total %.0fkbits/s, %.0fkpps)\n", ++ stats->OutBoundTotal*8/((interval)*1024), ++ stats->OutBoundTotalPkts/((interval)*1024)); + + for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2 + 1; i++) { + printf("%2d:",i); +@@ -183,8 +186,9 @@ + } + printf("\n"); + } +- printf (" I N B O U N D (total %.0fkbits/s)\n", +- stats->InBoundTotal*8/((interval)*1000)); ++ printf (" I N B O U N D (total %.0fkbits/s, %.0fkpps)\n", ++ stats->InBoundTotal*8/((interval)*1024), ++ stats->InBoundTotalPkts/((interval)*1024)); + for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2; i++) { + printf("%2d:",i); + switch (e_cfg->topmode) { +@@ -246,7 +250,7 @@ static char str[100]; diff --git a/net-mgmt/ehnt/files/patch-ehnt__processflow.c b/net-mgmt/ehnt/files/patch-ehnt__processflow.c index c89c2a046413..d9bd3064e87c 100644 --- a/net-mgmt/ehnt/files/patch-ehnt__processflow.c +++ b/net-mgmt/ehnt/files/patch-ehnt__processflow.c @@ -2,8 +2,33 @@ $FreeBSD$ --- ehnt_processflow.c.orig Thu Oct 4 22:18:29 2001 -+++ ehnt_processflow.c Fri May 21 11:22:02 2004 -@@ -218,7 +218,7 @@ ++++ ehnt_processflow.c Wed Jun 23 14:35:08 2004 +@@ -81,6 +81,8 @@ + /* copy current stats to old stats */ + old_stats->InBoundTotal=stats->InBoundTotal; + old_stats->OutBoundTotal=stats->OutBoundTotal; ++ old_stats->InBoundTotalPkts=stats->InBoundTotalPkts; ++ old_stats->OutBoundTotalPkts=stats->OutBoundTotalPkts; + + old_stats->InBoundSrcAS=stats->InBoundSrcAS; + old_stats->InBoundDstAS=stats->InBoundDstAS; +@@ -126,6 +128,7 @@ + if (e_flt->intnum) { + if (rec->output_index == e_flt->intnum) { + stats->OutBoundTotal+=rec->dOctets; ++ stats->OutBoundTotalPkts+=rec->dPkts; + stats->OutBoundSrcAS[rec->src_as]+=rec->dOctets; + stats->OutBoundDstAS[rec->dst_as]+=rec->dOctets; + stats->OutBoundProto[rec->prot]+=rec->dOctets; +@@ -142,6 +145,7 @@ + we just put everthing in the InBound tables: */ + if ( (! e_flt->intnum) || (rec->input_index == e_flt->intnum) ) { + stats->InBoundTotal+=rec->dOctets; ++ stats->InBoundTotalPkts+=rec->dPkts; + stats->InBoundSrcAS[rec->src_as]+=rec->dOctets; + stats->InBoundDstAS[rec->dst_as]+=rec->dOctets; + stats->InBoundProto[rec->prot]+=rec->dOctets; +@@ -218,7 +222,7 @@ dstip.s_addr=rec->dstaddr; nexthop.s_addr=rec->nexthop; @@ -12,7 +37,7 @@ $FreeBSD$ printf("%d:%s:%d:", rec->input_index, inet_ntoa(srcip), -@@ -228,7 +228,7 @@ +@@ -228,7 +232,7 @@ inet_ntoa(dstip), rec->dstport); @@ -21,3 +46,12 @@ $FreeBSD$ printf("%d:%d\n",rec->src_as,rec->dst_as); if (e_flt->big) { +@@ -289,6 +293,8 @@ + + stats->InBoundTotal=0; + stats->OutBoundTotal=0; ++ stats->InBoundTotalPkts=0; ++ stats->OutBoundTotalPkts=0; + } + + int FreeStats (struct ehnt_stats *stats) { |