debian/0000755000000000000000000000000011624263616007175 5ustar debian/compat0000644000000000000000000000000211624263246010372 0ustar 8 debian/watch0000644000000000000000000000015311624263246010224 0ustar # format version number, currently 3; this line is compulsory! version=3 http://sf.net/cdpr/cdpr-(.+)\.tgz debian/cdpr.examples0000644000000000000000000000002011624263246011654 0ustar cdpr.conf cdprs debian/rules0000755000000000000000000000034411624263246010255 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_install: make install prefix=/usr DESTDIR=$(CURDIR)/debian/cdpr override_dh_installchangelogs: dh_installchangelogs README override_dh_installman: dh_installman debian/cdpr.8 debian/control0000644000000000000000000000135311624263510010573 0ustar Source: cdpr Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Matt Zagrabelny Section: net Priority: extra Build-Depends: debhelper (>= 8.0.0), libpcap0.8-dev (>= 1.0.0) Standards-Version: 3.9.2 Vcs-git: git://git.debian.org/git/collab-maint/cdpr Vcs-Browser: http://git.debian.org/?p=collab-maint/cdpr.git Homepage: http://cdpr.sourceforge.net/ Package: cdpr Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Cisco Discovery Protocol Reporter cdpr listens on specified network interfaces for Cisco Discovery Protocol packets. It then decodes those packets and outputs the information, optionally sending the information to a server for processing. debian/source/0000755000000000000000000000000011624263577010503 5ustar debian/source/format0000644000000000000000000000001411624263246011702 0ustar 3.0 (quilt) debian/cdpr.80000644000000000000000000000306311624263246010217 0ustar .\" Process this file with .\" groff -man -Tascii foo.1 .\" .TH CDPR 8 "APRIL 2009" "User Manuals" .SH NAME cdpr \- Cisco Discovery Protocol Reporter .SH SYNOPSIS .B cdpr [-h] [-t .I seconds .B ] .B [-d .I device .B | .B -r .I pcap-file .B ] .B [-u .I server-config-file .B ] .B [-l .I location .B ] .B [-n .I hostname .B ] .B [-s .I server .B ] .B [-p .I script-path .B ] .SH DESCRIPTION .B cdpr listens on specified network interfaces for Cisco Discovery Protocol packets. It then decodes those packets and outputs the information, optionally sending the information to a server for processing. .SH OPTIONS .IP "-d device" Specify device to use (eth0, hme0, etc.) .IP "-r pcap-file" Specify file to read from instead of network device. .IP "-h" Print the usage. .IP "-t seconds" Time in seconds to abort waiting for a packet (should be > 60) .IP -v[vv] Set verbose mode. .IP "-u server-config-file" Send cdpr information to a cdpr server. See /usr/share/doc/cdpr/README.cdprs .IP "-l location" Location/description of this port; for use with -u or -s and -p. .IP "-n hostname" Override the hostname reported to the server; for use with -u or -s and -p. .IP "-s server" Server to send information to, specify port with a: after server/IP. Example: 192.168.1.20:88 (default: 80) requires -p (overridden by -u) .IP "-p script-path" Path of server script to send data to; requires -s (overridden by -u) .SH AUTHOR Lance O'Connor This manual page was written by Matt Zagrabelny , for the Debian system (but may be used by others). debian/copyright0000644000000000000000000000143411624263246011131 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 Upstream-Name: cdpr Upstream-Contact: Lance O'Connor Source: http://www.monkeymental.com/ License: GPL-2+ Files: * Copyright: Copyright 2002-2010, MonkeyMental.com License: GPL-2+ Files: debian/* Copyright: Copyright 2009-2011, Matt Zagrabelny License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2' debian/patches/0000755000000000000000000000000011624263577010632 5ustar debian/patches/0003-fix-as-needed-build.patch0000644000000000000000000000175511624263510015734 0ustar Description: fix build with ld --as-needed when building with ld --as-needed libraries must be placed after object files needing them on the command line so the symbols of the libraries are registered as needed. Author: Julian Taylor Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cdpr/+bug/803174 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632665 --- cdpr-2.4.orig/Makefile +++ cdpr-2.4/Makefile @@ -16,7 +16,7 @@ CFLAGS = -Wall -W -O2 # Build for Solaris with the pcap headers/libs one dir up #CFLAGS = -DSOLARIS -Wall -I. -I../libpcap-0.7.1 -L../libpcap-0.7.1 -ggdb -LDFLAGS = -lpcap +LIBS = -lpcap # Build for Solaris #LDFLAGS = -lsocket -lnsl -lpcap @@ -33,7 +33,7 @@ conffile.o: conffile.c cdp.h cdpr.h gcc -c $(CFLAGS) conffile.c cdpr: cdpr.o cdprs.o conffile.o - gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o + gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o $(LIBS) install: all mkdir -p $(DESTDIR)$(prefix)/sbin/ debian/patches/0001-Spruced-up-Makefile.patch0000644000000000000000000000236111624263246015766 0ustar From: Matt Zagrabelny Date: Thu, 5 May 2011 17:25:56 -0500 Subject: Spruced up Makefile Created targets to allow building of Debian package. --- Makefile | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d3b65e8..e943a8a 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +#!/usr/bin/make -f + +prefix ?= /usr/local + # Seems that RedHat keeps the pcap headers elsewhere... # Uncomment the below line for RH systems. #CFLAGS=-Wall -ggdb -lpcap -I/usr/include/pcap @@ -17,9 +21,27 @@ LDFLAGS = -lpcap # Build for Solaris #LDFLAGS = -lsocket -lnsl -lpcap -cdpr: cdpr.c cdprs.c conffile.c cdp.h cdpr.h - gcc $(CFLAGS) cdpr.c cdprs.c conffile.c $(LDFLAGS) -o cdpr +all: cdpr + +cdpr.o: cdpr.c cdp.h cdpr.h + gcc -c $(CFLAGS) cdpr.c + +cdprs.o: cdprs.c cdp.h cdpr.h + gcc -c $(CFLAGS) cdprs.c + +conffile.o: conffile.c cdp.h cdpr.h + gcc -c $(CFLAGS) conffile.c + +cdpr: cdpr.o cdprs.o conffile.o + gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o + +install: all + mkdir -p $(DESTDIR)$(prefix)/sbin/ + install --mode=755 cdpr $(DESTDIR)$(prefix)/sbin/cdpr clean: - rm -f cdpr + rm -f *.o cdpr + +distclean: clean +.PHONY: all install clean distclean -- debian/patches/0002-remove-pseudo-device-all-from-list-of-interfaces.patch0000644000000000000000000000235711624263246023464 0ustar From: Matt Zagrabelny Date: Mon, 9 May 2011 15:07:37 -0500 Subject: remove pseudo-device "all" from list of interfaces The current pcap filter does not work with the "all" interface, therefore I am removing it. It should also close Debian bug #527245. --- cdpr.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/cdpr.c b/cdpr.c index 9361bd4..02785fe 100644 --- a/cdpr.c +++ b/cdpr.c @@ -640,11 +640,14 @@ main(int argc, char *argv[]) /* Print the list */ for(d=alldevs; d; d=d->next) { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); + if (strcmp(d->name, "any") != 0) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } } if(i==0) @@ -665,9 +668,13 @@ main(int argc, char *argv[]) } /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++) + for(d=alldevs, i=0; d; d=d->next) { - ; + if (strcmp(d->name, "any") != 0) + { + i++; + if (i == inum) break; + } } dev = d->name; -- debian/patches/series0000644000000000000000000000017211624263510012032 0ustar 0001-Spruced-up-Makefile.patch 0002-remove-pseudo-device-all-from-list-of-interfaces.patch 0003-fix-as-needed-build.patch debian/cdpr.docs0000644000000000000000000000001511624263246010772 0ustar README.cdprs debian/changelog0000644000000000000000000000333011624263510011037 0ustar cdpr (2.4-1ubuntu1) oneiric; urgency=low * debian/patches/0003-fix-as-needed-build.patch: - fix build with ld --as-needed (LP: #803174) -- Julian Taylor Sun, 21 Aug 2011 16:25:51 +0200 cdpr (2.4-1) unstable; urgency=low * New upstream release, closes: #570916 * Bumped Standards-Version to 3.9.2 * Added ${misc:Depends} to binary depends * Added a Homepage entry to the source fields * Checked cdpr into git * Upstream fixed blocking interface, closes: #566983 * Added in patch to remove pseudo device "any" from list of interfaces, closes: #527245 * Updated man page. '--help' and '-?' are invalid options and hence removed * Updated man page. Added '-r' for read a pcap-file * Updated copyright file to use http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 * Added watch file * Added perl cgi and php server examples * Added example cdpr config file, for server usage * Bumped debhelper compat to v8 -- Matt Zagrabelny Thu, 05 May 2011 17:42:51 -0500 cdpr (2.2.1-1) unstable; urgency=low * New upstream release * Make sure all content gets installed when building only the binary-arch target, closes: #393550 * Cleaned up manpage * Added upstream changelog -- Matt Zagrabelny Thu, 19 Oct 2006 10:33:24 -0500 cdpr (2.2.0-2) unstable; urgency=low * Initial release, closes: Bug#338153 * Updated 'Standards-Version' to 3.7.2 in debian/control. * Cleaned up debian/rules file. -- Matt Zagrabelny Thu, 25 May 2006 12:40:20 -0600 cdpr (2.2.0-1) unstable; urgency=low * Initial release. -- Matt Zagrabelny Thu, 3 Nov 2005 08:06:20 -0600