summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/ensure.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-12-17 11:46:55 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-12-17 11:46:55 +0000
commit4ab6dc16e7e5c4b75ab6ad7cd8628af319c2f073 (patch)
treee1c0e734ccb4f234ce1da2520442847a0d9f3524 /usr.sbin/bgpd/ensure.h
parent488ccf9cd140366f707acf1c2e4e19b17b008d77 (diff)
welcome, bgpd
started by me some time ago with moral support from theo, the proceeded up to the point where the session engine worked correctly. claudio jeker joined then and did a lot of work in the RDE. it is not particulary usefull as application right now as parts are still missing but is imported to enable more people to work on it. status: BGP sessions get established fine, OPEN messages and then KEEPALIVEs exchanged etc. session FSM works fine; NOTIFICATIONs are handled fine, and all connection drops etc I provoked get handled fine. Incoming UPDATE messgages are parsed well and the data entered to the RIB, the decision process is not yet there, neither is outgoing UPDATEs or sync to the kernel routing table. not connected to the builds yet.
Diffstat (limited to 'usr.sbin/bgpd/ensure.h')
-rw-r--r--usr.sbin/bgpd/ensure.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/usr.sbin/bgpd/ensure.h b/usr.sbin/bgpd/ensure.h
new file mode 100644
index 00000000000..5b17c6e194a
--- /dev/null
+++ b/usr.sbin/bgpd/ensure.h
@@ -0,0 +1,33 @@
+/* $OpenBSD: ensure.h,v 1.1 2003/12/17 11:46:54 henning Exp $ */
+
+/*
+ * Copyright (c) 2003 Claudio Jeker <cjeker@diehard.n-r-g.com>
+ *
+ * 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.
+ */
+#ifndef __ENSURE_H__
+#define __ENSURE_H__
+
+#include "bgpd.h"
+
+#define CHECK_ENSURE 1
+
+#if CHECK_ENSURE != 0
+#define ENSURE(cond) \
+ ((void) ((cond) || \
+ (fatal_ensure(__FILE__, __LINE__, #cond), 0)))
+#else
+#define ENSURE(cond)
+#endif
+
+#endif