diff options
author | Ollivier Robert <roberto@FreeBSD.org> | 2002-07-12 21:33:21 +0800 |
---|---|---|
committer | Ollivier Robert <roberto@FreeBSD.org> | 2002-07-12 21:33:21 +0800 |
commit | 557179b1eecabc3731707d7ce1487026ba132cde (patch) | |
tree | 2daf09ea411daeadd9ae90200585a9e0e69e5e6d /net-mgmt/cdpr/files | |
parent | c8aea9df87aa6d6459b46594373cae0e0ae144bf (diff) | |
download | freebsd-ports-gnome-557179b1eecabc3731707d7ce1487026ba132cde.tar.gz freebsd-ports-gnome-557179b1eecabc3731707d7ce1487026ba132cde.tar.zst freebsd-ports-gnome-557179b1eecabc3731707d7ce1487026ba132cde.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/cdpr/files')
-rw-r--r-- | net-mgmt/cdpr/files/patch-aa | 14 | ||||
-rw-r--r-- | net-mgmt/cdpr/files/patch-ab | 11 |
2 files changed, 25 insertions, 0 deletions
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); |