include: Use stdint types
PATCH 3/6 include: Use stdint types
Signed-off-by Felix Janda <[email protected]>
--- extensions/libct_proto_dccp.c | 2 +- extensions/libct_proto_gre.c | 2 +- extensions/libct_proto_icmp.c | 4 ++-- extensions/libct_proto_icmpv6.c | 4 ++-- extensions/libct_proto_sctp.c | 4 ++-- extensions/libct_proto_tcp.c | 2 +- extensions/libct_proto_udp.c | 2 +- extensions/libct_proto_udplite.c | 2 +- include/bitops.h | 14 +++++++------- include/helper.h | 2 +- src/filter.c | 4 ++-- src/helpers/amanda.c | 4 ++-- src/helpers/ftp.c | 2 +- src/helpers/ssdp.c | 2 +- src/internal_bypass.c | 4 ++-- src/sync-notrack.c | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-)
extensions/libct_proto_dccp.c +1 -1
@@ -118,7 +118,7 @@ static int parse_options(char c, unsigned int *flags) {int i; -u_int16_t port; +uint16_t port;switch (c) {case 1 :
extensions/libct_proto_gre.c +1 -1
@@ -91,7 +91,7 @@ static int parse_options(char c, unsigned int *flags) {switch (c) { -u_int16_t port; +uint16_t port;case '1' : port =htons (strtoul (optarg,NULL ,0 ));nfct_set_attr_u16 (ct,ATTR_ORIG_PORT_SRC , port);
extensions/libct_proto_icmp.c +2 -2
@@ -72,8 +72,8 @@ static int parse(char c, unsigned int *flags) {switch (c) { -u_int8_t tmp; -u_int16_t id; +uint8_t tmp; +uint16_t id;case '1' : tmp =atoi (optarg);nfct_set_attr_u8 (ct,ATTR_ICMP_TYPE , tmp);
extensions/libct_proto_icmpv6.c +2 -2
@@ -75,8 +75,8 @@ static int parse(char c, unsigned int *flags) {switch (c) { -u_int8_t tmp; -u_int16_t id; +uint8_t tmp; +uint16_t id;case '1' : tmp =atoi (optarg);nfct_set_attr_u8 (ct,ATTR_ICMP_TYPE , tmp);
extensions/libct_proto_sctp.c +2 -2
@@ -120,8 +120,8 @@ parse_options(char c, struct nf_conntrack *ct, unsigned int *flags) {int i; -u_int16_t port; -u_int32_t vtag; +uint16_t port; +uint32_t vtag;switch (c) {case 1 :
extensions/libct_proto_tcp.c +1 -1
@@ -106,7 +106,7 @@ static int parse_options(char c, unsigned int *flags) {int i; -u_int16_t port; +uint16_t port;switch (c) {case '1' :
extensions/libct_proto_udp.c +1 -1
@@ -87,7 +87,7 @@ static int parse_options(char c, unsigned int *flags) {switch (c) { -u_int16_t port; +uint16_t port;case '1' : port =htons (atoi (optarg));nfct_set_attr_u16 (ct,ATTR_ORIG_PORT_SRC , port);
extensions/libct_proto_udplite.c +1 -1
@@ -95,7 +95,7 @@ static int parse_options(char c, unsigned int *flags) {switch (c) { -u_int16_t port; +uint16_t port;case '1' : port =htons (atoi (optarg));nfct_set_attr_u16 (ct,ATTR_ORIG_PORT_SRC , port);
include/bitops.h +7 -7
@@ -1,34 +1,34 @@#ifndef _BITOPS_H_#define _BITOPS_H_ -#include <stdlib.h> +#include <stdint.h> -static inline void set_bit_u32 (int nr,u_int32_t *addr) +static inline void set_bit_u32 (int nr,uint32_t *addr) { addr[nr >>5 ] |= (1UL << (nr &31 )); } -static inline void unset_bit_u32 (int nr,u_int32_t *addr) +static inline void unset_bit_u32 (int nr,uint32_t *addr) { addr[nr >>5 ] &= ~(1UL << (nr &31 )); } -static inline int test_bit_u32 (int nr,const u_int32_t *addr) +static inline int test_bit_u32 (int nr,const uint32_t *addr) {return ((1UL << (nr &31 )) & (addr[nr >>5 ])) !=0 ; } -static inline void set_bit_u16 (int nr,u_int16_t *addr) +static inline void set_bit_u16 (int nr,uint16_t *addr) { addr[nr >>4 ] |= (1UL << (nr &15 )); } -static inline void unset_bit_u16 (int nr,u_int16_t *addr) +static inline void unset_bit_u16 (int nr,uint16_t *addr) { addr[nr >>4 ] &= ~(1UL << (nr &15 )); } -static inline int test_bit_u16 (int nr,const u_int16_t *addr) +static inline int test_bit_u16 (int nr,const uint16_t *addr) {return ((1UL << (nr &15 )) & (addr[nr >>4 ])) !=0 ; }
include/helper.h +1 -1
@@ -25,7 +25,7 @@ struct ctd_helper {int (*cb)(struct pkt_buff *pkt,uint32_t protoff,struct myct *ct, -u_int32_t ctinfo); +uint32_t ctinfo);struct ctd_helper_policy policy[CTD_HELPER_POLICY_MAX ];
src/filter.c +2 -2
@@ -33,8 +33,8 @@struct ct_filter {int logic[CT_FILTER_MAX ]; -u_int32_t l4protomap[IPPROTO_MAX /32 ]; -u_int16_t statemap[IPPROTO_MAX ]; +uint32_t l4protomap[IPPROTO_MAX /32 ]; +uint16_t statemap[IPPROTO_MAX ];struct hashtable *h;struct hashtable *h6;struct vector *v;
src/helpers/amanda.c +2 -2
@@ -34,7 +34,7 @@ static int nat_amanda(struct pkt_buff *pkt, uint32_t ctinfo, struct nf_expect *exp) {char buffer[sizeof ("65535" )]; -u_int16_t port, initial_port; +uint16_t port, initial_port;unsigned int ret;const struct nf_conntrack *expected;struct nf_conntrack *nat_tuple;
@@ -111,7 +111,7 @@ amanda_helper_cb(struct pkt_buff *pkt, uint32_t protoff,struct nf_expect *exp;char *data, *data_limit, *tmp;unsigned int dataoff, i; -u_int16_t port, len; +uint16_t port, len;int ret =NF_ACCEPT ;struct iphdr *iph;union nfct_attr_grp_addr saddr, daddr;
src/helpers/ftp.c +1 -1
@@ -58,7 +58,7 @@ enum nf_ct_ftp_type { };static int -get_ipv6_addr (const char *src,size_t dlen,struct in6_addr *dst,u_int8_t term) +get_ipv6_addr (const char *src,size_t dlen,struct in6_addr *dst,uint8_t term) {const char *end; int ret = in6_pton(src, min_t(size_t, dlen, 0xffff),
src/helpers/ssdp.c +1 -1
@@ -44,7 +44,7 @@ static int ssdp_helper_cb(struct pkt_buff *pkt, uint32_t protoff,struct iphdr *net_hdr = (struct iphdr *)pktb_network_header (pkt);int good_packet =0 ;struct nf_expect *exp; -u_int16_t port; +uint16_t port;unsigned int dataoff;void *sb_ptr;
src/internal_bypass.c +2 -2
@@ -49,7 +49,7 @@ internal_bypass_ct_dump_cb(enum nf_conntrack_msg_type type,static void internal_bypass_ct_dump (int fd,int type) {struct nfct_handle *h; -u_int32_t family =AF_UNSPEC ; +uint32_t family =AF_UNSPEC ;int ret; h =nfct_open (CONFIG (netlink).subsys_id,0 );
@@ -180,7 +180,7 @@ internal_bypass_exp_dump_cb(enum nf_conntrack_msg_type type,static void internal_bypass_exp_dump (int fd,int type) {struct nfct_handle *h; -u_int32_t family =AF_UNSPEC ; +uint32_t family =AF_UNSPEC ;int ret; h =nfct_open (CONFIG (netlink).subsys_id,0 );
src/sync-notrack.c +1 -1
@@ -99,7 +99,7 @@ static int kernel_resync_cb(enum nf_conntrack_msg_type type,static void kernel_resync (void ) {struct nfct_handle *h; -u_int32_t family =AF_UNSPEC ; +uint32_t family =AF_UNSPEC ;int ret; h =nfct_open (CONFIG (netlink).subsys_id,0 );
Signature · 1 line
2.3.6