Use standard unsigned integer types

This commit is contained in:
Andreas Steffen
2016-03-24 18:52:48 +01:00
parent b210369314
commit b12c53ce77
584 changed files with 3430 additions and 3430 deletions
@@ -55,7 +55,7 @@ struct private_kernel_listener_t {
/**
* current broadcast address of internal network
*/
u_int32_t broadcast;
uint32_t broadcast;
/**
* LAN interface index
@@ -105,7 +105,7 @@ static void send_net(private_forecast_forwarder_t *this,
/**
* Send a broadcast/multicast packet to a peer
*/
static void send_peer(private_forecast_forwarder_t *this, u_int32_t dst,
static void send_peer(private_forecast_forwarder_t *this, uint32_t dst,
void *buf, size_t len, int mark)
{
struct sockaddr_in addr = {
@@ -317,7 +317,7 @@ static void join_groups(private_kernel_listener_t *this, struct sockaddr *addr)
/**
* Attach the socket filter to the socket
*/
static bool attach_filter(int fd, u_int32_t broadcast)
static bool attach_filter(int fd, uint32_t broadcast)
{
struct sock_filter filter_code[] = {
/* destination address: is ... */
@@ -67,7 +67,7 @@ struct private_forecast_listener_t {
/**
* Broadcast address on LAN interface, network order
*/
u_int32_t broadcast;
uint32_t broadcast;
};
/**
@@ -85,13 +85,13 @@ typedef struct {
/** remote IKE_SA endpoint */
host_t *rhost;
/** inbound SPI */
u_int32_t spi;
uint32_t spi;
/** use UDP encapsulation */
bool encap;
/** whether we should allow reencapsulation of IPsec received forecasts */
bool reinject;
/** broadcast address used for that entry */
u_int32_t broadcast;
uint32_t broadcast;
} entry_t;
/**
@@ -115,7 +115,7 @@ static void entry_destroy(entry_t *entry)
static bool ts2in(traffic_selector_t *ts,
struct in_addr *addr, struct in_addr *mask)
{
u_int8_t bits;
uint8_t bits;
host_t *net;
if (ts->get_type(ts) == TS_IPV4_ADDR_RANGE &&
@@ -179,12 +179,12 @@ static bool manage_rule(struct iptc_handle *ipth, const char *chain,
static bool manage_pre_esp_in_udp(struct iptc_handle *ipth,
entry_t *entry, bool add)
{
u_int16_t match_size = XT_ALIGN(sizeof(struct ipt_entry_match)) +
uint16_t match_size = XT_ALIGN(sizeof(struct ipt_entry_match)) +
XT_ALIGN(sizeof(struct xt_udp));
u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
u_int16_t target_size = XT_ALIGN(sizeof(struct ipt_entry_target)) +
uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
uint16_t target_size = XT_ALIGN(sizeof(struct ipt_entry_target)) +
XT_ALIGN(sizeof(struct xt_mark_tginfo2));
u_int16_t entry_size = target_offset + target_size;
uint16_t entry_size = target_offset + target_size;
u_char ipt[entry_size], *pos = ipt;
struct ipt_entry *e;
@@ -240,12 +240,12 @@ static bool manage_pre_esp_in_udp(struct iptc_handle *ipth,
*/
static bool manage_pre_esp(struct iptc_handle *ipth, entry_t *entry, bool add)
{
u_int16_t match_size = XT_ALIGN(sizeof(struct ipt_entry_match)) +
uint16_t match_size = XT_ALIGN(sizeof(struct ipt_entry_match)) +
XT_ALIGN(sizeof(struct xt_esp));
u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
u_int16_t target_size = XT_ALIGN(sizeof(struct ipt_entry_target)) +
uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
uint16_t target_size = XT_ALIGN(sizeof(struct ipt_entry_target)) +
XT_ALIGN(sizeof(struct xt_mark_tginfo2));
u_int16_t entry_size = target_offset + target_size;
uint16_t entry_size = target_offset + target_size;
u_char ipt[entry_size], *pos = ipt;
struct ipt_entry *e;
@@ -306,10 +306,10 @@ static bool manage_pre(struct iptc_handle *ipth, entry_t *entry, bool add)
*/
static bool manage_out(struct iptc_handle *ipth, entry_t *entry, bool add)
{
u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry));
u_int16_t target_size = XT_ALIGN(sizeof(struct ipt_entry_target)) +
uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry));
uint16_t target_size = XT_ALIGN(sizeof(struct ipt_entry_target)) +
XT_ALIGN(sizeof(struct xt_mark_tginfo2));
u_int16_t entry_size = target_offset + target_size;
uint16_t entry_size = target_offset + target_size;
u_char ipt[entry_size], *pos = ipt;
struct ipt_entry *e;
@@ -617,7 +617,7 @@ METHOD(listener_t, ike_update, bool,
* Filter to map entries to ts/mark
*/
static bool ts_filter(entry_t *entry, traffic_selector_t **ts,
traffic_selector_t **out, void *dummy, u_int32_t *mark,
traffic_selector_t **out, void *dummy, uint32_t *mark,
void *dummy2, bool *reinject)
{
*out = *ts;