summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/bgpd.h3
-rw-r--r--usr.sbin/bgpd/log.c14
2 files changed, 15 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index 16a4c307887..890cba6752d 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.16 2003/12/24 13:49:21 henning Exp $ */
+/* $OpenBSD: bgpd.h,v 1.17 2003/12/24 19:21:20 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -279,6 +279,7 @@ void log_statechange(struct peer *, enum session_state,
void log_notification(struct peer *, u_int8_t, u_int8_t,
u_char *, u_int16_t);
void log_conn_attempt(struct peer *, struct in_addr);
+void log_kroute(int, const char *, struct kroute *);
/* parse.y */
int cmdline_symset(char *);
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index 80ab0d4cecf..7957c87af21 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.4 2003/12/21 23:17:53 henning Exp $ */
+/* $OpenBSD: log.c,v 1.5 2003/12/24 19:21:20 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -308,3 +308,15 @@ log_conn_attempt(struct peer *peer, struct in_addr remote)
free(p);
}
}
+
+void
+log_kroute(int pri, const char *lmsg, struct kroute *kr)
+{
+ char *ip;
+ struct in_addr ina;
+
+ ina.s_addr = kr->prefix;
+
+ ip = inet_ntoa(ina);
+ logit(pri, "%s %s/%u", lmsg, ip, kr->prefixlen);
+}