diff options
author | miwi <miwi@FreeBSD.org> | 2006-12-22 04:20:49 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2006-12-22 04:20:49 +0800 |
commit | f2f952731ee3a2526eb97d7c344e3887de997aaa (patch) | |
tree | 3452bf25ab2aac7f6a1d6d804c51cc35232eaf3f /net-mgmt | |
parent | cff8107b1d7d1f9699600cb124e16a88ebe834f9 (diff) | |
download | freebsd-ports-gnome-f2f952731ee3a2526eb97d7c344e3887de997aaa.tar.gz freebsd-ports-gnome-f2f952731ee3a2526eb97d7c344e3887de997aaa.tar.zst freebsd-ports-gnome-f2f952731ee3a2526eb97d7c344e3887de997aaa.zip |
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>
PR: ports/106840
Submitted by: janos.mohacsi at bsd.hu
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/ndpmon/Makefile | 48 | ||||
-rw-r--r-- | net-mgmt/ndpmon/distinfo | 3 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-config__ndpmon.xml | 12 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-monitoring.h | 16 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-monitoring__na.h | 16 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-monitoring__ns.h | 16 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-monitoring__ra.h | 16 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-monitoring__rd.h | 16 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-ndpmon.8 | 35 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-ndpmon.c | 29 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-ndpmon.h | 14 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-neighbor__list.xml | 12 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-parser.c | 19 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-print__packet__info.h | 16 | ||||
-rw-r--r-- | net-mgmt/ndpmon/files/patch-utils.h | 14 | ||||
-rw-r--r-- | net-mgmt/ndpmon/pkg-descr | 12 | ||||
-rw-r--r-- | net-mgmt/ndpmon/pkg-plist | 7 |
18 files changed, 302 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 0a545fcd8636..64af4fc861ca 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -99,6 +99,7 @@ SUBDIR += nat SUBDIR += nav SUBDIR += nbtscan + SUBDIR += ndpmon SUBDIR += nefu SUBDIR += net-snmp SUBDIR += net-snmp-tkmib 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 |