Commit ae80a2de authored by Pavel Tvrdík's avatar Pavel Tvrdík Committed by Ondřej Zajíček

unsigned [int] -> uint

parent e348ef01
...@@ -38,7 +38,7 @@ static struct cmd_node cmd_root; ...@@ -38,7 +38,7 @@ static struct cmd_node cmd_root;
void void
cmd_build_tree(void) cmd_build_tree(void)
{ {
unsigned int i; uint i;
cmd_root.plastson = &cmd_root.son; cmd_root.plastson = &cmd_root.son;
......
...@@ -100,7 +100,7 @@ void cfg_copy_list(list *dest, list *src, unsigned node_size); ...@@ -100,7 +100,7 @@ void cfg_copy_list(list *dest, list *src, unsigned node_size);
/* Lexer */ /* Lexer */
extern int (*cf_read_hook)(byte *buf, unsigned int max, int fd); extern int (*cf_read_hook)(byte *buf, uint max, int fd);
struct symbol { struct symbol {
struct symbol *next; struct symbol *next;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* representation consists of @n ones followed by zeroes. * representation consists of @n ones followed by zeroes.
*/ */
u32 u32
u32_mkmask(unsigned n) u32_mkmask(uint n)
{ {
return n ? ~((1 << (32 - n)) - 1) : 0; return n ? ~((1 << (32 - n)) - 1) : 0;
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* u32_masklen Inverse operation to u32_mkmask, -1 if not a bitmask. * u32_masklen Inverse operation to u32_mkmask, -1 if not a bitmask.
*/ */
u32 u32_mkmask(unsigned n); u32 u32_mkmask(uint n);
int u32_masklen(u32 x); int u32_masklen(u32 x);
u32 u32_log2(u32 v); u32 u32_log2(u32 v);
......
...@@ -28,7 +28,7 @@ add32(u32 sum, u32 x) ...@@ -28,7 +28,7 @@ add32(u32 sum, u32 x)
} }
static u16 static u16
ipsum_calc_block(u32 *buf, unsigned len, u16 isum) ipsum_calc_block(u32 *buf, uint len, u16 isum)
{ {
/* /*
* A few simple facts about the IP checksum (see RFC 1071 for detailed * A few simple facts about the IP checksum (see RFC 1071 for detailed
...@@ -57,7 +57,7 @@ ipsum_calc_block(u32 *buf, unsigned len, u16 isum) ...@@ -57,7 +57,7 @@ ipsum_calc_block(u32 *buf, unsigned len, u16 isum)
} }
static u16 static u16
ipsum_calc(void *frag, unsigned len, va_list args) ipsum_calc(void *frag, uint len, va_list args)
{ {
u16 sum = 0; u16 sum = 0;
...@@ -67,7 +67,7 @@ ipsum_calc(void *frag, unsigned len, va_list args) ...@@ -67,7 +67,7 @@ ipsum_calc(void *frag, unsigned len, va_list args)
frag = va_arg(args, void *); frag = va_arg(args, void *);
if (!frag) if (!frag)
break; break;
len = va_arg(args, unsigned); len = va_arg(args, uint);
} }
return sum; return sum;
} }
...@@ -87,7 +87,7 @@ ipsum_calc(void *frag, unsigned len, va_list args) ...@@ -87,7 +87,7 @@ ipsum_calc(void *frag, unsigned len, va_list args)
* Result: 1 if the checksum is correct, 0 else. * Result: 1 if the checksum is correct, 0 else.
*/ */
int int
ipsum_verify(void *frag, unsigned len, ...) ipsum_verify(void *frag, uint len, ...)
{ {
va_list args; va_list args;
u16 sum; u16 sum;
...@@ -110,7 +110,7 @@ ipsum_verify(void *frag, unsigned len, ...) ...@@ -110,7 +110,7 @@ ipsum_verify(void *frag, unsigned len, ...)
* up checksum calculation as much as possible. * up checksum calculation as much as possible.
*/ */
u16 u16
ipsum_calculate(void *frag, unsigned len, ...) ipsum_calculate(void *frag, uint len, ...)
{ {
va_list args; va_list args;
u16 sum; u16 sum;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* fragments finished by NULL pointer. * fragments finished by NULL pointer.
*/ */
int ipsum_verify(void *frag, unsigned len, ...); int ipsum_verify(void *frag, uint len, ...);
u16 ipsum_calculate(void *frag, unsigned len, ...); u16 ipsum_calculate(void *frag, uint len, ...);
#endif #endif
...@@ -471,11 +471,11 @@ int ip6_pton(char *a, ip6_addr *o); ...@@ -471,11 +471,11 @@ int ip6_pton(char *a, ip6_addr *o);
#define ipa_in_net(x,n,p) (ipa_zero(ipa_and(ipa_xor((n),(x)),ipa_mkmask(p)))) #define ipa_in_net(x,n,p) (ipa_zero(ipa_and(ipa_xor((n),(x)),ipa_mkmask(p))))
#define net_in_net(n1,l1,n2,l2) (((l1) >= (l2)) && (ipa_zero(ipa_and(ipa_xor((n1),(n2)),ipa_mkmask(l2))))) #define net_in_net(n1,l1,n2,l2) (((l1) >= (l2)) && (ipa_zero(ipa_and(ipa_xor((n1),(n2)),ipa_mkmask(l2)))))
char *ip_scope_text(unsigned); char *ip_scope_text(uint);
struct prefix { struct prefix {
ip_addr addr; ip_addr addr;
unsigned int len; uint len;
}; };
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
struct lp_chunk { struct lp_chunk {
struct lp_chunk *next; struct lp_chunk *next;
unsigned int size; uint size;
uintptr_t data_align[0]; uintptr_t data_align[0];
byte data[0]; byte data[0];
}; };
...@@ -37,7 +37,7 @@ struct linpool { ...@@ -37,7 +37,7 @@ struct linpool {
byte *ptr, *end; byte *ptr, *end;
struct lp_chunk *first, *current, **plast; /* Normal (reusable) chunks */ struct lp_chunk *first, *current, **plast; /* Normal (reusable) chunks */
struct lp_chunk *first_large; /* Large chunks */ struct lp_chunk *first_large; /* Large chunks */
unsigned chunk_size, threshold, total, total_large; uint chunk_size, threshold, total, total_large;
}; };
static void lp_free(resource *); static void lp_free(resource *);
...@@ -64,7 +64,7 @@ static struct resclass lp_class = { ...@@ -64,7 +64,7 @@ static struct resclass lp_class = {
* @blk. * @blk.
*/ */
linpool linpool
*lp_new(pool *p, unsigned blk) *lp_new(pool *p, uint blk)
{ {
linpool *m = ralloc(p, &lp_class); linpool *m = ralloc(p, &lp_class);
m->plast = &m->first; m->plast = &m->first;
...@@ -88,7 +88,7 @@ linpool ...@@ -88,7 +88,7 @@ linpool
* size chunk, an "overflow" chunk is created for it instead. * size chunk, an "overflow" chunk is created for it instead.
*/ */
void * void *
lp_alloc(linpool *m, unsigned size) lp_alloc(linpool *m, uint size)
{ {
byte *a = (byte *) BIRD_ALIGN((unsigned long) m->ptr, CPU_STRUCT_ALIGN); byte *a = (byte *) BIRD_ALIGN((unsigned long) m->ptr, CPU_STRUCT_ALIGN);
byte *e = a + size; byte *e = a + size;
...@@ -146,7 +146,7 @@ lp_alloc(linpool *m, unsigned size) ...@@ -146,7 +146,7 @@ lp_alloc(linpool *m, unsigned size)
* how to allocate strings without any space overhead. * how to allocate strings without any space overhead.
*/ */
void * void *
lp_allocu(linpool *m, unsigned size) lp_allocu(linpool *m, uint size)
{ {
byte *a = m->ptr; byte *a = m->ptr;
byte *e = a + size; byte *e = a + size;
...@@ -168,7 +168,7 @@ lp_allocu(linpool *m, unsigned size) ...@@ -168,7 +168,7 @@ lp_allocu(linpool *m, unsigned size)
* clears the allocated memory block. * clears the allocated memory block.
*/ */
void * void *
lp_allocz(linpool *m, unsigned size) lp_allocz(linpool *m, uint size)
{ {
void *z = lp_alloc(m, size); void *z = lp_alloc(m, size);
......
...@@ -355,7 +355,7 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args) ...@@ -355,7 +355,7 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)
} else if (flags & SIGN) } else if (flags & SIGN)
num = va_arg(args, int); num = va_arg(args, int);
else else
num = va_arg(args, unsigned int); num = va_arg(args, uint);
str = number(str, num, base, field_width, precision, flags, size); str = number(str, num, base, field_width, precision, flags, size);
if (!str) if (!str)
return -1; return -1;
......
...@@ -51,7 +51,7 @@ static size_t slab_memsize(resource *r); ...@@ -51,7 +51,7 @@ static size_t slab_memsize(resource *r);
struct slab { struct slab {
resource r; resource r;
unsigned size; uint size;
list objs; list objs;
}; };
...@@ -71,7 +71,7 @@ struct sl_obj { ...@@ -71,7 +71,7 @@ struct sl_obj {
}; };
slab * slab *
sl_new(pool *p, unsigned size) sl_new(pool *p, uint size)
{ {
slab *s = ralloc(p, &sl_class); slab *s = ralloc(p, &sl_class);
s->size = size; s->size = size;
...@@ -144,7 +144,7 @@ slab_memsize(resource *r) ...@@ -144,7 +144,7 @@ slab_memsize(resource *r)
struct slab { struct slab {
resource r; resource r;
unsigned obj_size, head_size, objs_per_slab, num_empty_heads, data_size; uint obj_size, head_size, objs_per_slab, num_empty_heads, data_size;
list empty_heads, partial_heads, full_heads; list empty_heads, partial_heads, full_heads;
}; };
...@@ -185,10 +185,10 @@ struct sl_alignment { /* Magic structure for testing of alignment */ ...@@ -185,10 +185,10 @@ struct sl_alignment { /* Magic structure for testing of alignment */
* objects of size @size can be allocated. * objects of size @size can be allocated.
*/ */
slab * slab *
sl_new(pool *p, unsigned size) sl_new(pool *p, uint size)
{ {
slab *s = ralloc(p, &sl_class); slab *s = ralloc(p, &sl_class);
unsigned int align = sizeof(struct sl_alignment); uint align = sizeof(struct sl_alignment);
if (align < sizeof(int)) if (align < sizeof(int))
align = sizeof(int); align = sizeof(int);
s->data_size = size; s->data_size = size;
...@@ -214,7 +214,7 @@ sl_new_head(slab *s) ...@@ -214,7 +214,7 @@ sl_new_head(slab *s)
struct sl_head *h = xmalloc(SLAB_SIZE); struct sl_head *h = xmalloc(SLAB_SIZE);
struct sl_obj *o = (struct sl_obj *)((byte *)h+s->head_size); struct sl_obj *o = (struct sl_obj *)((byte *)h+s->head_size);
struct sl_obj *no; struct sl_obj *no;
unsigned int n = s->objs_per_slab; uint n = s->objs_per_slab;
h->first_free = o; h->first_free = o;
h->num_full = 0; h->num_full = 0;
......
...@@ -20,7 +20,7 @@ typedef struct birdsock { ...@@ -20,7 +20,7 @@ typedef struct birdsock {
int type; /* Socket type */ int type; /* Socket type */
void *data; /* User data */ void *data; /* User data */
ip_addr saddr, daddr; /* IPA_NONE = unspecified */ ip_addr saddr, daddr; /* IPA_NONE = unspecified */
unsigned sport, dport; /* 0 = unspecified (for IP: protocol type) */ uint sport, dport; /* 0 = unspecified (for IP: protocol type) */
int tos; /* TOS / traffic class, -1 = default */ int tos; /* TOS / traffic class, -1 = default */
int priority; /* Local socket priority, -1 = default */ int priority; /* Local socket priority, -1 = default */
int ttl; /* Time To Live, -1 = default */ int ttl; /* Time To Live, -1 = default */
...@@ -28,20 +28,20 @@ typedef struct birdsock { ...@@ -28,20 +28,20 @@ typedef struct birdsock {
struct iface *iface; /* Interface; specify this for broad/multicast sockets */ struct iface *iface; /* Interface; specify this for broad/multicast sockets */
byte *rbuf, *rpos; /* NULL=allocate automatically */ byte *rbuf, *rpos; /* NULL=allocate automatically */
unsigned rbsize; uint rbsize;
int (*rx_hook)(struct birdsock *, int size); /* NULL=receiving turned off, returns 1 to clear rx buffer */ int (*rx_hook)(struct birdsock *, int size); /* NULL=receiving turned off, returns 1 to clear rx buffer */
byte *tbuf, *tpos; /* NULL=allocate automatically */ byte *tbuf, *tpos; /* NULL=allocate automatically */
byte *ttx; /* Internal */ byte *ttx; /* Internal */
unsigned tbsize; uint tbsize;
void (*tx_hook)(struct birdsock *); void (*tx_hook)(struct birdsock *);
void (*err_hook)(struct birdsock *, int); /* errno or zero if EOF */ void (*err_hook)(struct birdsock *, int); /* errno or zero if EOF */
/* Information about received datagrams (UDP, RAW), valid in rx_hook */ /* Information about received datagrams (UDP, RAW), valid in rx_hook */
ip_addr faddr, laddr; /* src (From) and dst (Local) address of the datagram */ ip_addr faddr, laddr; /* src (From) and dst (Local) address of the datagram */
unsigned fport; /* src port of the datagram */ uint fport; /* src port of the datagram */
unsigned lifindex; /* local interface that received the datagram */ uint lifindex; /* local interface that received the datagram */
/* laddr and lifindex are valid only if SKF_LADDR_RX flag is set to request it */ /* laddr and lifindex are valid only if SKF_LADDR_RX flag is set to request it */
int af; /* Address family (AF_INET, AF_INET6 or 0 for non-IP) of fd */ int af; /* Address family (AF_INET, AF_INET6 or 0 for non-IP) of fd */
...@@ -59,8 +59,8 @@ sock *sock_new(pool *); /* Allocate new socket */ ...@@ -59,8 +59,8 @@ sock *sock_new(pool *); /* Allocate new socket */
int sk_open(sock *); /* Open socket */ int sk_open(sock *); /* Open socket */
int sk_rx_ready(sock *s); int sk_rx_ready(sock *s);
int sk_send(sock *, unsigned len); /* Send data, <0=err, >0=ok, 0=sleep */ int sk_send(sock *, uint len); /* Send data, <0=err, >0=ok, 0=sleep */
int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to given destination */ int sk_send_to(sock *, uint len, ip_addr to, uint port); /* sk_send to given destination */
void sk_reallocate(sock *); /* Free and allocate tbuf & rbuf */ void sk_reallocate(sock *); /* Free and allocate tbuf & rbuf */
void sk_set_rbsize(sock *s, uint val); /* Resize RX buffer */ void sk_set_rbsize(sock *s, uint val); /* Resize RX buffer */
void sk_set_tbsize(sock *s, uint val); /* Resize TX buffer, keeping content */ void sk_set_tbsize(sock *s, uint val); /* Resize TX buffer, keeping content */
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* Wherever possible, please use the memory resources instead. * Wherever possible, please use the memory resources instead.
*/ */
void * void *
xmalloc(unsigned size) xmalloc(uint size)
{ {
void *p = malloc(size); void *p = malloc(size);
if (p) if (p)
...@@ -44,7 +44,7 @@ xmalloc(unsigned size) ...@@ -44,7 +44,7 @@ xmalloc(unsigned size)
* Wherever possible, please use the memory resources instead. * Wherever possible, please use the memory resources instead.
*/ */
void * void *
xrealloc(void *ptr, unsigned size) xrealloc(void *ptr, uint size)
{ {
void *p = realloc(ptr, size); void *p = realloc(ptr, size);
if (p) if (p)
......
...@@ -23,7 +23,7 @@ int h[65536]; ...@@ -23,7 +23,7 @@ int h[65536];
* = ((1-1/k)^k)^a which we can approximate by e^-a. * = ((1-1/k)^k)^a which we can approximate by e^-a.
*/ */
unsigned int hf(unsigned int n) uint hf(uint n)
{ {
#if 0 #if 0
n = (n ^ (n >> 16)) & 0xffff; n = (n ^ (n >> 16)) & 0xffff;
...@@ -58,7 +58,7 @@ main(int argc, char **argv) ...@@ -58,7 +58,7 @@ main(int argc, char **argv)
while (max--) while (max--)
{ {
unsigned int i, e; uint i, e;
if (scanf("%x/%d", &i, &e) != 2) if (scanf("%x/%d", &i, &e) != 2)
if (feof(stdin)) if (feof(stdin))
break; break;
......
...@@ -124,7 +124,7 @@ as_path_convert_to_new(struct adata *path, byte *dst, int req_as) ...@@ -124,7 +124,7 @@ as_path_convert_to_new(struct adata *path, byte *dst, int req_as)
} }
void void
as_path_format(struct adata *path, byte *buf, unsigned int size) as_path_format(struct adata *path, byte *buf, uint size)
{ {
byte *p = path->data; byte *p = path->data;
byte *e = p + path->length; byte *e = p + path->length;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
* the buffer to indicate truncation. * the buffer to indicate truncation.
*/ */
int int
int_set_format(struct adata *set, int way, int from, byte *buf, unsigned int size) int_set_format(struct adata *set, int way, int from, byte *buf, uint size)
{ {
u32 *z = (u32 *) set->data; u32 *z = (u32 *) set->data;
byte *end = buf + size - 24; byte *end = buf + size - 24;
...@@ -113,7 +113,7 @@ ec_format(byte *buf, u64 ec) ...@@ -113,7 +113,7 @@ ec_format(byte *buf, u64 ec)
} }
int int
ec_set_format(struct adata *set, int from, byte *buf, unsigned int size) ec_set_format(struct adata *set, int from, byte *buf, uint size)
{ {
u32 *z = int_set_get_data(set); u32 *z = int_set_get_data(set);
byte *end = buf + size - 24; byte *end = buf + size - 24;
......
...@@ -30,7 +30,7 @@ struct f_tree; ...@@ -30,7 +30,7 @@ struct f_tree;
struct adata *as_path_prepend(struct linpool *pool, struct adata *olda, u32 as); struct adata *as_path_prepend(struct linpool *pool, struct adata *olda, u32 as);
int as_path_convert_to_old(struct adata *path, byte *dst, int *new_used); int as_path_convert_to_old(struct adata *path, byte *dst, int *new_used);
int as_path_convert_to_new(struct adata *path, byte *dst, int req_as); int as_path_convert_to_new(struct adata *path, byte *dst, int req_as);
void as_path_format(struct adata *path, byte *buf, unsigned int size); void as_path_format(struct adata *path, byte *buf, uint size);
int as_path_getlen(struct adata *path); int as_path_getlen(struct adata *path);
int as_path_getlen_int(struct adata *path, int bs); int as_path_getlen_int(struct adata *path, int bs);
int as_path_get_first(struct adata *path, u32 *orig_as); int as_path_get_first(struct adata *path, u32 *orig_as);
...@@ -95,9 +95,9 @@ static inline u64 ec_ip4(u64 kind, u64 key, u64 val) ...@@ -95,9 +95,9 @@ static inline u64 ec_ip4(u64 kind, u64 key, u64 val)
static inline u64 ec_generic(u64 key, u64 val) static inline u64 ec_generic(u64 key, u64 val)
{ return (key << 32) | val; } { return (key << 32) | val; }
int int_set_format(struct adata *set, int way, int from, byte *buf, unsigned int size); int int_set_format(struct adata *set, int way, int from, byte *buf, uint size);
int ec_format(byte *buf, u64 ec); int ec_format(byte *buf, u64 ec);
int ec_set_format(struct adata *set, int from, byte *buf, unsigned int size); int ec_set_format(struct adata *set, int from, byte *buf, uint size);
int int_set_contains(struct adata *list, u32 val); int int_set_contains(struct adata *list, u32 val);
int ec_set_contains(struct adata *list, u64 val); int ec_set_contains(struct adata *list, u64 val);
struct adata *int_set_add(struct linpool *pool, struct adata *list, u32 val); struct adata *int_set_add(struct linpool *pool, struct adata *list, u32 val);
......
...@@ -163,7 +163,7 @@ static void ...@@ -163,7 +163,7 @@ static void
cli_copy_message(cli *c) cli_copy_message(cli *c)
{ {
byte *p, *q; byte *p, *q;
unsigned int cnt = 2; uint cnt = 2;
if (c->ring_overflow) if (c->ring_overflow)
{ {
...@@ -230,12 +230,12 @@ cli_written(cli *c) ...@@ -230,12 +230,12 @@ cli_written(cli *c)
static byte *cli_rh_pos; static byte *cli_rh_pos;
static unsigned int cli_rh_len; static uint cli_rh_len;
static int cli_rh_trick_flag; static int cli_rh_trick_flag;
struct cli *this_cli; struct cli *this_cli;
static int static int
cli_cmd_read_hook(byte *buf, unsigned int max, UNUSED int fd) cli_cmd_read_hook(byte *buf, uint max, UNUSED int fd)
{ {
if (!cli_rh_trick_flag) if (!cli_rh_trick_flag)
{ {
...@@ -330,7 +330,7 @@ static list cli_log_hooks; ...@@ -330,7 +330,7 @@ static list cli_log_hooks;
static int cli_log_inited; static int cli_log_inited;
void void
cli_set_log_echo(cli *c, unsigned int mask, unsigned int size) cli_set_log_echo(cli *c, uint mask, uint size)
{ {
if (c->ring_buf) if (c->ring_buf)
{ {
...@@ -351,7 +351,7 @@ cli_set_log_echo(cli *c, unsigned int mask, unsigned int size) ...@@ -351,7 +351,7 @@ cli_set_log_echo(cli *c, unsigned int mask, unsigned int size)
} }
void void
cli_echo(unsigned int class, byte *msg) cli_echo(uint class, byte *msg)
{ {
unsigned len, free, i, l; unsigned len, free, i, l;
cli *c; cli *c;
......
...@@ -40,10 +40,10 @@ typedef struct cli { ...@@ -40,10 +40,10 @@ typedef struct cli {
struct linpool *parser_pool; /* Pool used during parsing */ struct linpool *parser_pool; /* Pool used during parsing */
byte *ring_buf; /* Ring buffer for asynchronous messages */ byte *ring_buf; /* Ring buffer for asynchronous messages */
byte *ring_end, *ring_read, *ring_write; /* Pointers to the ring buffer */ byte *ring_end, *ring_read, *ring_write; /* Pointers to the ring buffer */
unsigned int ring_overflow; /* Counter of ring overflows */ uint ring_overflow; /* Counter of ring overflows */
unsigned int log_mask; /* Mask of allowed message levels */ uint log_mask; /* Mask of allowed message levels */
unsigned int log_threshold; /* When free < log_threshold, store only important messages */ uint log_threshold; /* When free < log_threshold, store only important messages */
unsigned int async_msg_size; /* Total size of async messages queued in tx_buf */ uint async_msg_size; /* Total size of async messages queued in tx_buf */
} cli; } cli;
extern pool *cli_pool; extern pool *cli_pool;
...@@ -55,7 +55,7 @@ extern struct cli *this_cli; /* Used during parsing */ ...@@ -55,7 +55,7 @@ extern struct cli *this_cli; /* Used during parsing */
void cli_printf(cli *, int, char *, ...); void cli_printf(cli *, int, char *, ...);
#define cli_msg(x...) cli_printf(this_cli, x) #define cli_msg(x...) cli_printf(this_cli, x)
void cli_set_log_echo(cli *, unsigned int mask, unsigned int size); void cli_set_log_echo(cli *, uint mask, uint size);
/* Functions provided to sysdep layer */ /* Functions provided to sysdep layer */
...@@ -64,7 +64,7 @@ void cli_init(void); ...@@ -64,7 +64,7 @@ void cli_init(void);
void cli_free(cli *); void cli_free(cli *);
void cli_kick(cli *); void cli_kick(cli *);
void cli_written(cli *); void cli_written(cli *);
void cli_echo(unsigned int class, byte *msg); void cli_echo(uint class, byte *msg);
static inline int cli_access_restricted(void) static inline int cli_access_restricted(void)
{ {
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
static slab *neigh_slab; static slab *neigh_slab;
static list sticky_neigh_list, neigh_hash_table[NEIGH_HASH_SIZE]; static list sticky_neigh_list, neigh_hash_table[NEIGH_HASH_SIZE];
static inline unsigned int static inline uint
neigh_hash(struct proto *p, ip_addr *a) neigh_hash(struct proto *p, ip_addr *a)
{ {
return (p->hash_key ^ ipa_hash(*a)) & (NEIGH_HASH_SIZE-1); return (p->hash_key ^ ipa_hash(*a)) & (NEIGH_HASH_SIZE-1);
...@@ -126,7 +126,7 @@ neigh_find2(struct proto *p, ip_addr *a, struct iface *ifa, unsigned flags) ...@@ -126,7 +126,7 @@ neigh_find2(struct proto *p, ip_addr *a, struct iface *ifa, unsigned flags)
{ {
neighbor *n; neighbor *n;
int class, scope = -1; int class, scope = -1;
unsigned int h = neigh_hash(p, a); uint h = neigh_hash(p, a);
struct iface *i; struct iface *i;
struct ifa *addr; struct ifa *addr;
......
...@@ -1488,7 +1488,7 @@ proto_show_basic_info(struct proto *p) ...@@ -1488,7 +1488,7 @@ proto_show_basic_info(struct proto *p)
} }
void void
proto_cmd_show(struct proto *p, unsigned int verbose, int cnt) proto_cmd_show(struct proto *p, uint verbose, int cnt)
{ {
byte buf[256], tbuf[TM_DATETIME_BUFFER_SIZE]; byte buf[256], tbuf[TM_DATETIME_BUFFER_SIZE];
...@@ -1524,7 +1524,7 @@ proto_cmd_show(struct proto *p, unsigned int verbose, int cnt) ...@@ -1524,7 +1524,7 @@ proto_cmd_show(struct proto *p, unsigned int verbose, int cnt)
} }
void void
proto_cmd_disable(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED) proto_cmd_disable(struct proto *p, uint arg UNUSED, int cnt UNUSED)
{ {
if (p->disabled) if (p->disabled)
{ {
...@@ -1540,7 +1540,7 @@ proto_cmd_disable(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED) ...@@ -1540,7 +1540,7 @@ proto_cmd_disable(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED)
} }
void void
proto_cmd_enable(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED) proto_cmd_enable(struct proto *p, uint arg UNUSED, int cnt UNUSED)
{ {
if (!p->disabled) if (!p->disabled)
{ {
...@@ -1555,7 +1555,7 @@ proto_cmd_enable(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED) ...@@ -1555,7 +1555,7 @@ proto_cmd_enable(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED)
} }
void void
proto_cmd_restart(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED) proto_cmd_restart(struct proto *p, uint arg UNUSED, int cnt UNUSED)
{ {
if (p->disabled) if (p->disabled)
{ {
...@@ -1573,7 +1573,7 @@ proto_cmd_restart(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED) ...@@ -1573,7 +1573,7 @@ proto_cmd_restart(struct proto *p, unsigned int arg UNUSED, int cnt UNUSED)
} }
void void
proto_cmd_reload(struct proto *p, unsigned int dir, int cnt UNUSED) proto_cmd_reload(struct proto *p, uint dir, int cnt UNUSED)
{ {
if (p->disabled) if (p->disabled)
{ {
...@@ -1615,19 +1615,19 @@ proto_cmd_reload(struct proto *p, unsigned int dir, int cnt UNUSED) ...@@ -1615,19 +1615,19 @@ proto_cmd_reload(struct proto *p, unsigned int dir, int cnt UNUSED)
} }
void void
proto_cmd_debug(struct proto *p, unsigned int mask, int cnt UNUSED) proto_cmd_debug(struct proto *p, uint mask, int cnt UNUSED)
{ {
p->debug = mask; p->debug = mask;
} }
void void
proto_cmd_mrtdump(struct proto *p, unsigned int mask, int cnt UNUSED) proto_cmd_mrtdump(struct proto *p, uint mask, int cnt UNUSED)
{ {
p->mrtdump = mask;