diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-09 01:56:19 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-09 01:56:19 +0000 |
commit | 43585362344529369bf0f466b1fe8b028726e020 (patch) | |
tree | a4cdd49568c678527cafc2e6258d7a7d5bb06d37 | |
parent | b708a70d545a6c6391448094ddfe9f87e06ba30b (diff) |
replace a bunch of u_long by u_int32_t
-rw-r--r-- | usr.sbin/bgpd/rde.c | 16 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde.h | 10 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_attr.c | 6 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_prefix.c | 12 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_rib.c | 14 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_update.c | 4 |
6 files changed, 31 insertions, 31 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index ec07a613c7c..2adb0d5797b 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.75 2004/02/09 01:46:34 henning Exp $ */ +/* $OpenBSD: rde.c,v 1.76 2004/02/09 01:56:18 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -50,7 +50,7 @@ void rde_update_log(const char *, const struct bgpd_addr *, u_int8_t); void rde_update_queue_runner(void); -void peer_init(struct peer *, u_long); +void peer_init(struct peer *, u_int32_t); struct rde_peer *peer_add(u_int32_t, struct peer_config *); void peer_remove(struct rde_peer *); struct rde_peer *peer_get(u_int32_t); @@ -83,9 +83,9 @@ rde_sighdlr(int sig) } } -u_long peerhashsize = 64; -u_long pathhashsize = 1024; -u_long nexthophashsize = 64; +u_int32_t peerhashsize = 64; +u_int32_t pathhashsize = 1024; +u_int32_t nexthophashsize = 64; int rde_main(struct bgpd_config *config, struct peer *peer_l, @@ -750,17 +750,17 @@ rde_update_queue_runner(void) */ struct peer_table { struct rde_peer_head *peer_hashtbl; - u_long peer_hashmask; + u_int32_t peer_hashmask; } peertable; #define PEER_HASH(x) \ &peertable.peer_hashtbl[(x) & peertable.peer_hashmask] void -peer_init(struct peer *peer_l, u_long hashsize) +peer_init(struct peer *peer_l, u_int32_t hashsize) { struct peer *p, *next; - u_long hs, i; + u_int32_t hs, i; for (hs = 1; hs < hashsize; hs <<= 1) ; diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h index 1da8ca5b6d9..bc64ec3c8d5 100644 --- a/usr.sbin/bgpd/rde.h +++ b/usr.sbin/bgpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.22 2004/02/02 18:06:32 claudio Exp $ */ +/* $OpenBSD: rde.h,v 1.23 2004/02/09 01:56:18 henning Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and @@ -61,7 +61,7 @@ struct rde_peer { struct aspath_head path_h; /* list of all as paths */ struct peer_config conf; enum peer_state state; - u_long prefix_cnt; + u_int32_t prefix_cnt; u_int32_t remote_bgpid; struct bgpd_addr remote_addr; struct bgpd_addr local_addr; @@ -233,10 +233,10 @@ u_char *aspath_dump(struct aspath *); u_int16_t aspath_length(struct aspath *); u_int16_t aspath_count(struct aspath *); u_int16_t aspath_neighbour(struct aspath *); -u_long aspath_hash(struct aspath *); +u_int32_t aspath_hash(struct aspath *); int aspath_compare(struct aspath *, struct aspath *); -void path_init(u_long); +void path_init(u_int32_t); void path_update(struct rde_peer *, struct attr_flags *, struct bgpd_addr *, int); struct rde_aspath *path_get(struct aspath *, struct rde_peer *); @@ -255,7 +255,7 @@ void prefix_updateall(struct rde_aspath *, enum nexthop_state); void prefix_destroy(struct prefix *); void prefix_network_clean(struct rde_peer *, time_t); -void nexthop_init(u_long); +void nexthop_init(u_int32_t); void nexthop_add(struct rde_aspath *); void nexthop_remove(struct rde_aspath *); void nexthop_update(struct kroute_nexthop *); diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index 7e78f472ffa..9fc75b1e40f 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.1 2004/02/04 09:18:03 claudio Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.2 2004/02/09 01:56:18 henning Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -393,11 +393,11 @@ aspath_neighbour(struct aspath *aspath) #define AS_HASH_INITIAL 8271 -u_long +u_int32_t aspath_hash(struct aspath *aspath) { u_int8_t *seg; - u_long hash; + u_int32_t hash; u_int16_t len, seg_size; u_int8_t i, seg_len, seg_type; diff --git a/usr.sbin/bgpd/rde_prefix.c b/usr.sbin/bgpd/rde_prefix.c index 489ea58055f..9a0e9a9a95b 100644 --- a/usr.sbin/bgpd/rde_prefix.c +++ b/usr.sbin/bgpd/rde_prefix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_prefix.c,v 1.9 2004/01/17 19:15:07 henning Exp $ */ +/* $OpenBSD: rde_prefix.c,v 1.10 2004/02/09 01:56:18 henning Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -54,7 +54,7 @@ LIST_HEAD(pt_entryhead, pt_entry); struct pt_table { struct pt_entryhead *pt_hashtbl; - u_long pt_hashmask; + u_int32_t pt_hashmask; }; #define MIN_PREFIX 0 @@ -64,7 +64,7 @@ struct pt_table { * size of the hashtable per prefixlen. The sizes were chosen from a bgp * dump done on Nov 4. 2003. */ -u_long pthashsize[MAX_PREFIX + 1 - MIN_PREFIX] = { +u_int32_t pthashsize[MAX_PREFIX + 1 - MIN_PREFIX] = { /* need to be power of 2 */ 1, 1, 1, 1, 1, 1, 1, 1, 16, 8, 8, 16, 32, 64, 256, 256, @@ -100,8 +100,8 @@ struct pt_stats { void pt_init(void) { - int i; - u_long j; + int i; + u_int32_t j; for (i = MIN_PREFIX; i <= MAX_PREFIX; i++) { pttable[i].pt_hashtbl = calloc(pthashsize[i], @@ -203,7 +203,7 @@ pt_dump(void (*upcall)(struct pt_entry *, void *), void *arg) { struct pt_entry *p; int i; - u_long j; + u_int32_t j; PT_STAT(pt_dump); for (i = MAX_PREFIX; i >= MIN_PREFIX; i--) { diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c index b30d3d63a84..c40e3db9535 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.32 2004/02/04 09:18:03 claudio Exp $ */ +/* $OpenBSD: rde_rib.c,v 1.33 2004/02/09 01:56:18 henning Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -79,16 +79,16 @@ static void path_free(struct rde_aspath *); struct path_table { struct aspath_head *path_hashtbl; - u_long path_hashmask; + u_int32_t path_hashmask; } pathtable; #define PATH_HASH(x) \ &pathtable.path_hashtbl[aspath_hash((x)) & pathtable.path_hashmask] void -path_init(u_long hashsize) +path_init(u_int32_t hashsize) { - u_long hs, i; + u_int32_t hs, i; for (hs = 1; hs < hashsize; hs <<= 1) ; @@ -643,7 +643,7 @@ static void nexthop_free(struct nexthop *); */ struct nexthop_table { LIST_HEAD(, nexthop) *nexthop_hashtbl; - u_long nexthop_hashmask; + u_int32_t nexthop_hashmask; } nexthoptable; #define NEXTHOP_HASH(x) \ @@ -651,10 +651,10 @@ struct nexthop_table { nexthoptable.nexthop_hashmask] void -nexthop_init(u_long hashsize) +nexthop_init(u_int32_t hashsize) { struct nexthop *nh; - u_long hs, i; + u_int32_t hs, i; for (hs = 1; hs < hashsize; hs <<= 1) ; diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c index b4751b3f06c..c4c1b8335ae 100644 --- a/usr.sbin/bgpd/rde_update.c +++ b/usr.sbin/bgpd/rde_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_update.c,v 1.1 2004/02/04 09:07:44 claudio Exp $ */ +/* $OpenBSD: rde_update.c,v 1.2 2004/02/09 01:56:18 henning Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -40,7 +40,7 @@ struct update_prefix { }; struct update_attr { - u_long attr_hash; + u_int32_t attr_hash; u_char *attr; u_int16_t attr_len; struct uplist_prefix prefix_h; |