diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-31 05:22:56 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-31 05:22:56 +0800 |
commit | 9ed3e1b3f37f446206ad0f438ffdecf588a32590 (patch) | |
tree | ccd4c03947e3a3de64bde3f0b26240c6140de153 | |
parent | 585f3d90d17745418e162b26e76f92d6c36cf3a0 (diff) |
u_int32_t -> uint32_t
-rw-r--r-- | include/mgcp_ss7.h | 6 | ||||
-rw-r--r-- | include/mtp_level3.h | 4 | ||||
-rw-r--r-- | src/bss_patch.c | 8 | ||||
-rw-r--r-- | src/mgcp/mgcp_network.c | 4 | ||||
-rw-r--r-- | src/mgcp_ss7.c | 6 | ||||
-rw-r--r-- | src/pcap.c | 16 | ||||
-rw-r--r-- | tests/mtp/mtp_parse_test.c | 2 |
7 files changed, 23 insertions, 23 deletions
diff --git a/include/mgcp_ss7.h b/include/mgcp_ss7.h index d3fae18..3c9b4b7 100644 --- a/include/mgcp_ss7.h +++ b/include/mgcp_ss7.h @@ -55,11 +55,11 @@ enum { struct mgcp_ss7_cmd { struct llist_head entry; uint8_t type; - u_int32_t port; - u_int32_t param; + uint32_t port; + uint32_t param; }; -void mgcp_ss7_exec(struct mgcp_ss7 *mgcp, uint8_t type, u_int32_t port, u_int32_t param); +void mgcp_ss7_exec(struct mgcp_ss7 *mgcp, uint8_t type, uint32_t port, uint32_t param); struct mgcp_ss7 *mgcp_ss7_init(int endpoints, const char *local_ip, const char *mgw_ip, int base_port, int payload); void mgcp_ss7_reset(struct mgcp_ss7 *mgcp); diff --git a/include/mtp_level3.h b/include/mtp_level3.h index 881cee3..ad00c1a 100644 --- a/include/mtp_level3.h +++ b/include/mtp_level3.h @@ -70,7 +70,7 @@ #define MTP_MAKE_APOC(apoc) \ (apoc & 0x3fff) #elif __BYTE_ORDER == __BIG_ENDIAN -static inline u_int32_t c_swap_32(u_int32_t in) +static inline uint32_t c_swap_32(uint32_t in) { return (((in & 0x000000ff) << 24) | ((in & 0x0000ff00) << 8) | @@ -116,7 +116,7 @@ struct mtp_level_3_hdr { spare : 2, ser_ind : 4; #endif - u_int32_t addr; + uint32_t addr; uint8_t data[0]; } __attribute__((packed)); diff --git a/src/bss_patch.c b/src/bss_patch.c index 2fa39a7..c4deeb2 100644 --- a/src/bss_patch.c +++ b/src/bss_patch.c @@ -149,7 +149,7 @@ int bss_patch_filter_msg(struct msgb *msg, struct sccp_parse_result *sccp) static void create_cr(struct msgb *target, struct msgb *inpt, struct sccp_parse_result *sccp) { - static const u_int32_t optional_offset = + static const uint32_t optional_offset = offsetof(struct sccp_connection_request, optional_start); unsigned int optional_length, optional_start; @@ -241,7 +241,7 @@ void bss_rewrite_header_for_msc(int rc, struct msgb *target, struct msgb *inpt, } /* it is asssumed that the SCCP stack checked the size */ -static int patch_address(u_int32_t offset, int pc, struct msgb *msg) +static int patch_address(uint32_t offset, int pc, struct msgb *msg) { struct sccp_called_party_address *party; uint8_t *the_pc; @@ -260,9 +260,9 @@ static int patch_address(u_int32_t offset, int pc, struct msgb *msg) int bss_rewrite_header_to_bsc(struct msgb *msg, int opc, int dpc) { - static const u_int32_t called_offset = + static const uint32_t called_offset = offsetof(struct sccp_data_unitdata, variable_called); - static const u_int32_t calling_offset = + static const uint32_t calling_offset = offsetof(struct sccp_data_unitdata, variable_calling); struct sccp_data_unitdata *udt; diff --git a/src/mgcp/mgcp_network.c b/src/mgcp/mgcp_network.c index 4951088..1ea5f99 100644 --- a/src/mgcp/mgcp_network.c +++ b/src/mgcp/mgcp_network.c @@ -59,8 +59,8 @@ struct rtp_hdr { payload_type:7; #endif uint16_t sequence; - u_int32_t timestamp; - u_int32_t ssrc; + uint32_t timestamp; + uint32_t ssrc; } __attribute__((packed)); diff --git a/src/mgcp_ss7.c b/src/mgcp_ss7.c index cea6881..36421c6 100644 --- a/src/mgcp_ss7.c +++ b/src/mgcp_ss7.c @@ -76,7 +76,7 @@ struct mgcp_ss7_endpoint { }; static void mgcp_ss7_endp_free(struct mgcp_ss7* ss7, int endp); -static void mgcp_ss7_do_exec(struct mgcp_ss7 *mgcp, uint8_t type, u_int32_t port, u_int32_t param); +static void mgcp_ss7_do_exec(struct mgcp_ss7 *mgcp, uint8_t type, uint32_t port, uint32_t param); static void mgcp_mgw_vty_init(); static void check_exit(int status) @@ -371,7 +371,7 @@ static void allocate_endp(struct mgcp_ss7 *ss7, int endp_no) } #endif -static void mgcp_ss7_do_exec(struct mgcp_ss7 *mgcp, uint8_t type, u_int32_t port, u_int32_t param) +static void mgcp_ss7_do_exec(struct mgcp_ss7 *mgcp, uint8_t type, uint32_t port, uint32_t param) { #ifndef NO_UNIPORTE struct mgcp_ss7_endpoint *mgw_endp = &mgcp->mgw_end[port]; @@ -404,7 +404,7 @@ static void mgcp_ss7_do_exec(struct mgcp_ss7 *mgcp, uint8_t type, u_int32_t port #endif } -void mgcp_ss7_exec(struct mgcp_ss7 *mgcp, uint8_t type, u_int32_t port, u_int32_t param) +void mgcp_ss7_exec(struct mgcp_ss7 *mgcp, uint8_t type, uint32_t port, uint32_t param) { struct mgcp_ss7_cmd *cmd = malloc(sizeof(*cmd)); memset(cmd, 0, sizeof(*cmd)); @@ -33,20 +33,20 @@ * pcap format is from http://wiki.wireshark.org/Development/LibpcapFileFormat */ struct pcap_hdr { - u_int32_t magic_number; + uint32_t magic_number; uint16_t version_major; uint16_t version_minor; int32_t thiszone; - u_int32_t sigfigs; - u_int32_t snaplen; - u_int32_t network; + uint32_t sigfigs; + uint32_t snaplen; + uint32_t network; } __attribute__((packed)); struct pcaprec_hdr { - u_int32_t ts_sec; - u_int32_t ts_usec; - u_int32_t incl_len; - u_int32_t orig_len; + uint32_t ts_sec; + uint32_t ts_usec; + uint32_t incl_len; + uint32_t orig_len; } __attribute__((packed)); int mtp_pcap_write_header(int fd) diff --git a/tests/mtp/mtp_parse_test.c b/tests/mtp/mtp_parse_test.c index eb97ad6..2ef726b 100644 --- a/tests/mtp/mtp_parse_test.c +++ b/tests/mtp/mtp_parse_test.c @@ -580,7 +580,7 @@ static void check_prohib(const uint8_t *data, const struct mtp_level_3_prohib *t int main(int argc, char **argv) { - u_int32_t addr; + uint32_t addr; int i; /* set the addresses here due big endian MTP_ADDRESS macro */ |