summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpd/rde.h
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2019-08-14 07:39:04 +0000
committerclaudio <claudio@openbsd.org>2019-08-14 07:39:04 +0000
commit879ec5f74097da66185f9c7f8f258bf1dee44650 (patch)
tree92dcdcc10194e2e6756ad2b2c6db60e6c2b1003a /usr.sbin/bgpd/rde.h
parentImprove the error message when supplying an invalid template to vmctl (diff)
downloadwireguard-openbsd-879ec5f74097da66185f9c7f8f258bf1dee44650.tar.xz
wireguard-openbsd-879ec5f74097da66185f9c7f8f258bf1dee44650.zip
There is no longer a reason to use two structs for RIBs where one is part
of the other. Just merge struct rib_desc into struct rib. Makes code simpler. OK benno@
Diffstat (limited to 'usr.sbin/bgpd/rde.h')
-rw-r--r--usr.sbin/bgpd/rde.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h
index 455bc611aa1..32a1c083412 100644
--- a/usr.sbin/bgpd/rde.h
+++ b/usr.sbin/bgpd/rde.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.h,v 1.224 2019/08/13 12:16:20 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.225 2019/08/14 07:39:04 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
@@ -51,25 +51,21 @@ struct rib_entry {
struct rib {
struct rib_tree tree;
+ char name[PEER_DESCR_LEN];
+ struct filter_head *in_rules;
+ struct filter_head *in_rules_tmp;
u_int rtableid;
u_int rtableid_tmp;
u_int16_t flags;
u_int16_t flags_tmp;
u_int16_t id;
+ enum reconf_action state, fibstate;
};
#define RIB_ADJ_IN 0
#define RIB_LOC_START 1
#define RIB_NOTFOUND 0xffff
-struct rib_desc {
- char name[PEER_DESCR_LEN];
- struct rib rib;
- struct filter_head *in_rules;
- struct filter_head *in_rules_tmp;
- enum reconf_action state, fibstate;
-};
-
/*
* How do we identify peers between the session handler and the rde?
* Currently I assume that we can do that with the neighbor_ip...
@@ -507,13 +503,12 @@ pt_unref(struct pt_entry *pt)
/* rde_rib.c */
extern u_int16_t rib_size;
-extern struct rib_desc *ribs;
+extern struct rib *ribs;
struct rib *rib_new(char *, u_int, u_int16_t);
void rib_update(struct rib *);
struct rib *rib_byid(u_int16_t);
u_int16_t rib_find(char *);
-struct rib_desc *rib_desc(struct rib *);
void rib_free(struct rib *);
void rib_shutdown(void);
struct rib_entry *rib_get(struct rib *, struct bgpd_addr *, int);