xref: /openbsd/usr.sbin/bgpd/log.h (revision 7b36286a)
1 /*	$OpenBSD: log.h,v 1.10 2007/12/23 18:26:13 henning Exp $ */
2 
3 /*
4  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 static const char * const statenames[] = {
20 	"None",
21 	"Idle",
22 	"Connect",
23 	"Active",
24 	"OpenSent",
25 	"OpenConfirm",
26 	"Established"
27 };
28 
29 static const char * const eventnames[] = {
30 	"None",
31 	"Start",
32 	"Stop",
33 	"Connection opened",
34 	"Connection closed",
35 	"Connection open failed",
36 	"Fatal error",
37 	"ConnectRetryTimer expired",
38 	"HoldTimer expired",
39 	"KeepaliveTimer expired",
40 	"OPEN message received",
41 	"KEEPALIVE message received",
42 	"UPDATE message received",
43 	"NOTIFICATION received"
44 };
45 
46 static const char * const errnames[] = {
47 	"none",
48 	"Header error",
49 	"error in OPEN message",
50 	"error in UPDATE message",
51 	"HoldTimer expired",
52 	"Finite State Machine error",
53 	"Cease"
54 };
55 
56 static const char * const suberr_header_names[] = {
57 	"none",
58 	"synchronization error",
59 	"wrong length",
60 	"unknown message type"
61 };
62 
63 static const char * const suberr_open_names[] = {
64 	"none",
65 	"version mismatch",
66 	"AS unacceptable",
67 	"BGPID invalid",
68 	"optional parameter error",
69 	"authentication error",
70 	"unacceptable holdtime",
71 	"unsupported capability"
72 };
73 
74 static const char * const suberr_update_names[] = {
75 	"none",
76 	"attribute list error",
77 	"unknown well-known attribute",
78 	"well-known attribute missing",
79 	"attribute flags error",
80 	"attribute length wrong",
81 	"origin unacceptable",
82 	"loop detected",
83 	"nexthop unacceptable",
84 	"optional attribute error",
85 	"network unacceptable",
86 	"AS-Path unacceptable"
87 };
88 
89 static const char * const suberr_cease_names[] = {
90 	"none",
91 	"max-prefix exceeded",
92 	"administratively down",
93 	"peer unconfigured",
94 	"administrative reset",
95 	"connection rejected",
96 	"other config change",
97 	"collision",
98 	"resource exhaustion"
99 };
100 
101 static const char * const procnames[] = {
102 	"parent",
103 	"SE",
104 	"RDE"
105 };
106 
107 static const char * const ctl_res_strerror[] = {
108 	"no error",
109 	"no such neighbor",
110 	"permission denied",
111 	"neighbor does not have this capability",
112 	"config file has errors, reload failed"
113 };
114 
115 static const char * const timernames[] = {
116 	"None",
117 	"ConnectRetryTimer",
118 	"KeepaliveTimer",
119 	"HoldTimer",
120 	"IdleHoldTimer",
121 	"IdleHoldResetTimer",
122 	""
123 };
124