Update documentation for 0.2.2 and fix logging
This commit is contained in:
parent
7956724a8e
commit
997499ec2b
14
README
14
README
@ -1,6 +1,6 @@
|
||||
ndppd - NDP Proxy Daemon
|
||||
|
||||
Version 0.2.1
|
||||
Version 0.2.2
|
||||
|
||||
------------------------------------------------------------------------
|
||||
1. Legal
|
||||
@ -78,14 +78,7 @@
|
||||
3. Dependencies
|
||||
------------------------------------------------------------------------
|
||||
|
||||
This daemon depends on 'libconfuse'. If you're running Debian or
|
||||
Ubuntu you should be able to get that from the repositories.
|
||||
|
||||
apt-get install libconfuse0-dev
|
||||
|
||||
You can get it here otherwise:
|
||||
|
||||
http://www.nongnu.org/confuse/
|
||||
As of version 0.2.2, libconfuse is no longer needed.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
4. Compiling
|
||||
@ -123,6 +116,9 @@
|
||||
-d Daemonize the process, putting it in the background.
|
||||
Also enables syslogging.
|
||||
|
||||
-v Increase logging verbosity. Can be used several times in
|
||||
order to increase even further.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
5. Website and contact
|
||||
------------------------------------------------------------------------
|
||||
|
5
ndppd.1
5
ndppd.1
@ -5,7 +5,7 @@
|
||||
.SH NAME
|
||||
ndppd \- NDP Proxy Daemon
|
||||
.SH SYNOPSIS
|
||||
.B ndppd [-d] [-c <config-file>] [-p <pidfile>]
|
||||
.B ndppd [-d] [-vvv] [-c <config-file>] [-p <pidfile>]
|
||||
.SH DESCRIPTION
|
||||
.BR ndppd,
|
||||
or
|
||||
@ -26,6 +26,9 @@ enables syslogging.
|
||||
Creates a
|
||||
.I pidfile
|
||||
at the specified location.
|
||||
.IP -v
|
||||
Increases logging verbosity. Can be specified several times to increase
|
||||
verbosity even further.
|
||||
.SH FILES
|
||||
.I /etc/ndppd.conf
|
||||
.RS
|
||||
|
36
ndppd.conf.5
36
ndppd.conf.5
@ -61,18 +61,42 @@ should send the
|
||||
.I router
|
||||
bit when sending Neighbor Advertisement messages. The default
|
||||
value here is
|
||||
.B yes.
|
||||
.BR yes .
|
||||
.SH RULE OPTIONS
|
||||
Specify a method here. See below.
|
||||
.SH METHOD
|
||||
One of the following options must be specified in the
|
||||
.B rule
|
||||
section. All of these are mutually exclusive options, and cannot
|
||||
be combined.
|
||||
.IP "iface <interface>"
|
||||
Specify which
|
||||
.I interface
|
||||
the Neighbor Solicitation message will be sent out through.
|
||||
If this option is not specified,
|
||||
.IP "auto"
|
||||
.B (NEW)
|
||||
If this option is 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.
|
||||
will attempt to detect which interface to use in order to forward
|
||||
Neighbor Solicitation Messages, by reading the routing table
|
||||
.BR /proc/sys/ipv6_route .
|
||||
.IP "static"
|
||||
.B (NEW)
|
||||
This option tells
|
||||
.B ndppd
|
||||
that it should immediately respond to a Neighbor Solicitation Message
|
||||
without querying an internal interface.
|
||||
Note that it's recommended that you use this option sparingly, and with
|
||||
as high prefix length as possible. This is to make sure upstream routers
|
||||
are not polluted with spurious neighbor entries.
|
||||
|
||||
If no rule option has been specified, it will default to
|
||||
.B static
|
||||
in order to be compatible with
|
||||
.BR 0.2.1 .
|
||||
This will, however, produce a warning, and most likely not work in
|
||||
future versions of
|
||||
.BR ndppd .
|
||||
.SH AUTHOR
|
||||
Daniel Adolfsson <daniel@priv.nu>
|
||||
.SH "SEE ALSO"
|
||||
|
@ -175,6 +175,18 @@ void logger::max_pri(int pri)
|
||||
_max_pri = pri;
|
||||
}
|
||||
|
||||
int logger::verbosity()
|
||||
{
|
||||
return _max_pri;
|
||||
}
|
||||
|
||||
void logger::verbosity(int pri)
|
||||
{
|
||||
if ((pri >= 0) && (pri <= 7)) {
|
||||
_max_pri = pri;
|
||||
}
|
||||
}
|
||||
|
||||
bool logger::verbosity(const std::string& name)
|
||||
{
|
||||
const char* c_name = name.c_str();
|
||||
|
@ -51,6 +51,10 @@ public:
|
||||
|
||||
static bool verbosity(const std::string& name);
|
||||
|
||||
static int verbosity();
|
||||
|
||||
static void verbosity(int pri);
|
||||
|
||||
logger& operator<<(const std::string& str);
|
||||
logger& operator<<(logger& (*pf)(logger& ));
|
||||
logger& operator<<(int n);
|
||||
|
@ -158,7 +158,7 @@ int main(int argc, char* argv[], char* env[])
|
||||
{ 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long(argc, argv, "c:dp:v::", long_options,& opt);
|
||||
c = getopt_long(argc, argv, "c:dp:v", long_options,& opt);
|
||||
|
||||
if (c == -1)
|
||||
break;
|
||||
@ -177,12 +177,13 @@ int main(int argc, char* argv[], char* env[])
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
if (optarg) {
|
||||
logger::verbosity(logger::verbosity() + 1);
|
||||
/*if (optarg) {
|
||||
if (!logger::verbosity(optarg))
|
||||
logger::error() << "Unknown verbosity level '" << optarg << "'";
|
||||
} else {
|
||||
logger::max_pri(LOG_INFO);
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user