diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-08-14 07:39:05 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-08-14 07:39:05 +0000 |
commit | 0d3964c58f5ad6c314f63f9be1485f21f2f9af61 (patch) | |
tree | 31c171479fe1aa8d7d514832ed9f6b641fdac2b7 /usr.sbin/bgpd/rde.h | |
parent | fd1e2c3940032086025dddcc3a88bd68b60a78e5 (diff) |
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.h | 17 |
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); |