summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-05-23 19:01:09 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-05-23 19:01:09 +0000
commit6a6120e22f6705e7e0789334c2f9883205a9162c (patch)
tree339aaa4d54188d9ee437be0758a0e7cdca1317f5 /usr.sbin
parent34d9d678a2d62a55959c30256161a9420299ff6e (diff)
Change ldpctl(8) to use C99-style fixed-width integers.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldpctl/ldpctl.c12
-rw-r--r--usr.sbin/ldpctl/parser.c8
-rw-r--r--usr.sbin/ldpctl/parser.h6
3 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/ldpctl/ldpctl.c b/usr.sbin/ldpctl/ldpctl.c
index 15f00acd8cb..2882d77a832 100644
--- a/usr.sbin/ldpctl/ldpctl.c
+++ b/usr.sbin/ldpctl/ldpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpctl.c,v 1.26 2016/05/23 17:53:11 renato Exp $
+/* $OpenBSD: ldpctl.c,v 1.27 2016/05/23 19:01:08 renato Exp $
*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -55,8 +55,8 @@ int show_fib_interface_msg(struct imsg *);
int show_l2vpn_pw_msg(struct imsg *);
int show_l2vpn_binding_msg(struct imsg *);
const char *get_media_descr(uint64_t);
-void print_baudrate(u_int64_t);
-const char *print_pw_type(u_int16_t);
+void print_baudrate(uint64_t);
+const char *print_pw_type(uint16_t);
struct imsgbuf *ibuf;
@@ -309,7 +309,7 @@ fmt_timeframe_core(time_t t)
}
/* prototype defined in ldpd.h and shared with the kroute.c version */
-u_int8_t
+uint8_t
mask2prefixlen(in_addr_t ina)
{
if (ina == 0)
@@ -647,7 +647,7 @@ get_linkstate(uint8_t if_type, int link_state)
}
void
-print_baudrate(u_int64_t baudrate)
+print_baudrate(uint64_t baudrate)
{
if (baudrate > IF_Gbps(1))
printf("%llu GBit/s", baudrate / IF_Gbps(1));
@@ -660,7 +660,7 @@ print_baudrate(u_int64_t baudrate)
}
const char *
-print_pw_type(u_int16_t pw_type)
+print_pw_type(uint16_t pw_type)
{
static char buf[64];
diff --git a/usr.sbin/ldpctl/parser.c b/usr.sbin/ldpctl/parser.c
index 96d93d7ba9b..e4ca6846be2 100644
--- a/usr.sbin/ldpctl/parser.c
+++ b/usr.sbin/ldpctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.8 2015/07/21 05:44:50 renato Exp $ */
+/* $OpenBSD: parser.c,v 1.9 2016/05/23 19:01:08 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -169,7 +169,7 @@ static const struct token *
match_token(const char *word, const struct token *table,
struct parse_result *res)
{
- u_int i, match;
+ uint i, match;
const struct token *t = NULL;
match = 0;
@@ -294,7 +294,7 @@ parse_addr(const char *word, struct in_addr *addr)
}
int
-parse_prefix(const char *word, struct in_addr *addr, u_int8_t *prefixlen)
+parse_prefix(const char *word, struct in_addr *addr, uint8_t *prefixlen)
{
struct in_addr ina;
int bits = 32;
@@ -322,7 +322,7 @@ parse_prefix(const char *word, struct in_addr *addr, u_int8_t *prefixlen)
/* XXX local copy from kroute.c, should go to shared file */
in_addr_t
-prefixlen2mask(u_int8_t prefixlen)
+prefixlen2mask(uint8_t prefixlen)
{
if (prefixlen == 0)
return (0);
diff --git a/usr.sbin/ldpctl/parser.h b/usr.sbin/ldpctl/parser.h
index 843391881ab..3cb816c04ee 100644
--- a/usr.sbin/ldpctl/parser.h
+++ b/usr.sbin/ldpctl/parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.h,v 1.7 2015/07/21 05:44:50 renato Exp $ */
+/* $OpenBSD: parser.h,v 1.8 2016/05/23 19:01:08 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -49,12 +49,12 @@ struct parse_result {
char ifname[IF_NAMESIZE];
int flags;
enum actions action;
- u_int8_t prefixlen;
+ uint8_t prefixlen;
};
struct parse_result *parse(int, char *[]);
int parse_addr(const char *, struct in_addr *);
int parse_prefix(const char *, struct in_addr *,
- u_int8_t *);
+ uint8_t *);
#endif /* _PARSER_H_ */