diff options
author | roberto <roberto@FreeBSD.org> | 2002-07-12 13:33:21 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2002-07-12 13:33:21 +0000 |
commit | b2d9e5d368191759302e6c99d07942c8d8a9dfc8 (patch) | |
tree | a58d58d1144c7acc334a16c9486715acf8c72509 /net/cdpr | |
parent | c6a0277cfdf43e52810d4fe7fdfb0ef3493bd2a4 (diff) | |
download | FreeBSD-ports-b2d9e5d368191759302e6c99d07942c8d8a9dfc8.zip FreeBSD-ports-b2d9e5d368191759302e6c99d07942c8d8a9dfc8.tar.gz |
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/cdpr')
-rw-r--r-- | net/cdpr/Makefile | 32 | ||||
-rw-r--r-- | net/cdpr/distinfo | 1 | ||||
-rw-r--r-- | net/cdpr/files/patch-aa | 14 | ||||
-rw-r--r-- | net/cdpr/files/patch-ab | 11 | ||||
-rw-r--r-- | net/cdpr/pkg-comment | 1 | ||||
-rw-r--r-- | net/cdpr/pkg-descr | 9 | ||||
-rw-r--r-- | net/cdpr/pkg-plist | 3 |
7 files changed, 71 insertions, 0 deletions
diff --git a/net/cdpr/Makefile b/net/cdpr/Makefile new file mode 100644 index 0000000..d05c5d8 --- /dev/null +++ b/net/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/cdpr/distinfo b/net/cdpr/distinfo new file mode 100644 index 0000000..3ae6341 --- /dev/null +++ b/net/cdpr/distinfo @@ -0,0 +1 @@ +MD5 (cdpr-1.0.2.tgz) = 1e863e357add0ea4fc5e28f8d151401a diff --git a/net/cdpr/files/patch-aa b/net/cdpr/files/patch-aa new file mode 100644 index 0000000..b8a15ef --- /dev/null +++ b/net/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/cdpr/files/patch-ab b/net/cdpr/files/patch-ab new file mode 100644 index 0000000..02091ff --- /dev/null +++ b/net/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/cdpr/pkg-comment b/net/cdpr/pkg-comment new file mode 100644 index 0000000..6a1ba91 --- /dev/null +++ b/net/cdpr/pkg-comment @@ -0,0 +1 @@ +Cisco Discovery Protocol Reporter diff --git a/net/cdpr/pkg-descr b/net/cdpr/pkg-descr new file mode 100644 index 0000000..ce827dc --- /dev/null +++ b/net/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/cdpr/pkg-plist b/net/cdpr/pkg-plist new file mode 100644 index 0000000..fb39676 --- /dev/null +++ b/net/cdpr/pkg-plist @@ -0,0 +1,3 @@ +bin/cdpr +share/doc/cdpr/README +@dirrm share/doc/cdpr |