summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-05-21 11:58:33 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-05-21 11:58:33 +0000
commit9ef59ce011f6087cb79d1674bb32b30f07ee055c (patch)
tree49a6544a7d84c2d75e40f39326e5ad6093f24038 /usr.sbin
parent10f34db6e4360c71ca33653464c00bc64184dbd9 (diff)
move the big name tables to the .h file, makes the .c easier
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/log.c68
-rw-r--r--usr.sbin/bgpd/log.h68
2 files changed, 68 insertions, 68 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index 2c05f877b16..301b090c622 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.36 2004/05/08 19:17:20 henning Exp $ */
+/* $OpenBSD: log.c,v 1.37 2004/05/21 11:58:32 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -37,72 +37,6 @@
int debug;
-static const char *eventnames[] = {
- "None",
- "Start",
- "Stop",
- "Connection opened",
- "Connection closed",
- "Connection open failed",
- "Fatal error",
- "ConnectRetryTimer expired",
- "HoldTimer expired",
- "KeepaliveTimer expired",
- "OPEN message received",
- "KEEPALIVE message received",
- "UPDATE message received",
- "NOTIFICATION received"
-};
-
-static const char *errnames[] = {
- "none",
- "Header error",
- "error in OPEN message",
- "error in UPDATE message",
- "HoldTimer expired",
- "Finite State Machine error",
- "Cease"
-};
-
-static const char *suberr_header_names[] = {
- "none",
- "synchronization error",
- "wrong length",
- "unknown message type"
-};
-
-static const char *suberr_open_names[] = {
- "none",
- "version mismatch",
- "AS unacceptable",
- "BGPID invalid",
- "optional parameter error",
- "Authentication error",
- "unacceptable holdtime",
- "unsupported capability"
-};
-
-static const char *suberr_update_names[] = {
- "none",
- "attribute list error",
- "unknown well-known attribute",
- "well-known attribute missing",
- "attribute flags error",
- "attribute length wrong",
- "origin unacceptable",
- "loop detected",
- "nexthop unacceptable",
- "optional attribute error",
- "network unacceptable",
- "AS-Path unacceptable"
-};
-
-static const char *procnames[] = {
- "parent",
- "SE",
- "RDE"
-};
-
char *log_fmt_peer(const struct peer_config *);
void logit(int, const char *, ...);
diff --git a/usr.sbin/bgpd/log.h b/usr.sbin/bgpd/log.h
index db796277f5e..4cd1ce8c132 100644
--- a/usr.sbin/bgpd/log.h
+++ b/usr.sbin/bgpd/log.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.h,v 1.1 2004/01/04 02:13:52 henning Exp $ */
+/* $OpenBSD: log.h,v 1.2 2004/05/21 11:58:32 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -25,3 +25,69 @@ static const char *statenames[] = {
"OpenConfirm",
"Established"
};
+
+static const char *eventnames[] = {
+ "None",
+ "Start",
+ "Stop",
+ "Connection opened",
+ "Connection closed",
+ "Connection open failed",
+ "Fatal error",
+ "ConnectRetryTimer expired",
+ "HoldTimer expired",
+ "KeepaliveTimer expired",
+ "OPEN message received",
+ "KEEPALIVE message received",
+ "UPDATE message received",
+ "NOTIFICATION received"
+};
+
+static const char *errnames[] = {
+ "none",
+ "Header error",
+ "error in OPEN message",
+ "error in UPDATE message",
+ "HoldTimer expired",
+ "Finite State Machine error",
+ "Cease"
+};
+
+static const char *suberr_header_names[] = {
+ "none",
+ "synchronization error",
+ "wrong length",
+ "unknown message type"
+};
+
+static const char *suberr_open_names[] = {
+ "none",
+ "version mismatch",
+ "AS unacceptable",
+ "BGPID invalid",
+ "optional parameter error",
+ "Authentication error",
+ "unacceptable holdtime",
+ "unsupported capability"
+};
+
+static const char *suberr_update_names[] = {
+ "none",
+ "attribute list error",
+ "unknown well-known attribute",
+ "well-known attribute missing",
+ "attribute flags error",
+ "attribute length wrong",
+ "origin unacceptable",
+ "loop detected",
+ "nexthop unacceptable",
+ "optional attribute error",
+ "network unacceptable",
+ "AS-Path unacceptable"
+};
+
+static const char *procnames[] = {
+ "parent",
+ "SE",
+ "RDE"
+};