diff options
author | brian <brian@FreeBSD.org> | 2001-11-03 21:45:32 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-11-03 21:45:32 +0000 |
commit | 6a1de171ac53cf7f8b25dd40c8d9578c6d9cbc5d (patch) | |
tree | ec148ab8a0b3c8d98c08221f9c5b958f68a4203f /usr.sbin/ppp/log.c | |
parent | 008cbb2ddee52fd6e070d16340a547b330412183 (diff) | |
download | FreeBSD-src-6a1de171ac53cf7f8b25dd40c8d9578c6d9cbc5d.zip FreeBSD-src-6a1de171ac53cf7f8b25dd40c8d9578c6d9cbc5d.tar.gz |
Add a ``log'' command for logging specific information.
Add an ``UPTIME'' variable to indicate the bundle uptime.
It's now possible to put something like this in ppp.linkdown
for a server setup:
MYADDR:
log Session closing: User USER, address HISADDR, up UPTIME
Fixed some memory leakage with commands that expand words.
Made some functions static.
Fixed a diagnostic bug (iface add .... SIOCDIFADDR)
Diffstat (limited to 'usr.sbin/ppp/log.c')
-rw-r--r-- | usr.sbin/ppp/log.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/ppp/log.c b/usr.sbin/ppp/log.c index 5011ed4..d80af36 100644 --- a/usr.sbin/ppp/log.c +++ b/usr.sbin/ppp/log.c @@ -194,6 +194,8 @@ static int syslogLevel(int lev) { switch (lev) { + case LogLOG: + return LOG_INFO; case LogDEBUG: case LogTIMER: return LOG_DEBUG; @@ -210,6 +212,8 @@ syslogLevel(int lev) const char * log_Name(int id) { + if (id == LogLOG) + return "LOG"; return id < LogMIN || id > LogMAX ? "Unknown" : LogNames[id - 1]; } @@ -261,6 +265,8 @@ log_DiscardAllLocal(u_long *mask) int log_IsKept(int id) { + if (id == LogLOG) + return LOG_KEPT_SYSLOG; if (id < LogMIN || id > LogMAX) return 0; if (id > LogMAXCONF) |