summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2003-12-26 20:06:02 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2003-12-26 20:06:02 +0000
commitf10d6d79babc8fcd2692c1b5430c2da82b1f8464 (patch)
tree2c13a0e53903f3db80627da109acfc71244f007d /usr.sbin
parent20a3abefd23aa9562e4abc55e37822d961b9279c (diff)
constify; ok henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/bgpd.h12
-rw-r--r--usr.sbin/bgpd/log.c16
2 files changed, 14 insertions, 14 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index b716b25be3c..396718f9f53 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.38 2003/12/26 18:07:32 henning Exp $ */
+/* $OpenBSD: bgpd.h,v 1.39 2003/12/26 20:06:01 jakob Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -279,17 +279,17 @@ int msgbuf_write(struct msgbuf *);
void log_init(int);
void logit(int, const char *, ...);
void vlog(int, const char *, va_list);
-void log_peer_err(struct peer *, const char *, ...);
-void log_peer_errx(struct peer *, const char *, ...);
+void log_peer_err(const struct peer *, const char *, ...);
+void log_peer_errx(const struct peer *, const char *, ...);
void log_err(const char *, ...);
void fatal(const char *);
void fatalx(const char *);
void fatal_ensure(const char *, int, const char *);
-void log_statechange(struct peer *, enum session_state,
+void log_statechange(const struct peer *, enum session_state,
enum session_events);
-void log_notification(struct peer *, u_int8_t, u_int8_t,
+void log_notification(const struct peer *, u_int8_t, u_int8_t,
u_char *, u_int16_t);
-void log_conn_attempt(struct peer *, struct in_addr);
+void log_conn_attempt(const struct peer *, struct in_addr);
char *log_ntoa(in_addr_t);
/* parse.y */
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index 07eb2170305..54b28a7072c 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.10 2003/12/26 18:07:32 henning Exp $ */
+/* $OpenBSD: log.c,v 1.11 2003/12/26 20:06:01 jakob Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -109,10 +109,10 @@ static const char *procnames[] = {
int debug;
-char *log_fmt_peer(struct peer *);
+char *log_fmt_peer(const struct peer *);
char *
-log_fmt_peer(struct peer *peer)
+log_fmt_peer(const struct peer *peer)
{
char *ip;
char *pfmt;
@@ -160,7 +160,7 @@ vlog(int pri, const char *fmt, va_list ap)
void
-log_peer_err(struct peer *peer, const char *emsg, ...)
+log_peer_err(const struct peer *peer, const char *emsg, ...)
{
char *p, *nfmt;
va_list ap;
@@ -181,7 +181,7 @@ log_peer_err(struct peer *peer, const char *emsg, ...)
}
void
-log_peer_errx(struct peer *peer, const char *emsg, ...)
+log_peer_errx(const struct peer *peer, const char *emsg, ...)
{
char *p, *nfmt;
va_list ap;
@@ -257,7 +257,7 @@ fatal_ensure(const char *file, int line, const char *cond)
}
void
-log_statechange(struct peer *peer, enum session_state nstate,
+log_statechange(const struct peer *peer, enum session_state nstate,
enum session_events event)
{
char *p;
@@ -269,7 +269,7 @@ log_statechange(struct peer *peer, enum session_state nstate,
}
void
-log_notification(struct peer *peer, u_int8_t errcode, u_int8_t subcode,
+log_notification(const struct peer *peer, u_int8_t errcode, u_int8_t subcode,
u_char *data, u_int16_t datalen)
{
char *p;
@@ -324,7 +324,7 @@ log_notification(struct peer *peer, u_int8_t errcode, u_int8_t subcode,
}
void
-log_conn_attempt(struct peer *peer, struct in_addr remote)
+log_conn_attempt(const struct peer *peer, struct in_addr remote)
{
char *p;