pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/ntop1 net/ntop renamed to net/ntop1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5fbe9731c115
branches:  trunk
changeset: 486974:5fbe9731c115
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu Jan 06 11:44:16 2005 +0000

description:
net/ntop renamed to net/ntop1

diffstat:

 net/ntop1/DESCR            |   10 ++++
 net/ntop1/Makefile         |   22 +++++++++
 net/ntop1/PLIST            |    3 +
 net/ntop1/distinfo         |    8 +++
 net/ntop1/patches/patch-aa |   22 +++++++++
 net/ntop1/patches/patch-ab |  108 +++++++++++++++++++++++++++++++++++++++++++++
 net/ntop1/patches/patch-ac |   28 +++++++++++
 net/ntop1/patches/patch-ad |   80 +++++++++++++++++++++++++++++++++
 8 files changed, 281 insertions(+), 0 deletions(-)

diffs (truncated from 313 to 300 lines):

diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/DESCR   Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,10 @@
+ntop is a tool that shows the network usage, similar to what the
+popular top Unix command does. ntop has been written in a portable
+way in order to virtually run on every Unix platform.
+
+ntop can be used in both interactive or web mode. In the first case,
+ntop displays the network status on the user's terminal whereas in
+web mode a web browser (e.g. netscape) can attach to ntop (that acts
+as a web server) and get a dump of the network status. In the latter
+case, ntop can be seen as a simple RMON-like agent with an embedded
+web interface.
diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/Makefile        Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/01/06 11:44:16 adam Exp $
+
+DISTNAME=              ntop-1.1
+PKGREVISION=           4
+CATEGORIES=            net
+MASTER_SITES=          ftp://ftp.unipi.it/pub/local/ntop/source/
+EXTRACT_SUFX=          -src.tar.gz
+
+MAINTAINER=            kim%tac.nyc.ny.us@localhost
+HOMEPAGE=              http://www.ntop.org/
+COMMENT=               Shows network usage (similar to "top" for processes)
+
+USE_BUILDLINK3=                yes
+GNU_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --enable-threads=no
+
+INSTALL_TARGET=                install install-man
+
+.include "../../net/libpcap/buildlink3.mk"
+.include "../../devel/ncurses/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/PLIST   Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/01/06 11:44:16 adam Exp $
+sbin/ntop
+man/man8/ntop.8
diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/distinfo        Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2005/01/06 11:44:16 adam Exp $
+
+SHA1 (ntop-1.1-src.tar.gz) = b244f025709cfcdae14d59e78778e2daf2e7bc55
+Size (ntop-1.1-src.tar.gz) = 220950 bytes
+SHA1 (patch-aa) = 1d9002e962061ddc174cb0f904f868ca91070465
+SHA1 (patch-ab) = f0d6be0bde866803f25da5ace473e244514e3d14
+SHA1 (patch-ac) = 1f32b536470e77bf6e029d0933bb375c1b08aee0
+SHA1 (patch-ad) = b2ef6583696880a55888a549ad5d4a7d3c8d49c0
diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/patches/patch-aa        Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/01/06 11:44:16 adam Exp $
+
+--- Makefile.in.orig   Mon May  3 09:03:10 1999
++++ Makefile.in
+@@ -54,7 +54,7 @@
+ DEFS = @DEFS@
+ 
+ # Standard CFLAGS
+-CFLAGS = $(CCOPT) $(DEFS) @G_THREAD_CFLAGS@ @LSOF_DEFS@ @OS_DEFS@ $(INCLS) 
++CFLAGS = $(CCOPT) $(DEFS) @G_THREAD_CFLAGS@ @LSOF_DEFS@ @OS_DEFS@ $(INCLS) $(CPPFLAGS)
+ 
+ # Standard LDFLAGS
+ LDFLAGS = @LDFLAGS@
+@@ -105,7 +105,7 @@
+ report.c: ntop.h
+ 
+ install:
+-      $(INSTALL) -m 6550 $(PROG) $(DESTDIR)$(BINDEST)/$(PROG)
++      $(INSTALL) -m 555 $(PROG) $(DESTDIR)$(BINDEST)/$(PROG)
+ 
+ install-man:
+       $(INSTALL) -m 444 $(PROG).8 $(DESTDIR)$(MANDEST)/man8/$(PROG).8
diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/patches/patch-ab        Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,108 @@
+$NetBSD: patch-ab,v 1.1.1.1 2005/01/06 11:44:16 adam Exp $
+
+--- ntop.c.orig        Wed Apr 28 19:49:00 1999
++++ ntop.c
+@@ -254,7 +254,7 @@
+   initIPServices();
+ 
+ #ifndef WIN32
+-  while ((op = getopt(argc, argv, "df:F:hr:i:p:l:nw:m:")) != EOF)
++  while ((op = getopt(argc, argv, "df:F:hr:i:p:l:nm:")) != EOF)
+     switch (op) {
+ 
+ #ifndef WIN32
+@@ -324,6 +324,7 @@
+       numericFlag++;
+       break;
+ 
++#if 0
+     case 'w':
+       if(!isdigit(optarg[0])) {
+       printf("FATAL ERROR: flag -w expects a numeric argument.\n");
+@@ -332,6 +333,7 @@
+       webMode++;
+       webPort = atoi(optarg);
+       break;
++#endif
+ 
+     default:
+       usage(0);
+@@ -348,11 +350,6 @@
+ #endif
+ 
+ #ifndef WIN32
+-  if((rFileName == NULL) && (getuid () && geteuid ()) || setuid (0)) {
+-    printf("Sorry, you must be superuser in order to run ntop.\n");
+-    return(-1);
+-  }
+-  
+   if(daemonMode && (!webMode)) {
+     printf("WARNING: -d is incompatible with interactive mode.\n");
+   } else if(daemonMode)
+@@ -392,13 +389,30 @@
+ #ifndef WIN32
+   /* Determine the device name if not specified */
+   if (device == NULL && (device = pcap_lookupdev(ebuf)) == NULL) {
+-    printf(ebuf);
++    printf("%s\n", ebuf);
+     return(-1);
+   }
+ 
+   getLocalHostAddress(&localHostAddress, device);
+ 
+   if(rFileName == NULL) {
++    /* Fire up libpcap */
++    pcapPtr = pcap_open_live(device, DEFAULT_SNAPLEN, !pflag, 1000, ebuf);
++  } else {
++    pcapPtr = pcap_open_offline(rFileName, ebuf);
++  }
++
++  if (pcapPtr == NULL) {
++    printf("%s\n", ebuf);
++    return(-1);
++  }
++
++  if (pcap_lookupnet(device, &localnet, &netmask, ebuf) < 0) {
++    printf("%s\n", ebuf);
++    return(-1);
++  }
++
++  if(rFileName == NULL) {
+     if(webMode) {
+       (void)fprintf(stderr, "ntop v.%s %s [%s]"
+ #ifndef WIN32
+@@ -418,21 +432,6 @@
+       init_curses();
+     }
+ #endif
+-
+-    /* Fire up libpcap */
+-    pcapPtr = pcap_open_live(device, DEFAULT_SNAPLEN, !pflag, 1000, ebuf);
+-  } else {
+-    pcapPtr = pcap_open_offline(rFileName, ebuf);
+-  }
+-
+-  if (pcapPtr == NULL) {
+-    printf(ebuf);
+-    return(-1);
+-  }
+-
+-  if (pcap_lookupnet(device, &localnet, &netmask, ebuf) < 0) {
+-    printf(ebuf);
+-    return(-1);
+   }
+ #else /* WIN32 */
+   printf("ntop v.%s %s [%s]"
+@@ -458,12 +457,6 @@
+     free(localAddresses);
+     localAddresses = NULL;
+   }
+-
+-#ifndef WIN32
+-  /* Now that the socket is open, throw away potential setuid/setgid */
+-  (void)setgid(getgid());
+-  (void)setuid(getuid());
+-#endif
+ 
+ #ifndef WIN32
+   /* get datalink type */
diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/patches/patch-ac        Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-ac,v 1.1.1.1 2005/01/06 11:44:16 adam Exp $
+
+--- pbuf.c.orig        Mon May  3 17:43:09 1999
++++ pbuf.c
+@@ -843,20 +843,18 @@
+ 
+ int checkKeyPressed() {
+   int theChar = getch();
+-  unsigned char in_char;
+   int rc = 1, numScreens; 
+ 
+-  if((theChar != EOF) 
+-     && ((in_char = (unsigned char)theChar)) != 255) {
++  if((theChar != EOF) && (theChar != ERR)) {
+   
+     /*
+       char buf[32];
+ 
+-      sprintf(buf, ">%c-%d<", in_char, in_char);
++      sprintf(buf, ">%c-%d<", theChar, theChar);
+       mvprintw(0, 40, buf); refresh();
+       sleep(2);
+     */
+-    switch(in_char) {
++    switch(theChar) {
+     case 'q':
+     case 'Q':
+       cleanup(-1);
diff -r 315f0d925baa -r 5fbe9731c115 net/ntop1/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ntop1/patches/patch-ad        Thu Jan 06 11:44:16 2005 +0000
@@ -0,0 +1,80 @@
+$NetBSD: patch-ad,v 1.1.1.1 2005/01/06 11:44:17 adam Exp $
+
+--- ntop.8.orig        1999-04-13 10:20:11.000000000 +0200
++++ ntop.8
+@@ -19,8 +19,6 @@ ntop \- display top network users
+ .IR "IP protocols to monitor" ]
+ .RB [ -i 
+ .IR interface ]
+-.RB [ -w 
+-.IR port ]
+ .RB [ -d ]
+ .RB [ -m 
+ .IR "local subnet" ]
+@@ -34,12 +32,7 @@ ntop \- display top network users
+ shows the current network usage. It displays a list of hosts that are
+ currently using the network and reports information concerning the (IP and non-IP) 
+ traffic generated by each host. 
+-.B ntop
+-can be started either in a terminal window (interactive mode) or in
+-web mode. In the latter case, a web browser is needed to use the
+-program. The traffic is sorted according to the host and the protocol. Whenever
+-.B ntop
+-is started in web mode (-w flag), multiple remote users can access the traffic information. See below for more information.
++The traffic is sorted according to the host and the protocol.
+ .PP
+ .SH "COMMAND\-LINE OPTIONS"
+ .It -r
+@@ -77,28 +70,10 @@ Specifies the network interface used by
+ .
+ 
+ .It -w 
+-Starts
+-.B ntop
+-in web mode. Users can attach their web browsers to the specified port and browse 
+-traffic information remotely. Supposing to start
+-.B ntop
+-at the port 3000 (ntop -w 3000), the URL to access is
+-http://hostname:3000/. The file ~/.ntop specifies the HTTP
+-user/password of those people who are allowed to access ntop. If the
+-~/.ntop file is missing no security will be used hence everyone can
+-access traffic information. A simple .ntop file is the following:
+-.
+-#
+-# .ntop File format
+-#
+-# user<tab>/<space>pw
+-#
+-#
+-luca          linux
+-.
+-Please note that an HTTP server is NOT
+-needed in order to use the program in interactive mode.
+-.
++Is disabled in this version of ntop for security reasons.
++See
++.B http://www.securityfocus.com/advisories/2520
++for details.
+ 
+ .It -d
+ This flag (it has to be used with -w) causes ntop to become a daemon, i.e. it is started in background and detached from the terminal.
+@@ -185,12 +160,6 @@ three 
+ columns are toggled. Please note that these columns represent either
+ the traffic sent or received, according to the the way the list is sorted (see previous
+ command).
+-
+-.SH "WEB VIEWS (Web mode)"
+-While



Home | Main Index | Thread Index | Old Index