View | Details | Raw Unified | Return to bug 67117
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	ehnt
8
PORTNAME=	ehnt
9
PORTVERSION=	0.3
9
PORTVERSION=	0.3
10
PORTREVISION=	5
10
PORTREVISION=	6
11
CATEGORIES=	net-mgmt
11
CATEGORIES=	net-mgmt
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
(-)files/patch-ehnt-lookup (-4 / +21 lines)
Lines 1-8 Link Here
1
--- ehnt_lookup.c.orig	Wed Jul 18 00:47:37 2001
1
2
+++ ehnt_lookup.c	Fri Aug  3 19:54:34 2001
2
$FreeBSD$
3
@@ -36,7 +36,7 @@
3
4
--- ehnt_lookup.c.orig	Thu Oct  4 22:18:29 2001
5
+++ ehnt_lookup.c	Mon May 24 12:01:50 2004
6
@@ -25,7 +25,7 @@
4
 
7
 
5
   memset(ASNs,0,sizeof(ASNs));
8
 
9
 #define ASNCOUNT 65536
10
-char * ASNs[ASNCOUNT];
11
+char ** ASNs;
12
 
13
 int Init_ASN_Lookups(void) {
14
 
15
@@ -34,9 +34,11 @@
16
   int asn;
17
   char line[100],asnname[100];
18
 
19
-  memset(ASNs,0,sizeof(ASNs));
20
+  ASNs = calloc(ASNCOUNT, sizeof(char *));
21
+  if (ASNs == NULL)
22
+    perror("out of memory");
6
 
23
 
7
-  if ( ! (f=fopen ("asnc.txt","r")) ) {
24
-  if ( ! (f=fopen ("asnc.txt","r")) ) {
8
+  if ( ! (f=fopen (ASNCDIR "/asnc.txt","r")) ) {
25
+  if ( ! (f=fopen (ASNCDIR "/asnc.txt","r")) ) {
(-)files/patch-ehnt__client.c (-3 / +23 lines)
Lines 1-9 Link Here
1
1
2
$FreeBSD: ports/net-mgmt/ehnt/files/patch-ehnt__client.c,v 1.1 2002/11/16 14:36:34 edwin Exp $
2
$FreeBSD$
3
3
4
--- ehnt_client.c.orig	Thu Oct  4 22:18:29 2001
4
--- ehnt_client.c.orig	Thu Oct  4 22:18:29 2001
5
+++ ehnt_client.c	Thu Nov 14 22:12:07 2002
5
+++ ehnt_client.c	Mon May 24 11:59:17 2004
6
@@ -89,7 +89,7 @@
6
@@ -69,7 +69,8 @@
7
    printf("Warning: can't catch interrupt signal\n");
8
  }
9
  fflush(stdout);
10
- set_term(SET_TERM_RAW);
11
+ if (e_cfg->mode != EM_COLONDUMP)
12
+   set_term(SET_TERM_RAW);
13
  setbuf(stdout,NULL);
14
 
15
  for ( ; ; ) {
16
@@ -78,7 +79,8 @@
17
    int maxfd=sockfd;
18
    
19
    FD_ZERO(&read_fds);
20
-   FD_SET(STDIN_FILENO,&read_fds);
21
+   if (e_cfg->mode != EM_COLONDUMP)
22
+     FD_SET(STDIN_FILENO,&read_fds);
23
    FD_SET(sockfd,&read_fds);
24
 
25
    fflush(stdout);
26
@@ -89,7 +91,7 @@
7
    if (FD_ISSET(sockfd,&read_fds)) {
27
    if (FD_ISSET(sockfd,&read_fds)) {
8
      ehnt_client_processmessage(sockfd,routeraddr,my_ehnt_struct);
28
      ehnt_client_processmessage(sockfd,routeraddr,my_ehnt_struct);
9
    }
29
    }
(-)files/patch-ehnt__main.c (+28 lines)
Added Link Here
1
2
$FreeBSD$
3
4
--- ehnt_main.c.orig	Thu Oct  4 22:18:29 2001
5
+++ ehnt_main.c	Mon May 24 12:03:14 2004
6
@@ -228,14 +228,15 @@
7
     e_dat.recentmin=(int)(ts->tm_min + (ts->tm_hour*60) + (ts->tm_yday * 60 * 24));
8
   }
9
 
10
-  NewStats(e_dat.stats);
11
-
12
-  Init_ASN_Lookups();
13
+  if (e_cfg.mode != EM_COLONDUMP) {
14
+    NewStats(e_dat.stats);
15
+    Init_ASN_Lookups();
16
 
17
-  /* ehnt_client (in ehnt_client.c) connects to the server, then loops forever, 
18
-     calling ProcessPacket for each incoming flow. */
19
-  printf("Using report interval of %d minute(s)\n",e_cfg.si);
20
-  printf("Starting. Hit '?' for help with keys.\r");
21
+    /* ehnt_client (in ehnt_client.c) connects to the server, then loops forever, 
22
+       calling ProcessPacket for each incoming flow. */
23
+    printf("Using report interval of %d minute(s)\n",e_cfg.si);
24
+    printf("Starting. Hit '?' for help with keys.\r");
25
+  }
26
 
27
   ehnt_client(e_cfg.servername,e_cfg.serverport,&my_ehnt_struct);
28
 }

Return to bug 67117