diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-04 02:13:53 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-04 02:13:53 +0000 |
commit | d26484887633d6a8790c22deaa4e8b52eecdd357 (patch) | |
tree | 73db1f9c1f697e47d98bd4b3a243d666aa0a19f2 | |
parent | 4b05413dc13e6e222f72f74e2788badd3d9f2947 (diff) |
share statenames
-rw-r--r-- | usr.sbin/bgpctl/bgpctl.c | 13 | ||||
-rw-r--r-- | usr.sbin/bgpd/log.c | 15 | ||||
-rw-r--r-- | usr.sbin/bgpd/log.h | 27 |
3 files changed, 32 insertions, 23 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index 4a2b083f0d4..9815a8202ed 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.7 2004/01/03 22:27:06 henning Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.8 2004/01/04 02:13:52 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -26,6 +26,7 @@ #include "bgpd.h" #include "session.h" +#include "log.h" int main(int, char *[]); void summary_head(void); @@ -33,16 +34,6 @@ int summary_msg(struct imsg *); struct imsgbuf ibuf; -static const char *statenames[] = { - "None", - "Idle", - "Connect", - "Active", - "OpenSent", - "OpenConfirm", - "Established" -}; - enum views { VIEW_SUMMARY }; diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c index ef363fa48a6..dfb56db9fb1 100644 --- a/usr.sbin/bgpd/log.c +++ b/usr.sbin/bgpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.13 2003/12/30 18:47:00 henning Exp $ */ +/* $OpenBSD: log.c,v 1.14 2004/01/04 02:13:52 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -31,16 +31,9 @@ #include "bgpd.h" #include "session.h" +#include "log.h" -static const char *statenames[] = { - "None", - "Idle", - "Connect", - "Active", - "OpenSent", - "OpenConfirm", - "Established" -}; +int debug; static const char *eventnames[] = { "None", @@ -107,8 +100,6 @@ static const char *procnames[] = { "RDE" }; -int debug; - char *log_fmt_peer(const struct peer *); char * diff --git a/usr.sbin/bgpd/log.h b/usr.sbin/bgpd/log.h new file mode 100644 index 00000000000..db796277f5e --- /dev/null +++ b/usr.sbin/bgpd/log.h @@ -0,0 +1,27 @@ +/* $OpenBSD: log.h,v 1.1 2004/01/04 02:13:52 henning Exp $ */ + +/* + * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +static const char *statenames[] = { + "None", + "Idle", + "Connect", + "Active", + "OpenSent", + "OpenConfirm", + "Established" +}; |