summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/name2id.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-06-04 04:46:43 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-06-04 04:46:43 +0000
commit035d32216e5a779b4d4f0ca72e4db41f735a46d1 (patch)
tree5d3819b36b8791df574773fadac0b9107f9c0150 /usr.sbin/bgpd/name2id.c
parentc0c9f0ce03e247b21f0baeee8ff1a90e92ea243e (diff)
Add "rde rib <name>" to the config and allow the rde to use these other RIBs.
Still a bit hackish, reload is missing and printconf as well. Looks good h@
Diffstat (limited to 'usr.sbin/bgpd/name2id.c')
-rw-r--r--usr.sbin/bgpd/name2id.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/usr.sbin/bgpd/name2id.c b/usr.sbin/bgpd/name2id.c
index 9e8774fd628..2af133278f9 100644
--- a/usr.sbin/bgpd/name2id.c
+++ b/usr.sbin/bgpd/name2id.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: name2id.c,v 1.8 2009/05/17 12:25:15 claudio Exp $ */
+/* $OpenBSD: name2id.c,v 1.9 2009/06/04 04:46:42 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -43,35 +43,10 @@ const char *_id2name(struct n2id_labels *, u_int16_t);
void _unref(struct n2id_labels *, u_int16_t);
void _ref(struct n2id_labels *, u_int16_t);
-struct n2id_labels rib_labels = TAILQ_HEAD_INITIALIZER(rib_labels);
struct n2id_labels rt_labels = TAILQ_HEAD_INITIALIZER(rt_labels);
struct n2id_labels pftable_labels = TAILQ_HEAD_INITIALIZER(pftable_labels);
u_int16_t
-rib_name2id(const char *name)
-{
- return (_name2id(&rib_labels, name));
-}
-
-const char *
-rib_id2name(u_int16_t id)
-{
- return (_id2name(&rib_labels, id));
-}
-
-void
-rib_unref(u_int16_t id)
-{
- _unref(&rib_labels, id);
-}
-
-void
-rib_ref(u_int16_t id)
-{
- _ref(&rib_labels, id);
-}
-
-u_int16_t
rtlabel_name2id(const char *name)
{
return (_name2id(&rt_labels, name));