From 97f72a0a4b1cf186a0f61bdee593aa8d2fca1efd Mon Sep 17 00:00:00 2001 From: Daniel Adolfsson Date: Sun, 18 Sep 2011 12:40:48 +0200 Subject: [PATCH] Makefile and manpages - Update Makefile to provide 'install'. - Add manpages ndppd(1) and ndppd.conf(5). --- .gitignore | 4 ++- Makefile | 24 +++++++++++++--- ndppd.1 | 59 +++++++++++++++++++++++++++++++++++++++ ndppd.conf.5 | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 ndppd.1 create mode 100644 ndppd.conf.5 diff --git a/.gitignore b/.gitignore index 14e7412..857f2c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ ndppd.conf ndppd *.o - +ndppd.conf.5.gz +ndppd.1.gz + diff --git a/Makefile b/Makefile index 7a85f02..aa76d2c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,25 @@ -all: +PREFIX = +MANDIR = ${PREFIX}/usr/share/man +BINDIR = ${PREFIX}/usr/local/bin + +install: all + mkdir -p ${BINDIR} ${MANDIR} + cp ndppd ${BINDIR} + chmod +x ${BINDIR}/ndppd + cp ndppd.1.gz ${MANDIR}/man1 + cp ndppd.conf.5.gz ${MANDIR}/man5 + +all: ndppd ndppd.1.gz ndppd.conf.5.gz + +ndppd: cd src && make all && cp ndppd .. clean: - rm -f ndppd + rm -f ndppd ndppd.conf.5.gz ndppd.1.gz cd src && make clean - - +ndppd.1.gz: + gzip < ndppd.1 > ndppd.1.gz + +ndppd.conf.5.gz: + gzip < ndppd.conf.5 > ndppd.conf.5.gz diff --git a/ndppd.1 b/ndppd.1 new file mode 100644 index 0000000..03686ea --- /dev/null +++ b/ndppd.1 @@ -0,0 +1,59 @@ +.\" Process this file with +.\" groff -man -Tascii ndppd.1 +.\" +.TH NDPPD 1 "9/18/2011" "NDP Proxy Daemon Manual" "NDP Proxy Daemon Manual" +.SH NAME +ndppd \- NDP Proxy Daemon +.SH SYNOPSIS +.B ndppd [-d] [-c ] +.SH DESCRIPTION +.B ndppd +frobnicates the bar library by tweaking internal +symbol tables. By default it parses all baz segments +and rearranges them in reverse order by time for the +.BR xyzzy (1) +linker to find them. The symdef entry is then compressed +using the WBG (Whiz-Bang-Gizmo) algorithm. +All files are processed in the order specified. +.SH OPTIONS +.IP "-c " +Use the alternate +.I config-file +instead of +.IR /etc/ndppd.conf . +.IP -d +Daemonizes +.B ndppd +and puts it into the background. It also +enables syslogging. +.SH FILES +.I /etc/ndppd.conf +.RS +Default configuration file. See +.BR ndppd (5) +for further details. +.RE +.SH BUGS +No known bugs at the time of this writing. +.SH LICENSE +.EX +Copyright (C) 2011 Daniel Adolfsson + +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 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +.EE +.SH AUTHOR +Daniel Adolfsson +.SH "SEE ALSO" +.BR ndppd.conf(5) + diff --git a/ndppd.conf.5 b/ndppd.conf.5 new file mode 100644 index 0000000..28675f9 --- /dev/null +++ b/ndppd.conf.5 @@ -0,0 +1,79 @@ +.\" Process this file with +.\" groff -man -Tascii ndppd.conf.5 +.\" +.TH NDPPD\&.CONF 5 "9/18/2011" "NDP Proxy Daemon Manual" "NDP Proxy Daemon Manual" +.SH NAME +ndppd.conf \- configuration file for ndppd +.SH DESCRIPTION +The syntax is as follows: +.PP +.EX +proxy eth0 { + rule 1234:5678::/96 { + } +} +.EE +.PP +The configuration file must contain one or more +.B proxy +sections, and each of these section must contain one or more +.B rule +sections. +.PP +The +.B ndppd +daemon listens on the interface specified as an argument to the +.B proxy +section. Once a +.B Neighbor Solicitation +message arrives, it will try to match the target address against +the address specified as the argument of the +.B rule +section. +.SH OPTIONS +.IP "proxy " +Adds a proxy and binds it to the specified +.IR interface . +See below for information about +.BR "proxy options" . +.SH PROXY OPTIONS +.IP "rule
" +Adds a rule with the specified +.I address +to the proxy. It may be a an IP such as 1234::1 or a subnet such +as 1111::/96. See below for information about +.BR "rule options" . +.IP "ttl " +Controls how long +.B ndppd +will cache an entry. This is in milliseconds, and the default value +is 30000 (30 seconds). +.IP "timeout " +Controls how long +.B ndppd +will wait for a Neighbor Advertisement message after forwarding +a Neighbor Solicitation message according to the rule. This is +in milliseconds, and the default value is 500 (.5 second). +.IP "router " +Controls if +.B ndppd +should send the +.I router +bit when sending Neighbor Advertisement messages. The default +value here is +.B yes. +.SH RULE OPTIONS +.IP "iface " +Specify which +.I interface +the Neighbor Solicitation message will be sent out through. +If this option is not specified, +.B ndppd +will immediately answer with a Neighbor Advertisement message +if the rule matches, without querying an interface. It's recommended +that you set this value to avoid sending responses for IPs that does +not exist. +.SH AUTHOR +Daniel Adolfsson +.SH "SEE ALSO" +.BR ndppd(1)