From c42ad8b68619b58bfbc98a0409d74a86b603aebf Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 18 Apr 2011 17:04:00 +0200 Subject: misc: Move from u_int to uint types of stdint.h This was done with sed on the files. --- openbsc/src/ipaccess/ipaccess-config.c | 24 ++++++++++----------- openbsc/src/ipaccess/ipaccess-find.c | 6 +++--- openbsc/src/ipaccess/ipaccess-firmware.c | 4 ++-- openbsc/src/ipaccess/ipaccess-proxy.c | 36 ++++++++++++++++---------------- 4 files changed, 35 insertions(+), 35 deletions(-) (limited to 'openbsc/src/ipaccess') diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 49a0531b6..65fe9f2a0 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -53,8 +53,8 @@ static int restart; static char *prim_oml_ip; static char *bts_ip_addr, *bts_ip_mask, *bts_ip_gw; static char *unit_id; -static u_int16_t nv_flags; -static u_int16_t nv_mask; +static uint16_t nv_flags; +static uint16_t nv_mask; static char *software = NULL; static int sw_load_state = 0; static int oml_state = 0; @@ -64,11 +64,11 @@ static int found_trx = 0; static int loop_tests = 0; struct sw_load { - u_int8_t file_id[255]; - u_int8_t file_id_len; + uint8_t file_id[255]; + uint8_t file_id_len; - u_int8_t file_version[255]; - u_int8_t file_version_len; + uint8_t file_version[255]; + uint8_t file_version_len; }; static void *tall_ctx_config = NULL; @@ -76,8 +76,8 @@ static struct sw_load *sw_load1 = NULL; static struct sw_load *sw_load2 = NULL; /* -static u_int8_t prim_oml_attr[] = { 0x95, 0x00, 7, 0x88, 192, 168, 100, 11, 0x00, 0x00 }; -static u_int8_t unit_id_attr[] = { 0x91, 0x00, 9, '2', '3', '4', '2', '/' , '0', '/', '0', 0x00 }; +static uint8_t prim_oml_attr[] = { 0x95, 0x00, 7, 0x88, 192, 168, 100, 11, 0x00, 0x00 }; +static uint8_t unit_id_attr[] = { 0x91, 0x00, 9, '2', '3', '4', '2', '/' , '0', '/', '0', 0x00 }; */ /* @@ -87,7 +87,7 @@ static u_int8_t unit_id_attr[] = { 0x91, 0x00, 9, '2', '3', '4', '2', '/' , '0', * result. The nanoBTS will send us a NACK when we did something the * BTS didn't like. */ -static int ipacc_msg_nack(u_int8_t mt) +static int ipacc_msg_nack(uint8_t mt) { fprintf(stderr, "Failure to set attribute. This seems fatal\n"); exit(-1); @@ -103,7 +103,7 @@ static void check_restart_or_exit(struct gsm_bts_trx *trx) } } -static int ipacc_msg_ack(u_int8_t mt, struct gsm_bts_trx *trx) +static int ipacc_msg_ack(uint8_t mt, struct gsm_bts_trx *trx) { if (sw_load_state == 1) { fprintf(stderr, "The new software is activaed.\n"); @@ -182,7 +182,7 @@ static int nwl_sig_cb(unsigned int subsys, unsigned int signal, return 0; } -static int nm_state_event(int evt, u_int8_t obj_class, void *obj, +static int nm_state_event(int evt, uint8_t obj_class, void *obj, struct gsm_nm_state *old_state, struct gsm_nm_state *new_state, struct abis_om_obj_inst *obj_inst); @@ -495,7 +495,7 @@ out_err: msgb_free(nmsg); } -static int nm_state_event(int evt, u_int8_t obj_class, void *obj, +static int nm_state_event(int evt, uint8_t obj_class, void *obj, struct gsm_nm_state *old_state, struct gsm_nm_state *new_state, struct abis_om_obj_inst *obj_inst) { diff --git a/openbsc/src/ipaccess/ipaccess-find.c b/openbsc/src/ipaccess/ipaccess-find.c index 987e35ce5..5a0058d27 100644 --- a/openbsc/src/ipaccess/ipaccess-find.c +++ b/openbsc/src/ipaccess/ipaccess-find.c @@ -105,9 +105,9 @@ static int bcast_find(int fd) static int parse_response(unsigned char *buf, int len) { - u_int8_t t_len; - u_int8_t t_tag; - u_int8_t *cur = buf; + uint8_t t_len; + uint8_t t_tag; + uint8_t *cur = buf; while (cur < buf + len) { t_len = *cur++; diff --git a/openbsc/src/ipaccess/ipaccess-firmware.c b/openbsc/src/ipaccess/ipaccess-firmware.c index 971db9d70..a01e61b40 100644 --- a/openbsc/src/ipaccess/ipaccess-firmware.c +++ b/openbsc/src/ipaccess/ipaccess-firmware.c @@ -41,8 +41,8 @@ int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned int struct sdp_header *header; char buf[4096]; int rc, i; - u_int16_t table_size; - u_int16_t table_offset; + uint16_t table_size; + uint16_t table_offset; off_t table_start; diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c index 5254959d4..daa909454 100644 --- a/openbsc/src/ipaccess/ipaccess-proxy.c +++ b/openbsc/src/ipaccess/ipaccess-proxy.c @@ -82,8 +82,8 @@ struct ipa_bts_conn { struct ipa_proxy *ipp; /* the unit ID as determined by CCM */ struct { - u_int16_t site_id; - u_int16_t bts_id; + uint16_t site_id; + uint16_t bts_id; } unit_id; /* incoming connections from BTS */ @@ -106,7 +106,7 @@ struct ipa_bts_conn { uint32_t gprs_orig_ip; char *id_tags[0xff]; - u_int8_t *id_resp; + uint8_t *id_resp; unsigned int id_resp_len; }; @@ -131,8 +131,8 @@ static int gprs_ns_cb(struct bsc_fd *bfd, unsigned int what); #define PROXY_ALLOC_SIZE 1200 static struct ipa_bts_conn *find_bts_by_unitid(struct ipa_proxy *ipp, - u_int16_t site_id, - u_int16_t bts_id) + uint16_t site_id, + uint16_t bts_id) { struct ipa_bts_conn *ipbc; @@ -189,7 +189,7 @@ static struct ipa_proxy_conn *connect_bsc(struct sockaddr_in *sa, int priv_nr, v #define logp_ipbc_uid(ss, lvl, ipbc, trx_id) _logp_ipbc_uid(ss, lvl, __FILE__, __LINE__, ipbc, trx_id) static void _logp_ipbc_uid(unsigned int ss, unsigned int lvl, char *file, int line, - struct ipa_bts_conn *ipbc, u_int8_t trx_id) + struct ipa_bts_conn *ipbc, uint8_t trx_id) { if (ipbc) logp2(ss, lvl, file, line, 0, "(%u/%u/%u) ", ipbc->unit_id.site_id, @@ -312,12 +312,12 @@ static int udp_fd_cb(struct bsc_fd *bfd, unsigned int what) static int ipbc_alloc_connect(struct ipa_proxy_conn *ipc, struct bsc_fd *bfd, - u_int16_t site_id, u_int16_t bts_id, - u_int16_t trx_id, struct tlv_parsed *tlvp, + uint16_t site_id, uint16_t bts_id, + uint16_t trx_id, struct tlv_parsed *tlvp, struct msgb *msg) { struct ipa_bts_conn *ipbc; - u_int16_t udp_port; + uint16_t udp_port; int ret = 0; struct sockaddr_in sin; @@ -437,8 +437,8 @@ static int ipaccess_rcvmsg(struct ipa_proxy_conn *ipc, struct msgb *msg, struct bsc_fd *bfd) { struct tlv_parsed tlvp; - u_int8_t msg_type = *(msg->l2h); - u_int16_t site_id, bts_id, trx_id; + uint8_t msg_type = *(msg->l2h); + uint16_t site_id, bts_id, trx_id; struct ipa_bts_conn *ipbc; int ret = 0; @@ -452,7 +452,7 @@ static int ipaccess_rcvmsg(struct ipa_proxy_conn *ipc, struct msgb *msg, case IPAC_MSGT_ID_RESP: DEBUGP(DMI, "ID_RESP "); /* parse tags, search for Unit ID */ - ipaccess_idtag_parse(&tlvp, (u_int8_t *)msg->l2h + 2, + ipaccess_idtag_parse(&tlvp, (uint8_t *)msg->l2h + 2, msgb_l2len(msg)-2); DEBUGP(DMI, "\n"); @@ -749,16 +749,16 @@ static void patch_gprs_msg(struct ipa_bts_conn *ipbc, int priv_nr, struct msgb * msg->l2h[2] == 0x00 && msg->l2h[3] == 0x15 && msg->l2h[18] == 0xf5 && msg->l2h[19] == 0xf2) { nsvci = &msg->l2h[23]; - ipbc->gprs_orig_port = *(u_int16_t *)(nsvci+8); - ipbc->gprs_orig_ip = *(u_int32_t *)(nsvci+10); - *(u_int16_t *)(nsvci+8) = htons(ipbc->gprs_local_port); - *(u_int32_t *)(nsvci+10) = ipbc->ipp->listen_addr.s_addr; + ipbc->gprs_orig_port = *(uint16_t *)(nsvci+8); + ipbc->gprs_orig_ip = *(uint32_t *)(nsvci+10); + *(uint16_t *)(nsvci+8) = htons(ipbc->gprs_local_port); + *(uint32_t *)(nsvci+10) = ipbc->ipp->listen_addr.s_addr; } else if (msg->l2h[0] == 0x10 && msg->l2h[1] == 0x80 && msg->l2h[2] == 0x00 && msg->l2h[3] == 0x15 && msg->l2h[18] == 0xf6 && msg->l2h[19] == 0xf2) { nsvci = &msg->l2h[23]; - *(u_int16_t *)(nsvci+8) = ipbc->gprs_orig_port; - *(u_int32_t *)(nsvci+10) = ipbc->gprs_orig_ip; + *(uint16_t *)(nsvci+8) = ipbc->gprs_orig_port; + *(uint32_t *)(nsvci+10) = ipbc->gprs_orig_ip; } } -- cgit v1.2.3