summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-mgmt/Makefile1
-rw-r--r--net-mgmt/cdpsnarf/Makefile27
-rw-r--r--net-mgmt/cdpsnarf/distinfo2
-rw-r--r--net-mgmt/cdpsnarf/files/patch-cdpsnarf.c14
-rw-r--r--net-mgmt/cdpsnarf/pkg-descr24
-rw-r--r--net-mgmt/cdpsnarf/pkg-plist2
6 files changed, 70 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index d9678efc474a..fb9ab1249db4 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -28,6 +28,7 @@
SUBDIR += ccnet
SUBDIR += cdpd
SUBDIR += cdpr
+ SUBDIR += cdpsnarf
SUBDIR += centreon-clib
SUBDIR += check_ipmi_sensor
SUBDIR += check_logfiles
diff --git a/net-mgmt/cdpsnarf/Makefile b/net-mgmt/cdpsnarf/Makefile
new file mode 100644
index 000000000000..09008a8f4ee0
--- /dev/null
+++ b/net-mgmt/cdpsnarf/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME= cdpsnarf
+PORTVERSION= 0.1.6
+DISTVERSIONPREFIX= v
+CATEGORIES= net-mgmt
+MASTER_SITES= GH
+
+MAINTAINER= rihaz.jerrin@gmail.com
+COMMENT= Tool to extract information from CDP packets
+
+LICENSE= GPLv2
+
+LIB_DEPENDS= libpcap.so:${PORTSDIR}/net/libpcap
+
+USE_GITHUB= yes
+GH_ACCOUNT= Zapotek
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|gcc|cc|' ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/cdpsnarf/distinfo b/net-mgmt/cdpsnarf/distinfo
new file mode 100644
index 000000000000..3f97b0ee2090
--- /dev/null
+++ b/net-mgmt/cdpsnarf/distinfo
@@ -0,0 +1,2 @@
+SHA256 (Zapotek-cdpsnarf-v0.1.6_GH0.tar.gz) = 0e170c5d3e849c3a51d04005421ae2a1f367ccef0dae32a547d1dd8e33043f3a
+SIZE (Zapotek-cdpsnarf-v0.1.6_GH0.tar.gz) = 18997
diff --git a/net-mgmt/cdpsnarf/files/patch-cdpsnarf.c b/net-mgmt/cdpsnarf/files/patch-cdpsnarf.c
new file mode 100644
index 000000000000..7c0f2d8e0566
--- /dev/null
+++ b/net-mgmt/cdpsnarf/files/patch-cdpsnarf.c
@@ -0,0 +1,14 @@
+--- cdpsnarf.c.orig 2016-02-05 16:29:16 UTC
++++ cdpsnarf.c
+@@ -194,11 +194,6 @@ int main( int argc, char *argv[] ) {
+ int i = 0;
+
+ printf( "CDPSnarf %s [%s] initiated.\n", VERSION, SVN_REV );
+- printf( " Author: Anastasios \"Zapotek\" Laskos\n" );
+- printf( " <tasos.laskos@gmail.com>\n" );
+- printf( " <zapotek@segfault.gr>\n" );
+- printf( " Website: http://www.segfault.gr\n" );
+- printf( " http://github.com/Zapotek/cdpsnarf\n\n" );
+
+ // get command line arguments
+ while( ( c = getopt( argc, argv, "i:dhw:r:" ) ) != -1 ) {
diff --git a/net-mgmt/cdpsnarf/pkg-descr b/net-mgmt/cdpsnarf/pkg-descr
new file mode 100644
index 000000000000..cc60ffc42566
--- /dev/null
+++ b/net-mgmt/cdpsnarf/pkg-descr
@@ -0,0 +1,24 @@
+CDPSnarf is a network sniffer exclusively written to
+extract information from CDP packets. It provides all
+the information a "show cdp neighbors detail" command
+would return on a Cisco router and even more.
+
+A feature list follows:
+ Time intervals between CDP advertisements
+ Source MAC address
+ CDP Version
+ TTL
+ Checksum
+ Device ID
+ Software version
+ Platform
+ Addresses
+ Port ID
+ Capabilities
+ Duplex
+ Save packets in PCAP dump file format
+ Read packets from PCAP dump files
+ Debugging information (using the "-d" flag)
+ Tested with IPv4 and IPv6
+
+Source: https://github.com/Zapotek/cdpsnarf
diff --git a/net-mgmt/cdpsnarf/pkg-plist b/net-mgmt/cdpsnarf/pkg-plist
new file mode 100644
index 000000000000..4c6549afd79f
--- /dev/null
+++ b/net-mgmt/cdpsnarf/pkg-plist
@@ -0,0 +1,2 @@
+bin/cdpsnarf
+%%DOCSDIR%%/README