diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2017-01-23 11:43:41 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2017-01-23 11:43:41 +0000 |
commit | 72f746df331fb59fe2b95196a6669d051adfac82 (patch) | |
tree | 374cad87ab2a0792c6df4277e03b30fb2b3fddb9 /usr.sbin/bgpd | |
parent | 10d5036c590dfcd39b88dee569d1a0bc0e5f3259 (diff) |
Rename struct rib to struct rib_desc. Mechanical change, OK gcc
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde.h | 24 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_rib.c | 32 |
3 files changed, 30 insertions, 30 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 0ad2e6ec684..9ec22fa5e6f 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.353 2016/11/10 09:18:33 phessler Exp $ */ +/* $OpenBSD: rde.c,v 1.354 2017/01/23 11:43:40 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -2717,7 +2717,7 @@ rde_reload_done(void) void rde_softreconfig_in(struct rib_entry *re, void *ptr) { - struct rib *rib = ptr; + struct rib_desc *rib = ptr; struct prefix *p, *np; struct pt_entry *pt; struct rde_peer *peer; diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h index ca3a66ca67c..20070e13f62 100644 --- a/usr.sbin/bgpd/rde.h +++ b/usr.sbin/bgpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.151 2016/10/27 08:21:58 phessler Exp $ */ +/* $OpenBSD: rde.h,v 1.152 2017/01/23 11:43:40 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and @@ -266,7 +266,7 @@ struct pt_entry_vpn4 { struct rib_context { LIST_ENTRY(rib_context) entry; struct rib_entry *ctx_re; - struct rib *ctx_rib; + struct rib_desc *ctx_rib; void (*ctx_upcall)(struct rib_entry *, void *); void (*ctx_done)(void *); void (*ctx_wait)(void *); @@ -284,7 +284,7 @@ struct rib_entry { u_int16_t flags; }; -struct rib { +struct rib_desc { char name[PEER_DESCR_LEN]; struct rib_tree rib; struct filter_head *in_rules; @@ -421,14 +421,14 @@ int pt_prefix_cmp(const struct pt_entry *, const struct pt_entry *); /* rde_rib.c */ extern u_int16_t rib_size; -extern struct rib *ribs; +extern struct rib_desc *ribs; u_int16_t rib_new(char *, u_int, u_int16_t); u_int16_t rib_find(char *); -void rib_free(struct rib *); -struct rib_entry *rib_get(struct rib *, struct bgpd_addr *, int); -struct rib_entry *rib_lookup(struct rib *, struct bgpd_addr *); -void rib_dump(struct rib *, void (*)(struct rib_entry *, void *), +void rib_free(struct rib_desc *); +struct rib_entry *rib_get(struct rib_desc *, struct bgpd_addr *, int); +struct rib_entry *rib_lookup(struct rib_desc *, struct bgpd_addr *); +void rib_dump(struct rib_desc *, void (*)(struct rib_entry *, void *), void *, u_int8_t); void rib_dump_r(struct rib_context *); void rib_dump_runner(void); @@ -436,7 +436,7 @@ int rib_dump_pending(void); void path_init(u_int32_t); void path_shutdown(void); -int path_update(struct rib *, struct rde_peer *, +int path_update(struct rib_desc *, struct rde_peer *, struct rde_aspath *, struct bgpd_addr *, int); int path_compare(struct rde_aspath *, struct rde_aspath *); struct rde_aspath *path_lookup(struct rde_aspath *, struct rde_peer *); @@ -449,12 +449,12 @@ struct rde_aspath *path_get(void); void path_put(struct rde_aspath *); #define PREFIX_SIZE(x) (((x) + 7) / 8 + 1) -struct prefix *prefix_get(struct rib *, struct rde_peer *, +struct prefix *prefix_get(struct rib_desc *, struct rde_peer *, struct bgpd_addr *, int, u_int32_t); -int prefix_add(struct rib *, struct rde_aspath *, +int prefix_add(struct rib_desc *, struct rde_aspath *, struct bgpd_addr *, int); void prefix_move(struct rde_aspath *, struct prefix *); -int prefix_remove(struct rib *, struct rde_peer *, +int prefix_remove(struct rib_desc *, struct rde_peer *, struct bgpd_addr *, int, u_int32_t); int prefix_write(u_char *, int, struct bgpd_addr *, u_int8_t); int prefix_writebuf(struct ibuf *, struct bgpd_addr *, u_int8_t); diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c index a759245c2a6..a2f4ef0e1aa 100644 --- a/usr.sbin/bgpd/rde_rib.c +++ b/usr.sbin/bgpd/rde_rib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_rib.c,v 1.143 2016/08/27 01:26:22 guenther Exp $ */ +/* $OpenBSD: rde_rib.c,v 1.144 2017/01/23 11:43:40 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -35,11 +35,11 @@ * This is achieved by heavily linking the different parts together. */ u_int16_t rib_size; -struct rib *ribs; +struct rib_desc *ribs; LIST_HEAD(, rib_context) rib_dump_h = LIST_HEAD_INITIALIZER(rib_dump_h); -struct rib_entry *rib_add(struct rib *, struct bgpd_addr *, int); +struct rib_entry *rib_add(struct rib_desc *, struct bgpd_addr *, int); int rib_compare(const struct rib_entry *, const struct rib_entry *); void rib_remove(struct rib_entry *); int rib_empty(struct rib_entry *); @@ -53,7 +53,7 @@ RB_GENERATE(rib_tree, rib_entry, rib_e, rib_compare); u_int16_t rib_new(char *name, u_int rtableid, u_int16_t flags) { - struct rib *xribs; + struct rib_desc *xribs; u_int16_t id; for (id = 0; id < rib_size; id++) { @@ -66,7 +66,7 @@ rib_new(char *name, u_int rtableid, u_int16_t flags) if (id >= rib_size) { if ((xribs = reallocarray(ribs, id + 1, - sizeof(struct rib))) == NULL) { + sizeof(struct rib_desc))) == NULL) { /* XXX this is not clever */ fatal("rib_add"); } @@ -74,7 +74,7 @@ rib_new(char *name, u_int rtableid, u_int16_t flags) rib_size = id + 1; } - bzero(&ribs[id], sizeof(struct rib)); + bzero(&ribs[id], sizeof(struct rib_desc)); strlcpy(ribs[id].name, name, sizeof(ribs[id].name)); RB_INIT(&ribs[id].rib); ribs[id].state = RECONF_REINIT; @@ -107,7 +107,7 @@ rib_find(char *name) } void -rib_free(struct rib *rib) +rib_free(struct rib_desc *rib) { struct rib_context *ctx, *next; struct rib_entry *re, *xre; @@ -153,7 +153,7 @@ rib_free(struct rib *rib) } filterlist_free(rib->in_rules_tmp); filterlist_free(rib->in_rules); - bzero(rib, sizeof(struct rib)); + bzero(rib, sizeof(struct rib_desc)); } int @@ -163,7 +163,7 @@ rib_compare(const struct rib_entry *a, const struct rib_entry *b) } struct rib_entry * -rib_get(struct rib *rib, struct bgpd_addr *prefix, int prefixlen) +rib_get(struct rib_desc *rib, struct bgpd_addr *prefix, int prefixlen) { struct rib_entry xre; struct pt_entry *pte; @@ -176,7 +176,7 @@ rib_get(struct rib *rib, struct bgpd_addr *prefix, int prefixlen) } struct rib_entry * -rib_lookup(struct rib *rib, struct bgpd_addr *addr) +rib_lookup(struct rib_desc *rib, struct bgpd_addr *addr) { struct rib_entry *re; int i; @@ -205,7 +205,7 @@ rib_lookup(struct rib *rib, struct bgpd_addr *addr) struct rib_entry * -rib_add(struct rib *rib, struct bgpd_addr *prefix, int prefixlen) +rib_add(struct rib_desc *rib, struct bgpd_addr *prefix, int prefixlen) { struct pt_entry *pte; struct rib_entry *re; @@ -263,7 +263,7 @@ rib_empty(struct rib_entry *re) } void -rib_dump(struct rib *rib, void (*upcall)(struct rib_entry *, void *), +rib_dump(struct rib_desc *rib, void (*upcall)(struct rib_entry *, void *), void *arg, u_int8_t aid) { struct rib_context *ctx; @@ -396,7 +396,7 @@ path_shutdown(void) } int -path_update(struct rib *rib, struct rde_peer *peer, struct rde_aspath *nasp, +path_update(struct rib_desc *rib, struct rde_peer *peer, struct rde_aspath *nasp, struct bgpd_addr *prefix, int prefixlen) { struct rde_aspath *asp; @@ -680,7 +680,7 @@ static void prefix_unlink(struct prefix *); * search for specified prefix of a peer. Returns NULL if not found. */ struct prefix * -prefix_get(struct rib *rib, struct rde_peer *peer, struct bgpd_addr *prefix, +prefix_get(struct rib_desc *rib, struct rde_peer *peer, struct bgpd_addr *prefix, int prefixlen, u_int32_t flags) { struct rib_entry *re; @@ -695,7 +695,7 @@ prefix_get(struct rib *rib, struct rde_peer *peer, struct bgpd_addr *prefix, * Adds or updates a prefix. */ int -prefix_add(struct rib *rib, struct rde_aspath *asp, struct bgpd_addr *prefix, +prefix_add(struct rib_desc *rib, struct rde_aspath *asp, struct bgpd_addr *prefix, int prefixlen) { @@ -782,7 +782,7 @@ prefix_move(struct rde_aspath *asp, struct prefix *p) * pt_entry -- become empty remove them too. */ int -prefix_remove(struct rib *rib, struct rde_peer *peer, struct bgpd_addr *prefix, +prefix_remove(struct rib_desc *rib, struct rde_peer *peer, struct bgpd_addr *prefix, int prefixlen, u_int32_t flags) { struct prefix *p; |