diff options
Diffstat (limited to 'proto/bgp')
-rw-r--r-- | proto/bgp/attrs.c | 14 | ||||
-rw-r--r-- | proto/bgp/bgp.h | 8 | ||||
-rw-r--r-- | proto/bgp/packets.c | 8 |
3 files changed, 15 insertions, 15 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 72b45d47..d56c017d 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -114,7 +114,7 @@ path_segment_contains(byte *p, int bs, u32 asn) /* Validates path attribute, removes AS_CONFED_* segments, and also returns path length */ static int -validate_path(struct bgp_proto *p, int as_path, int bs, byte *idata, unsigned int *ilength) +validate_path(struct bgp_proto *p, int as_path, int bs, byte *idata, uint *ilength) { int res = 0; u8 *a, *dst; @@ -381,7 +381,7 @@ bgp_attach_attr_wa(ea_list **to, struct linpool *pool, unsigned attr, unsigned l } static int -bgp_encode_attr_hdr(byte *dst, unsigned int flags, unsigned code, int len) +bgp_encode_attr_hdr(byte *dst, uint flags, unsigned code, int len) { int wlen; @@ -473,10 +473,10 @@ bgp_get_attr_len(eattr *a) * * Result: Length of the attribute block generated or -1 if not enough space. */ -unsigned int +uint bgp_encode_attrs(struct bgp_proto *p, byte *w, ea_list *attrs, int remains) { - unsigned int i, code, type, flags; + uint i, code, type, flags; byte *start = w; int len, rv; @@ -1593,11 +1593,11 @@ bgp_remove_as4_attrs(struct bgp_proto *p, rta *a) * by a &rta. */ struct rta * -bgp_decode_attrs(struct bgp_conn *conn, byte *attr, unsigned int len, struct linpool *pool, int mandatory) +bgp_decode_attrs(struct bgp_conn *conn, byte *attr, uint len, struct linpool *pool, int mandatory) { struct bgp_proto *bgp = conn->bgp; rta *a = lp_alloc(pool, sizeof(struct rta)); - unsigned int flags, code, l, i, type; + uint flags, code, l, i, type; int errcode; byte *z, *attr_start; byte seen[256/8]; @@ -1791,7 +1791,7 @@ err: int bgp_get_attr(eattr *a, byte *buf, int buflen) { - unsigned int i = EA_ID(a->id); + uint i = EA_ID(a->id); struct attr_desc *d; int len; diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index f4f21226..446fc857 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -90,7 +90,7 @@ struct bgp_config { struct bgp_conn { struct bgp_proto *bgp; struct birdsock *sk; - unsigned int state; /* State of connection state machine */ + uint state; /* State of connection state machine */ struct timer *connect_retry_timer; struct timer *hold_timer; struct timer *keepalive_timer; @@ -142,7 +142,7 @@ struct bgp_proto { struct timer *startup_timer; /* Timer used to delay protocol startup due to previous errors (startup_delay) */ struct timer *gr_timer; /* Timer waiting for reestablishment after graceful restart */ struct bgp_bucket **bucket_hash; /* Hash table of attribute buckets */ - unsigned int hash_size, hash_count, hash_limit; + uint hash_size, hash_count, hash_limit; HASH(struct bgp_prefix) prefix_hash; /* Prefixes to be sent */ slab *prefix_slab; /* Slab holding prefix nodes */ list bucket_queue; /* Queue of buckets to send */ @@ -235,7 +235,7 @@ static inline void set_next_hop(byte *b, ip_addr addr) { ((ip_addr *) b)[0] = ad void bgp_attach_attr(struct ea_list **to, struct linpool *pool, unsigned attr, uintptr_t val); byte *bgp_attach_attr_wa(struct ea_list **to, struct linpool *pool, unsigned attr, unsigned len); -struct rta *bgp_decode_attrs(struct bgp_conn *conn, byte *a, unsigned int len, struct linpool *pool, int mandatory); +struct rta *bgp_decode_attrs(struct bgp_conn *conn, byte *a, uint len, struct linpool *pool, int mandatory); int bgp_get_attr(struct eattr *e, byte *buf, int buflen); int bgp_rte_better(struct rte *, struct rte *); int bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best); @@ -245,7 +245,7 @@ void bgp_init_bucket_table(struct bgp_proto *); void bgp_free_bucket(struct bgp_proto *p, struct bgp_bucket *buck); void bgp_init_prefix_table(struct bgp_proto *p, u32 order); void bgp_free_prefix(struct bgp_proto *p, struct bgp_prefix *bp); -unsigned int bgp_encode_attrs(struct bgp_proto *p, byte *w, ea_list *attrs, int remains); +uint bgp_encode_attrs(struct bgp_proto *p, byte *w, ea_list *attrs, int remains); void bgp_get_route_info(struct rte *, byte *buf, struct ea_list *attrs); inline static void bgp_attach_attr_ip(struct ea_list **to, struct linpool *pool, unsigned attr, ip_addr a) diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 4bd68f52..378f5ab1 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -289,8 +289,8 @@ bgp_create_open(struct bgp_conn *conn, byte *buf) } } -static unsigned int -bgp_encode_prefixes(struct bgp_proto *p, byte *w, struct bgp_bucket *buck, unsigned int remains) +static uint +bgp_encode_prefixes(struct bgp_proto *p, byte *w, struct bgp_bucket *buck, uint remains) { byte *start = w; ip_addr a; @@ -648,7 +648,7 @@ bgp_create_end_refresh(struct bgp_conn *conn, byte *buf) static void -bgp_create_header(byte *buf, unsigned int len, unsigned int type) +bgp_create_header(byte *buf, uint len, uint type) { memset(buf, 0xff, 16); /* Marker */ put_u16(buf+16, len); @@ -669,7 +669,7 @@ static int bgp_fire_tx(struct bgp_conn *conn) { struct bgp_proto *p = conn->bgp; - unsigned int s = conn->packets_to_send; + uint s = conn->packets_to_send; sock *sk = conn->sk; byte *buf, *pkt, *end; int type; |