diff options
author | roberto <roberto@FreeBSD.org> | 2002-07-12 21:33:21 +0800 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2002-07-12 21:33:21 +0800 |
commit | b2d9e5d368191759302e6c99d07942c8d8a9dfc8 (patch) | |
tree | a58d58d1144c7acc334a16c9486715acf8c72509 /net-mgmt | |
parent | c6a0277cfdf43e52810d4fe7fdfb0ef3493bd2a4 (diff) | |
download | freebsd-ports-gnome-b2d9e5d368191759302e6c99d07942c8d8a9dfc8.tar.gz freebsd-ports-gnome-b2d9e5d368191759302e6c99d07942c8d8a9dfc8.tar.zst freebsd-ports-gnome-b2d9e5d368191759302e6c99d07942c8d8a9dfc8.zip |
cdpr (Cisco Discovery Protocol Reporter) shows the switch and port that
a machine is connected to, provided that the device supports CDP. It
can also optionally decode the full CDP packet. cdpr was written to
help network/system administrators find out about the equipment that i
a machine is connected to. This is done by capturing and decoding a
Cisco Discovery Protocol (CDP) packet.
PR: ports/40435
Submitted by: Michael L. Hostbaek <mich@freebsdcluster.org>
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/cdpr/Makefile | 32 | ||||
-rw-r--r-- | net-mgmt/cdpr/distinfo | 1 | ||||
-rw-r--r-- | net-mgmt/cdpr/files/patch-aa | 14 | ||||
-rw-r--r-- | net-mgmt/cdpr/files/patch-ab | 11 | ||||
-rw-r--r-- | net-mgmt/cdpr/pkg-comment | 1 | ||||
-rw-r--r-- | net-mgmt/cdpr/pkg-descr | 9 | ||||
-rw-r--r-- | net-mgmt/cdpr/pkg-plist | 3 |
7 files changed, 71 insertions, 0 deletions
diff --git a/net-mgmt/cdpr/Makefile b/net-mgmt/cdpr/Makefile new file mode 100644 index 000000000000..d05c5d822805 --- /dev/null +++ b/net-mgmt/cdpr/Makefile @@ -0,0 +1,32 @@ +# ex:ts=8 +# Ports collection makefile for: cdpr +# Date created: Tue Jul 08, 2002 +# Whom: Michael L. Hostbaek (mich@freebsdcluster.org) +# +# $FreeBSD$ +# + +PORTNAME= cdpr +PORTVERSION= 1.0.2 +CATEGORIES= net +MASTER_SITES= http://www.monkeymental.com/mmfiles/ \ + ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= ${PORTNAME} +EXTRACT_SUFX= .tgz + +MAINTAINER= mich@freebsdcluster.org + +USE_GCC= yes +ALL_TARGET= cdpr + +DOCSDIR?= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME} + +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README +.endif + +.include <bsd.port.mk> diff --git a/net-mgmt/cdpr/distinfo b/net-mgmt/cdpr/distinfo new file mode 100644 index 000000000000..3ae6341f2406 --- /dev/null +++ b/net-mgmt/cdpr/distinfo @@ -0,0 +1 @@ +MD5 (cdpr-1.0.2.tgz) = 1e863e357add0ea4fc5e28f8d151401a diff --git a/net-mgmt/cdpr/files/patch-aa b/net-mgmt/cdpr/files/patch-aa new file mode 100644 index 000000000000..b8a15ef9e223 --- /dev/null +++ b/net-mgmt/cdpr/files/patch-aa @@ -0,0 +1,14 @@ +--- cdpr.c.orig Tue Jul 2 09:18:44 2002 ++++ cdpr.c Wed Jul 3 13:07:38 2002 +@@ -452,7 +452,10 @@ + + /* Get the next packet that comes in, we only need one */ + printf("Waiting for CDP advertisement, default config is to transmit CDP packets every 60 seconds\n"); +- packet = pcap_next(handle, &header); ++ do ++ { ++ packet = pcap_next(handle, &header); ++ } while (!packet); + + /* Print its length */ + if(verbose > 0) diff --git a/net-mgmt/cdpr/files/patch-ab b/net-mgmt/cdpr/files/patch-ab new file mode 100644 index 000000000000..02091fff0929 --- /dev/null +++ b/net-mgmt/cdpr/files/patch-ab @@ -0,0 +1,11 @@ +--- cdpr.c.orig 2002-07-09 21:13:43.000000000 -0700 ++++ cdpr.c 2002-07-09 21:12:33.000000000 -0700 +@@ -437,7 +437,7 @@ + pcap_lookupnet(dev, &net, &mask, errbuf); + + /* Open the pcap device */ +- if((handle = pcap_open_live(dev, BUFSIZ, 1, 0, errbuf)) == NULL) ++ if((handle = pcap_open_live(dev, BUFSIZ, 1, 1, errbuf)) == NULL) + { + printf("Error opening device (%s)\n", errbuf); + exit(1); diff --git a/net-mgmt/cdpr/pkg-comment b/net-mgmt/cdpr/pkg-comment new file mode 100644 index 000000000000..6a1ba91d8881 --- /dev/null +++ b/net-mgmt/cdpr/pkg-comment @@ -0,0 +1 @@ +Cisco Discovery Protocol Reporter diff --git a/net-mgmt/cdpr/pkg-descr b/net-mgmt/cdpr/pkg-descr new file mode 100644 index 000000000000..ce827dc3c673 --- /dev/null +++ b/net-mgmt/cdpr/pkg-descr @@ -0,0 +1,9 @@ +cdpr (Cisco Discovery Protocol Reporter) shows the switch and port that +a machine is connected to, provided that the device supports CDP. It +can also optionally decode the full CDP packet. cdpr was written to +help network/system administrators find out about the equipment that i +a machine is connected to. This is done by capturing and decoding a +Cisco Discovery Protocol (CDP) packet. + + - Michael L. Hostbaek + mich@freebsdcluster.org diff --git a/net-mgmt/cdpr/pkg-plist b/net-mgmt/cdpr/pkg-plist new file mode 100644 index 000000000000..fb3967614e3f --- /dev/null +++ b/net-mgmt/cdpr/pkg-plist @@ -0,0 +1,3 @@ +bin/cdpr +share/doc/cdpr/README +@dirrm share/doc/cdpr |