aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/ndpmon
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-12-21 20:20:49 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-12-21 20:20:49 +0000
commit9a676e7dbc8cacac4713b7cc118f1beb8355e3b1 (patch)
tree14f9d8479131dce714a99c305b390e659d67cad0 /net-mgmt/ndpmon
parent165ff1ee2477961520af726e15d3dc03779beb58 (diff)
downloadports-9a676e7dbc8cacac4713b7cc118f1beb8355e3b1.tar.gz
ports-9a676e7dbc8cacac4713b7cc118f1beb8355e3b1.zip
Notes
Diffstat (limited to 'net-mgmt/ndpmon')
-rw-r--r--net-mgmt/ndpmon/Makefile48
-rw-r--r--net-mgmt/ndpmon/distinfo3
-rw-r--r--net-mgmt/ndpmon/files/patch-config__ndpmon.xml12
-rw-r--r--net-mgmt/ndpmon/files/patch-monitoring.h16
-rw-r--r--net-mgmt/ndpmon/files/patch-monitoring__na.h16
-rw-r--r--net-mgmt/ndpmon/files/patch-monitoring__ns.h16
-rw-r--r--net-mgmt/ndpmon/files/patch-monitoring__ra.h16
-rw-r--r--net-mgmt/ndpmon/files/patch-monitoring__rd.h16
-rw-r--r--net-mgmt/ndpmon/files/patch-ndpmon.835
-rw-r--r--net-mgmt/ndpmon/files/patch-ndpmon.c29
-rw-r--r--net-mgmt/ndpmon/files/patch-ndpmon.h14
-rw-r--r--net-mgmt/ndpmon/files/patch-neighbor__list.xml12
-rw-r--r--net-mgmt/ndpmon/files/patch-parser.c19
-rw-r--r--net-mgmt/ndpmon/files/patch-print__packet__info.h16
-rw-r--r--net-mgmt/ndpmon/files/patch-utils.h14
-rw-r--r--net-mgmt/ndpmon/pkg-descr12
-rw-r--r--net-mgmt/ndpmon/pkg-plist7
17 files changed, 301 insertions, 0 deletions
diff --git a/net-mgmt/ndpmon/Makefile b/net-mgmt/ndpmon/Makefile
new file mode 100644
index 000000000000..844843701d4a
--- /dev/null
+++ b/net-mgmt/ndpmon/Makefile
@@ -0,0 +1,48 @@
+# New ports collection makefile for: ndpmon
+# Date created: 2006-12-17
+# Whom: janos.mohacsi@bsd.hu
+#
+# $FreeBSD$
+#
+
+PORTNAME= ndpmon
+PORTVERSION= 1.0
+CATEGORIES= net-mgmt ipv6
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTFILES= ${PORTNAME}-${PORTVERSION}b.tgz
+
+MAINTAINER= janos.mohacsi@bsd.hu
+COMMENT= On-link icmpv6 message monitoring and reporting daemon
+
+USE_GNOME= libxml2
+
+GNU_CONFIGURE= yes
+
+MAN8= ndpmon.8
+PORTDOCS= INSTALL README
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/ndpmon.c \
+ ${WRKSRC}/ndpmon.8 \
+ ${WRKSRC}/config_ndpmon.xml \
+ ${WRKSRC}/neighbor_list.xml
+
+do-install:
+ ${INSTALL_MAN} ${WRKSRC}/ndpmon.8 ${PREFIX}/man/man8
+ ${INSTALL_PROGRAM} ${WRKSRC}/ndpmon ${PREFIX}/sbin
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.dtd \
+ ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/config_ndpmon.xml ${PREFIX}/etc/config_ndpmon.xml-dist
+ ${MKDIR} ${PREFIX}/var
+ ${INSTALL_DATA} ${WRKSRC}/neighbor_list.xml ${PREFIX}/var/ndpmon_neighbor_list.xml
+
+.if !defined(NOPORTDOCS)
+post-install:
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/ndpmon/distinfo b/net-mgmt/ndpmon/distinfo
new file mode 100644
index 000000000000..96c1742d593b
--- /dev/null
+++ b/net-mgmt/ndpmon/distinfo
@@ -0,0 +1,3 @@
+MD5 (ndpmon-1.0b.tgz) = 80c2076de3399fde5fd9959d487538c1
+SHA256 (ndpmon-1.0b.tgz) = c8e26f1bdf69a9609b482afe05dacbab5c129fc80964b0fdf1e272948f098651
+SIZE (ndpmon-1.0b.tgz) = 49818
diff --git a/net-mgmt/ndpmon/files/patch-config__ndpmon.xml b/net-mgmt/ndpmon/files/patch-config__ndpmon.xml
new file mode 100644
index 000000000000..309091198579
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-config__ndpmon.xml
@@ -0,0 +1,12 @@
+
+$FreeBSD$
+
+--- config_ndpmon.xml.orig
++++ config_ndpmon.xml
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+-<!DOCTYPE config_ndpmon SYSTEM "config_ndpmon.dtd">
++<!DOCTYPE config_ndpmon SYSTEM "%%PREFIX%%/share/ndpmon/config_ndpmon.dtd">
+ <config_ndpmon>
+ <ignor_autoconf>1</ignor_autoconf>
+ <syslog_facility>LOG_LOCAL1</syslog_facility>
diff --git a/net-mgmt/ndpmon/files/patch-monitoring.h b/net-mgmt/ndpmon/files/patch-monitoring.h
new file mode 100644
index 000000000000..ae736cd83feb
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-monitoring.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- monitoring.h.orig
++++ monitoring.h
+@@ -36,8 +36,9 @@
+
+ #include <time.h>
+
++#include <sys/types.h>
+ #include <netinet/in.h>
+-#include <netinet/ether.h>
++#include <net/ethernet.h>
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+ #include <string.h>
diff --git a/net-mgmt/ndpmon/files/patch-monitoring__na.h b/net-mgmt/ndpmon/files/patch-monitoring__na.h
new file mode 100644
index 000000000000..272d4a0e40a2
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-monitoring__na.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- monitoring_na.h.orig
++++ monitoring_na.h
+@@ -34,7 +34,9 @@
+ #ifndef _MONITORING_NA_
+ #define _MONITORING_NA_ 1
+
+-#include <netinet/ether.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <net/ethernet.h>
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+
diff --git a/net-mgmt/ndpmon/files/patch-monitoring__ns.h b/net-mgmt/ndpmon/files/patch-monitoring__ns.h
new file mode 100644
index 000000000000..a765356b8306
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-monitoring__ns.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- monitoring_ns.h.orig
++++ monitoring_ns.h
+@@ -33,7 +33,9 @@
+ #ifndef _MONITORING_NS_
+ #define _MONITORING_NS_ 1
+
+-#include <netinet/ether.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <net/ethernet.h>
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+ #include <netinet/in.h>
diff --git a/net-mgmt/ndpmon/files/patch-monitoring__ra.h b/net-mgmt/ndpmon/files/patch-monitoring__ra.h
new file mode 100644
index 000000000000..77a8cd0c32ac
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-monitoring__ra.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- monitoring_ra.h.orig
++++ monitoring_ra.h
+@@ -33,7 +33,9 @@
+ #ifndef _MONITORING_RA_
+ #define _MONITORING_RA_ 1
+
+-#include <netinet/ether.h>
++#include <sys/types.h>
++#include <net/ethernet.h>
++#include <netinet/in.h>
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+
diff --git a/net-mgmt/ndpmon/files/patch-monitoring__rd.h b/net-mgmt/ndpmon/files/patch-monitoring__rd.h
new file mode 100644
index 000000000000..a4ac42af78c4
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-monitoring__rd.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- monitoring_rd.h.orig
++++ monitoring_rd.h
+@@ -33,7 +33,9 @@
+ #ifndef _MONITORING_RD_
+ #define _MONITORING_RD_ 1
+
+-#include <netinet/ether.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <net/ethernet.h>
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+
diff --git a/net-mgmt/ndpmon/files/patch-ndpmon.8 b/net-mgmt/ndpmon/files/patch-ndpmon.8
new file mode 100644
index 000000000000..2884a0cc7924
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-ndpmon.8
@@ -0,0 +1,35 @@
+
+$FreeBSD$
+
+--- ndpmon.8.orig
++++ ndpmon.8
+@@ -57,12 +57,12 @@
+ .B -f
+ flag is used to change the path of the configuration file.
+ The default is
+-.IR /usr/local/ndpmon/config_ndpmon.xml
++.IR %%PREFIX%%/etc/config_ndpmon.xml
+ .LP
+ The
+ .B -e
+ flag is used to change the path to the DTD file for the configuration file. The default is
+-.I /usr/local/ndpmon/config_ndpmon.dtd
++.I %%PREFIX%%/share/ndpmon/config_ndpmon.dtd
+ .LP
+ The
+ .B -n
+@@ -83,12 +83,12 @@
+ The
+ .B -d
+ flag is used to change the path to the DTD file for the neighbor cache. The default is
+-.I /usr/local/ndpmon/neighbor_list.dtd
++.I %%PREFIX%%/share/ndpmon/neighbor_list.dtd
+ .LP
+ The
+ .B -g
+ flag is used to change the path to the neighbor cache. The default is
+-.I /usr/local/ndpmon/neighbor_list.xml
++.I %%PREFIX%%/var/ndpmon_neighbor_list.xml
+ .LP
+ Note that an empty
+ .I neighbor_cache.xml
diff --git a/net-mgmt/ndpmon/files/patch-ndpmon.c b/net-mgmt/ndpmon/files/patch-ndpmon.c
new file mode 100644
index 000000000000..ee5a1fe75872
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-ndpmon.c
@@ -0,0 +1,29 @@
+
+$FreeBSD$
+
+--- ndpmon.c.orig
++++ ndpmon.c
+@@ -43,10 +43,10 @@
+ char admin_mail[128] = "";
+ char syslog_facility[16] = "";
+ int ignor_autoconf = 0;
+-char config_path[128] = "/usr/local/ndpmon/config_ndpmon.xml";
+-char cache_path[128] = "/usr/local/ndpmon/neighbor_list.xml";
+-char dtd_path[128] = "/usr/local/ndpmon/neighbor_list.dtd";
+-char dtd_config_path[128] = "/usr/local/ndpmon/config_ndpmon.dtd";
++char config_path[128] = "%%PREFIX%%/etc/config_ndpmon.xml";
++char cache_path[128] = "%%PREFIX%%/var/ndpmon_neighbor_list.xml";
++char dtd_path[128] = "%%PREFIX%%/share/ndpmon/neighbor_list.dtd";
++char dtd_config_path[128] = "%%PREFIX%%/share/ndpmon/config_ndpmon.dtd";
+
+ #ifdef _MACRESOLUTION_
+ manufacturer_t *manuf = NULL;
+@@ -438,7 +438,7 @@
+
+
+ /* open device for reading */
+- descr = pcap_open_live(interface,BUFSIZ,1,-1,errbuf);
++ descr = pcap_open_live(interface,BUFSIZ,1,1000,errbuf);
+ if(descr == NULL)
+ {
+ fprintf(stderr,"pcap_open_live(): %s\n",errbuf); exit(1);
diff --git a/net-mgmt/ndpmon/files/patch-ndpmon.h b/net-mgmt/ndpmon/files/patch-ndpmon.h
new file mode 100644
index 000000000000..eefd911bfed7
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-ndpmon.h
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- ndpmon.h.orig
++++ ndpmon.h
+@@ -38,7 +38,7 @@
+
+ #include <netinet/in.h>
+ #include <netinet/if_ether.h>
+-#include <netinet/ether.h>
++#include <net/ethernet.h>
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+ #include <net/ethernet.h>
diff --git a/net-mgmt/ndpmon/files/patch-neighbor__list.xml b/net-mgmt/ndpmon/files/patch-neighbor__list.xml
new file mode 100644
index 000000000000..46531fbaa1f4
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-neighbor__list.xml
@@ -0,0 +1,12 @@
+
+$FreeBSD$
+
+--- neighbor_list.xml.orig
++++ neighbor_list.xml
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+ <!DOCTYPE neighbor_list
+-SYSTEM "/usr/local/ndpmon/neighbor_list.dtd">
++SYSTEM "%%PREFIX%%/share/ndpmon/neighbor_list.dtd">
+ <neighbor_list>
+ </neighbor_list>
diff --git a/net-mgmt/ndpmon/files/patch-parser.c b/net-mgmt/ndpmon/files/patch-parser.c
new file mode 100644
index 000000000000..e60e172b5191
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-parser.c
@@ -0,0 +1,19 @@
+
+$FreeBSD$
+
+--- parser.c.orig
++++ parser.c
+@@ -65,11 +65,13 @@
+ /** note: it may be a good option to save values, and restore
+ * them when exiting
+ */
++ /*
+ write_proc("/proc/sys/net/ipv6/conf/all/autoconf",flag);
+ write_proc("/proc/sys/net/ipv6/conf/all/accept_ra",flag);
+ write_proc("/proc/sys/net/ipv6/conf/all/accept_ra_defrtr",flag);
+ write_proc("/proc/sys/net/ipv6/conf/all/accept_ra_pinfo",flag);
+ write_proc("/proc/sys/net/ipv6/conf/all/accept_redirects",flag);
++ */
+ }
+
+ xmlXPathFreeObject (xmlobject);
diff --git a/net-mgmt/ndpmon/files/patch-print__packet__info.h b/net-mgmt/ndpmon/files/patch-print__packet__info.h
new file mode 100644
index 000000000000..cd634471f4fc
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-print__packet__info.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- print_packet_info.h.orig
++++ print_packet_info.h
+@@ -37,7 +37,9 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <netinet/ether.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <net/ethernet.h>
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+
diff --git a/net-mgmt/ndpmon/files/patch-utils.h b/net-mgmt/ndpmon/files/patch-utils.h
new file mode 100644
index 000000000000..31a666f302ec
--- /dev/null
+++ b/net-mgmt/ndpmon/files/patch-utils.h
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- utils.h.orig
++++ utils.h
+@@ -36,7 +36,7 @@
+ #define ETHERNET_SIZE 14 /* ethernet headers are 14 bytes */
+ #define IPV6_SIZE 40 /* ipv6 headers without fragment ... are 40 bytes */
+ #define ICMP6_HEADER_SIZE 8
+-#define ETHERTYPE_IPV6 0x86dd
++/*#define ETHERTYPE_IPV6 0x86dd */
+
+ /*Size to build char* address in a readable form*/
+ #define IP6_STR_SIZE 40 /*xxxx:xxxx:xxx:xxxx:xxxx:xxxx:xxxx:xxxx*/
diff --git a/net-mgmt/ndpmon/pkg-descr b/net-mgmt/ndpmon/pkg-descr
new file mode 100644
index 000000000000..7215fdc0d5d1
--- /dev/null
+++ b/net-mgmt/ndpmon/pkg-descr
@@ -0,0 +1,12 @@
+NDPMon is an equivalent of ArpWatch for IPv6.
+
+NDPMon, Neighbor Discovery Protocol Monitor, is a tool working with
+ICMPv6 packets. NDPMon observes the local network to see if nodes
+using neighbor discovery messages behave properly. When it detects
+a suspicious Neighbor Discovery message, it notifies the administrator
+by writing in the syslog and in some cases by sending an email
+report.
+
+WWW: http://ndpmon.sourceforge.net
+
+Janos Mohacsi <janos.mohacsi@bsd.hu>
diff --git a/net-mgmt/ndpmon/pkg-plist b/net-mgmt/ndpmon/pkg-plist
new file mode 100644
index 000000000000..4a30b020ed43
--- /dev/null
+++ b/net-mgmt/ndpmon/pkg-plist
@@ -0,0 +1,7 @@
+sbin/ndpmon
+%%DATADIR%%/config_ndpmon.dtd
+%%DATADIR%%/neighbor_list.dtd
+@dirrmtry %%DATADIR%%
+var/ndpmon_neighbor_list.xml
+@dirrmtry var
+etc/config_ndpmon.xml-dist