diff options
author | Felix Janda <felix.janda@posteo.de> | 2015-05-16 13:31:38 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-05-25 21:01:14 +0200 |
commit | ec02e05cf4d1bbb66ee31223f9e96c28bf3ae6f1 (patch) | |
tree | 571beaf3b2b81398d7eb8d7c84bf3eceaf58cb07 /qa | |
parent | 32098096e759a2de36f104ac4ef79a14a328d8bf (diff) |
src: Use stdint types everywhere
Signed-off-by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'qa')
-rw-r--r-- | qa/ct_echo_event.c | 4 | ||||
-rw-r--r-- | qa/ct_mark_filter.c | 4 | ||||
-rw-r--r-- | qa/nssocket.c | 14 | ||||
-rw-r--r-- | qa/nssocket.h | 6 |
4 files changed, 14 insertions, 14 deletions
diff --git a/qa/ct_echo_event.c b/qa/ct_echo_event.c index 6874395..eb9c82f 100644 --- a/qa/ct_echo_event.c +++ b/qa/ct_echo_event.c @@ -11,7 +11,7 @@ static void udp_echo(const struct mnl_socket *nl, const char *pre, const char *post) { - u_int8_t proto = IPPROTO_UDP; + uint8_t proto = IPPROTO_UDP; sync_fifo(pre); timeout.tv_sec = INIT_TIMEOUT; @@ -25,7 +25,7 @@ static void udp_echo(const struct mnl_socket *nl, static void icmp_echo(const struct mnl_socket *nl, const char *pre, const char *post) { - u_int8_t proto = IPPROTO_ICMP; + uint8_t proto = IPPROTO_ICMP; sync_fifo(pre); timeout.tv_sec = INIT_TIMEOUT; diff --git a/qa/ct_mark_filter.c b/qa/ct_mark_filter.c index 276344a..cd6dd27 100644 --- a/qa/ct_mark_filter.c +++ b/qa/ct_mark_filter.c @@ -12,7 +12,7 @@ static void tcp_echo_before_fin(const struct mnl_socket *nl, const char *pre, const char *post) { - u_int8_t proto = IPPROTO_TCP; + uint8_t proto = IPPROTO_TCP; sync_fifo(pre); timeout.tv_sec = INIT_TIMEOUT; @@ -26,7 +26,7 @@ static void tcp_echo_before_fin(const struct mnl_socket *nl, static void tcp_echo_after_fin(const struct mnl_socket *nl, const char *pre, const char *post) { - u_int8_t proto = IPPROTO_TCP; + uint8_t proto = IPPROTO_TCP; sync_fifo(pre); timeout.tv_sec = INIT_TIMEOUT; diff --git a/qa/nssocket.c b/qa/nssocket.c index a5f606d..114938c 100644 --- a/qa/nssocket.c +++ b/qa/nssocket.c @@ -435,7 +435,7 @@ struct nf_conntrack *author_new(const struct nlmsghdr *nlh, void *data) ct = nfct_new(); assert(ct != NULL); assert(nfct_nlmsg_parse((nlh), ct) == 0); - assert_proto(ct, AF_INET, *(u_int8_t *) data); + assert_proto(ct, AF_INET, *(uint8_t *) data); assert_inaddr(ct, VETH_PARENT_ADDR, VETH_CHILD_ADDR); assert((nfct_get_attr_u32(ct, ATTR_STATUS) & IPS_SEEN_REPLY) == 0); timeout.tv_sec = nfct_get_attr_u32(ct, ATTR_TIMEOUT) + 1; @@ -452,7 +452,7 @@ struct nf_conntrack *author_update(const struct nlmsghdr *nlh, void *data) ct = nfct_new(); assert(ct != NULL); assert(nfct_nlmsg_parse((nlh), ct) == 0); - assert_proto(ct, AF_INET, *(u_int8_t *) data); + assert_proto(ct, AF_INET, *(uint8_t *) data); assert_inaddr(ct, VETH_PARENT_ADDR, VETH_CHILD_ADDR); assert((nfct_get_attr_u32(ct, ATTR_STATUS) & IPS_SEEN_REPLY)); timeout.tv_sec = nfct_get_attr_u32(ct, ATTR_TIMEOUT) + 1; @@ -469,7 +469,7 @@ struct nf_conntrack *author_destroy(const struct nlmsghdr *nlh, void *data) ct = nfct_new(); assert(ct != NULL); assert(nfct_nlmsg_parse((nlh), ct) == 0); - assert_proto(ct, AF_INET, *(u_int8_t *) data); + assert_proto(ct, AF_INET, *(uint8_t *) data); assert_inaddr(ct, VETH_PARENT_ADDR, VETH_CHILD_ADDR); assert((nfct_get_attr_u32(ct, ATTR_STATUS) & IPS_SEEN_REPLY)); @@ -477,7 +477,7 @@ struct nf_conntrack *author_destroy(const struct nlmsghdr *nlh, void *data) } void assert_proto(const struct nf_conntrack *ct, - u_int8_t l3proto, u_int8_t l4proto) + uint8_t l3proto, uint8_t l4proto) { assert(nfct_get_attr_u8(ct, ATTR_ORIG_L3PROTO) == l3proto); assert(nfct_get_attr_u8(ct, ATTR_REPL_L3PROTO) == l3proto); @@ -498,7 +498,7 @@ void assert_inaddr(const struct nf_conntrack *ct, } void assert_port(const struct nf_conntrack *ct, - u_int16_t src, u_int16_t dst) + uint16_t src, uint16_t dst) { if ((src)) { assert(nfct_get_attr_u16((ct), ATTR_ORIG_PORT_SRC) == htons((src))); @@ -511,7 +511,7 @@ void assert_port(const struct nf_conntrack *ct, } void assert_typecode(const struct nf_conntrack *ct, - u_int8_t type, u_int8_t code) + uint8_t type, uint8_t code) { assert(nfct_get_attr_u8((ct), ATTR_ICMP_TYPE) == type); assert(nfct_get_attr_u8((ct), ATTR_ICMP_CODE) == code); @@ -636,7 +636,7 @@ int cb_tcp_destroy(const struct nlmsghdr *nlh, void *data) void tcp_echo(const struct mnl_socket *nl, const char *pre, const char *post) { - u_int8_t proto = IPPROTO_TCP; + uint8_t proto = IPPROTO_TCP; sync_fifo(pre); timeout.tv_sec = INIT_TIMEOUT; diff --git a/qa/nssocket.h b/qa/nssocket.h index 17c859f..338ed2f 100644 --- a/qa/nssocket.h +++ b/qa/nssocket.h @@ -29,13 +29,13 @@ struct nf_conntrack *author_new(const struct nlmsghdr *nlh, void *data); struct nf_conntrack *author_update(const struct nlmsghdr *nlh, void *data); struct nf_conntrack *author_destroy(const struct nlmsghdr *nlh, void *data); void assert_proto(const struct nf_conntrack *ct, - u_int8_t l3proto, u_int8_t l4proto); + uint8_t l3proto, uint8_t l4proto); void assert_inaddr(const struct nf_conntrack *ct, const char *src, const char *dst); void assert_port(const struct nf_conntrack *ct, - u_int16_t src, u_int16_t dst); + uint16_t src, uint16_t dst); void assert_typecode(const struct nf_conntrack *ct, - u_int8_t type, u_int8_t code); + uint8_t type, uint8_t code); int cb_icmp_new(const struct nlmsghdr *nlh, void *data); int cb_icmp_update(const struct nlmsghdr *nlh, void *data); int cb_icmp_destroy(const struct nlmsghdr *nlh, void *data); |