aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-04-18 17:04:00 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-04-18 17:31:39 +0200
commitc42ad8b68619b58bfbc98a0409d74a86b603aebf (patch)
treeac806f2e5657c405471165ed842b78b170f76def /openbsc/src
parent5cde92cb0e447ef9d415918c5194c3e65282ab28 (diff)
misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/gprs/crc24.c4
-rw-r--r--openbsc/src/gprs/gb_proxy_main.c2
-rw-r--r--openbsc/src/gprs/sgsn_main.c2
-rw-r--r--openbsc/src/ipaccess/ipaccess-config.c24
-rw-r--r--openbsc/src/ipaccess/ipaccess-find.c6
-rw-r--r--openbsc/src/ipaccess/ipaccess-firmware.c4
-rw-r--r--openbsc/src/ipaccess/ipaccess-proxy.c36
-rw-r--r--openbsc/src/libabis/e1_input.c62
-rw-r--r--openbsc/src/libabis/input/dahdi.c12
-rw-r--r--openbsc/src/libabis/input/hsl.c2
-rw-r--r--openbsc/src/libabis/input/ipaccess.c28
-rw-r--r--openbsc/src/libabis/input/misdn.c4
-rw-r--r--openbsc/src/libbsc/abis_nm.c296
-rw-r--r--openbsc/src/libbsc/abis_nm_ipaccess.c8
-rw-r--r--openbsc/src/libbsc/abis_om2000.c2
-rw-r--r--openbsc/src/libbsc/abis_rsl.c166
-rw-r--r--openbsc/src/libbsc/bsc_api.c6
-rw-r--r--openbsc/src/libbsc/bsc_msc.c2
-rw-r--r--openbsc/src/libbsc/bsc_rll.c12
-rw-r--r--openbsc/src/libbsc/bts_ipaccess_nanobts.c10
-rw-r--r--openbsc/src/libbsc/bts_siemens_bs11.c14
-rw-r--r--openbsc/src/libbsc/chan_alloc.c6
-rw-r--r--openbsc/src/libbsc/gsm_04_08_utils.c38
-rw-r--r--openbsc/src/libbsc/handover_decision.c4
-rw-r--r--openbsc/src/libbsc/handover_logic.c4
-rw-r--r--openbsc/src/libbsc/paging.c4
-rw-r--r--openbsc/src/libbsc/rest_octets.c8
-rw-r--r--openbsc/src/libbsc/system_information.c24
-rw-r--r--openbsc/src/libbsc/transaction.c10
-rw-r--r--openbsc/src/libcommon/gsm_data.c12
-rw-r--r--openbsc/src/libcommon/socket.c2
-rw-r--r--openbsc/src/libmsc/db.c14
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c94
-rw-r--r--openbsc/src/libmsc/gsm_04_11.c102
-rw-r--r--openbsc/src/libmsc/gsm_04_80.c8
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c2
-rw-r--r--openbsc/src/libmsc/mncc_builtin.c6
-rw-r--r--openbsc/src/libmsc/rrlp.c8
-rw-r--r--openbsc/src/libmsc/silent_call.c6
-rw-r--r--openbsc/src/libmsc/token_auth.c8
-rw-r--r--openbsc/src/libmsc/vty_interface_layer3.c2
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c50
-rw-r--r--openbsc/src/libtrau/subchan_demux.c28
-rw-r--r--openbsc/src/libtrau/trau_frame.c28
-rw-r--r--openbsc/src/libtrau/trau_mux.c16
-rw-r--r--openbsc/src/utils/bs11_config.c42
-rw-r--r--openbsc/src/utils/rs232.c2
47 files changed, 615 insertions, 615 deletions
diff --git a/openbsc/src/gprs/crc24.c b/openbsc/src/gprs/crc24.c
index 4d65e6ee1..aa48dd324 100644
--- a/openbsc/src/gprs/crc24.c
+++ b/openbsc/src/gprs/crc24.c
@@ -23,7 +23,7 @@
#include <openbsc/crc24.h>
/* CRC24 table - FCS */
-static const u_int32_t tbl_crc24[256] = {
+static const uint32_t tbl_crc24[256] = {
0x00000000, 0x00d6a776, 0x00f64557, 0x0020e221, 0x00b78115, 0x00612663, 0x0041c442, 0x00976334,
0x00340991, 0x00e2aee7, 0x00c24cc6, 0x0014ebb0, 0x00838884, 0x00552ff2, 0x0075cdd3, 0x00a36aa5,
0x00681322, 0x00beb454, 0x009e5675, 0x0048f103, 0x00df9237, 0x00093541, 0x0029d760, 0x00ff7016,
@@ -60,7 +60,7 @@ static const u_int32_t tbl_crc24[256] = {
#define INIT_CRC24 0xffffff
-u_int32_t crc24_calc(u_int32_t fcs, u_int8_t *cp, unsigned int len)
+uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len)
{
while (len--)
fcs = (fcs >> 8) ^ tbl_crc24[(fcs ^ *cp++) & 0xff];
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
index bd18b2fc3..3e87f0895 100644
--- a/openbsc/src/gprs/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -75,7 +75,7 @@ extern struct gbprox_peer *gbprox_peer_sgsn;
/* call-back function for the NS protocol */
static int proxy_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,
- struct msgb *msg, u_int16_t bvci)
+ struct msgb *msg, uint16_t bvci)
{
int rc = 0;
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index 8ec74cffe..1967de7e0 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -81,7 +81,7 @@ struct sgsn_instance *sgsn = &sgsn_inst;
/* call-back function for the NS protocol */
static int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,
- struct msgb *msg, u_int16_t bvci)
+ struct msgb *msg, uint16_t bvci)
{
int rc = 0;
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;
}
}
diff --git a/openbsc/src/libabis/e1_input.c b/openbsc/src/libabis/e1_input.c
index eea1abe59..7444bc7df 100644
--- a/openbsc/src/libabis/e1_input.c
+++ b/openbsc/src/libabis/e1_input.c
@@ -75,37 +75,37 @@ static void *tall_sigl_ctx;
#define PCAP_OUTPUT 1
struct pcap_hdr {
- u_int32_t magic_number;
- u_int16_t version_major;
- u_int16_t version_minor;
+ 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));
struct fake_linux_lapd_header {
- u_int16_t pkttype;
- u_int16_t hatype;
- u_int16_t halen;
- u_int64_t addr;
+ uint16_t pkttype;
+ uint16_t hatype;
+ uint16_t halen;
+ uint64_t addr;
int16_t protocol;
} __attribute__((packed));
struct lapd_header {
- u_int8_t ea1 : 1;
- u_int8_t cr : 1;
- u_int8_t sapi : 6;
- u_int8_t ea2 : 1;
- u_int8_t tei : 7;
- u_int8_t control_foo; /* fake UM's ... */
+ uint8_t ea1 : 1;
+ uint8_t cr : 1;
+ uint8_t sapi : 6;
+ uint8_t ea2 : 1;
+ uint8_t tei : 7;
+ uint8_t control_foo; /* fake UM's ... */
} __attribute__((packed));
static_assert(offsetof(struct fake_linux_lapd_header, hatype) == 2, hatype_offset);
@@ -207,7 +207,7 @@ const char *e1inp_tstype_name(enum e1inp_ts_type tp)
}
/* callback when a TRAU frame was received */
-static int subch_cb(struct subch_demux *dmx, int ch, u_int8_t *data, int len,
+static int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len,
void *_priv)
{
struct e1inp_ts *e1i_ts = _priv;
@@ -324,7 +324,7 @@ int e1inp_ts_config(struct e1inp_ts *ts, struct e1inp_line *line,
return 0;
}
-struct e1inp_line *e1inp_line_get(u_int8_t e1_nr)
+struct e1inp_line *e1inp_line_get(uint8_t e1_nr)
{
struct e1inp_line *e1i_line;
@@ -336,7 +336,7 @@ struct e1inp_line *e1inp_line_get(u_int8_t e1_nr)
return NULL;
}
-struct e1inp_line *e1inp_line_create(u_int8_t e1_nr, const char *driver_name)
+struct e1inp_line *e1inp_line_create(uint8_t e1_nr, const char *driver_name)
{
struct e1inp_driver *driver;
struct e1inp_line *line;
@@ -373,7 +373,7 @@ struct e1inp_line *e1inp_line_create(u_int8_t e1_nr, const char *driver_name)
}
#if 0
-struct e1inp_line *e1inp_line_get_create(u_int8_t e1_nr)
+struct e1inp_line *e1inp_line_get_create(uint8_t e1_nr)
{
struct e1inp_line *line;
int i;
@@ -397,7 +397,7 @@ struct e1inp_line *e1inp_line_get_create(u_int8_t e1_nr)
}
#endif
-static struct e1inp_ts *e1inp_ts_get(u_int8_t e1_nr, u_int8_t ts_nr)
+static struct e1inp_ts *e1inp_ts_get(uint8_t e1_nr, uint8_t ts_nr)
{
struct e1inp_line *e1i_line;
@@ -408,7 +408,7 @@ static struct e1inp_ts *e1inp_ts_get(u_int8_t e1_nr, u_int8_t ts_nr)
return &e1i_line->ts[ts_nr-1];
}
-struct subch_mux *e1inp_get_mux(u_int8_t e1_nr, u_int8_t ts_nr)
+struct subch_mux *e1inp_get_mux(uint8_t e1_nr, uint8_t ts_nr)
{
struct e1inp_ts *e1i_ts = e1inp_ts_get(e1_nr, ts_nr);
@@ -421,7 +421,7 @@ struct subch_mux *e1inp_get_mux(u_int8_t e1_nr, u_int8_t ts_nr)
/* Signalling Link */
struct e1inp_sign_link *e1inp_lookup_sign_link(struct e1inp_ts *e1i,
- u_int8_t tei, u_int8_t sapi)
+ uint8_t tei, uint8_t sapi)
{
struct e1inp_sign_link *link;
@@ -437,8 +437,8 @@ struct e1inp_sign_link *e1inp_lookup_sign_link(struct e1inp_ts *e1i,
struct e1inp_sign_link *
e1inp_sign_link_create(struct e1inp_ts *ts, enum e1inp_sign_type type,
- struct gsm_bts_trx *trx, u_int8_t tei,
- u_int8_t sapi)
+ struct gsm_bts_trx *trx, uint8_t tei,
+ uint8_t sapi)
{
struct e1inp_sign_link *link;
@@ -479,7 +479,7 @@ void e1inp_sign_link_destroy(struct e1inp_sign_link *link)
/* the E1 driver tells us he has received something on a TS */
int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
- u_int8_t tei, u_int8_t sapi)
+ uint8_t tei, uint8_t sapi)
{
struct e1inp_sign_link *link;
struct gsm_bts *bts;
@@ -562,7 +562,7 @@ struct msgb *e1inp_tx_ts(struct e1inp_ts *e1i_ts,
}
/* called by driver in case some kind of link state event */
-int e1inp_event(struct e1inp_ts *ts, int evt, u_int8_t tei, u_int8_t sapi)
+int e1inp_event(struct e1inp_ts *ts, int evt, uint8_t tei, uint8_t sapi)
{
struct e1inp_sign_link *link;
struct input_signal_data isd;
diff --git a/openbsc/src/libabis/input/dahdi.c b/openbsc/src/libabis/input/dahdi.c
index 2754944f7..22c96551c 100644
--- a/openbsc/src/libabis/input/dahdi.c
+++ b/openbsc/src/libabis/input/dahdi.c
@@ -231,14 +231,14 @@ static int handle_ts1_write(struct bsc_fd *bfd)
static int invertbits = 1;
-static u_int8_t flip_table[256];
+static uint8_t flip_table[256];
static void init_flip_bits(void)
{
int i,k;
for (i = 0 ; i < 256 ; i++) {
- u_int8_t sample = 0 ;
+ uint8_t sample = 0 ;
for (k = 0; k<8; k++) {
if ( i & 1 << k ) sample |= 0x80 >> k;
}
@@ -246,13 +246,13 @@ static void init_flip_bits(void)
}
}
-static u_int8_t * flip_buf_bits ( u_int8_t * buf , int len)
+static uint8_t * flip_buf_bits ( uint8_t * buf , int len)
{
int i;
- u_int8_t * start = buf;
+ uint8_t * start = buf;
for (i = 0 ; i < len; i++) {
- buf[i] = flip_table[(u_int8_t)buf[i]];
+ buf[i] = flip_table[(uint8_t)buf[i]];
}
return start;
@@ -265,7 +265,7 @@ static int handle_tsX_write(struct bsc_fd *bfd)
struct e1inp_line *line = bfd->data;
unsigned int ts_nr = bfd->priv_nr;
struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
- u_int8_t tx_buf[D_BCHAN_TX_GRAN];
+ uint8_t tx_buf[D_BCHAN_TX_GRAN];
struct subch_mux *mx = &e1i_ts->trau.mux;
int ret;
diff --git a/openbsc/src/libabis/input/hsl.c b/openbsc/src/libabis/input/hsl.c
index 2b9ab1d1e..c53fd0f47 100644
--- a/openbsc/src/libabis/input/hsl.c
+++ b/openbsc/src/libabis/input/hsl.c
@@ -298,7 +298,7 @@ static int handle_ts1_write(struct bsc_fd *bfd)
struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
struct e1inp_sign_link *sign_link;
struct msgb *msg;
- u_int8_t proto;
+ uint8_t proto;
int ret;
bfd->when &= ~BSC_FD_WRITE;
diff --git a/openbsc/src/libabis/input/ipaccess.c b/openbsc/src/libabis/input/ipaccess.c
index cba03a0bb..f4f95f2ba 100644
--- a/openbsc/src/libabis/input/ipaccess.c
+++ b/openbsc/src/libabis/input/ipaccess.c
@@ -68,15 +68,15 @@ static struct ia_e1_handle *e1h;
* - ID_REQUEST: first messages once OML has been established.
* - ID_ACK: in reply to ID_ACK.
*/
-const u_int8_t ipa_pong_msg[] = {
+const uint8_t ipa_pong_msg[] = {
0, 1, IPAC_PROTO_IPACCESS, IPAC_MSGT_PONG
};
-const u_int8_t ipa_id_ack_msg[] = {
+const uint8_t ipa_id_ack_msg[] = {
0, 1, IPAC_PROTO_IPACCESS, IPAC_MSGT_ID_ACK
};
-const u_int8_t ipa_id_req_msg[] = {
+const uint8_t ipa_id_req_msg[] = {
0, 17, IPAC_PROTO_IPACCESS, IPAC_MSGT_ID_GET,
0x01, IPAC_IDTAG_UNIT,
0x01, IPAC_IDTAG_MACADDR,
@@ -110,9 +110,9 @@ const char *ipaccess_idtag_name(uint8_t tag)
int ipaccess_idtag_parse(struct tlv_parsed *dec, 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;
memset(dec, 0, sizeof(*dec));
@@ -138,7 +138,7 @@ int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len)
}
struct gsm_bts *find_bts_by_unitid(struct gsm_network *net,
- u_int16_t site_id, u_int16_t bts_id)
+ uint16_t site_id, uint16_t bts_id)
{
struct gsm_bts *bts;
@@ -155,8 +155,8 @@ struct gsm_bts *find_bts_by_unitid(struct gsm_network *net,
return NULL;
}
-int ipaccess_parse_unitid(const char *str, u_int16_t *site_id,
- u_int16_t *bts_id, u_int16_t *trx_id)
+int ipaccess_parse_unitid(const char *str, uint16_t *site_id,
+ uint16_t *bts_id, uint16_t *trx_id)
{
unsigned long ul;
char *endptr;
@@ -225,7 +225,7 @@ int ipaccess_send_id_req(int fd)
int ipaccess_rcvmsg_base(struct msgb *msg,
struct bsc_fd *bfd)
{
- u_int8_t msg_type = *(msg->l2h);
+ uint8_t msg_type = *(msg->l2h);
int ret = 0;
switch (msg_type) {
@@ -247,8 +247,8 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
struct bsc_fd *bfd)
{
struct tlv_parsed tlvp;
- u_int8_t msg_type = *(msg->l2h);
- u_int16_t site_id = 0, bts_id = 0, trx_id = 0;
+ uint8_t msg_type = *(msg->l2h);
+ uint16_t site_id = 0, bts_id = 0, trx_id = 0;
struct gsm_bts *bts;
char *unitid;
int len, ret;
@@ -260,7 +260,7 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
case IPAC_MSGT_ID_RESP:
DEBUGP(DMI, "ID_RESP ");
/* parse tags, search for Unit ID */
- ret = ipaccess_idtag_parse(&tlvp, (u_int8_t *)msg->l2h + 2,
+ ret = ipaccess_idtag_parse(&tlvp, (uint8_t *)msg->l2h + 2,
msgb_l2len(msg)-2);
DEBUGP(DMI, "\n");
if (ret < 0) {
@@ -596,7 +596,7 @@ static int handle_ts1_write(struct bsc_fd *bfd)
struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
struct e1inp_sign_link *sign_link;
struct msgb *msg;
- u_int8_t proto;
+ uint8_t proto;
int ret;
bfd->when &= ~BSC_FD_WRITE;
diff --git a/openbsc/src/libabis/input/misdn.c b/openbsc/src/libabis/input/misdn.c
index e111c131e..59289906a 100644
--- a/openbsc/src/libabis/input/misdn.c
+++ b/openbsc/src/libabis/input/misdn.c
@@ -210,7 +210,7 @@ static int handle_ts1_write(struct bsc_fd *bfd)
struct sockaddr_mISDN sa;
struct msgb *msg;
struct mISDNhead *hh;
- u_int8_t *l2_data;
+ uint8_t *l2_data;
int ret;
bfd->when &= ~BSC_FD_WRITE;
@@ -260,7 +260,7 @@ static int handle_tsX_write(struct bsc_fd *bfd)
unsigned int ts_nr = bfd->priv_nr;
struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
struct mISDNhead *hh;
- u_int8_t tx_buf[BCHAN_TX_GRAN + sizeof(*hh)];
+ uint8_t tx_buf[BCHAN_TX_GRAN + sizeof(*hh)];
struct subch_mux *mx = &e1i_ts->trau.mux;
int ret;
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index 1d86ffa3b..408d56ea8 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -190,7 +190,7 @@ static const struct value_string nack_cause_names[] = {
{ 0, NULL }
};
-static const char *nack_cause_name(u_int8_t cause)
+static const char *nack_cause_name(uint8_t cause)
{
return get_value_string(nack_cause_names, cause);
}
@@ -205,7 +205,7 @@ static const struct value_string event_type_names[] = {
{ 0, NULL }
};
-static const char *event_type_name(u_int8_t cause)
+static const char *event_type_name(uint8_t cause)
{
return get_value_string(event_type_names, cause);
}
@@ -221,7 +221,7 @@ static const struct value_string severity_names[] = {
{ 0, NULL }
};
-static const char *severity_name(u_int8_t cause)
+static const char *severity_name(uint8_t cause)
{
return get_value_string(severity_names, cause);
}
@@ -343,7 +343,7 @@ int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan)
return -EINVAL;
}
-int abis_nm_tlv_parse(struct tlv_parsed *tp, struct gsm_bts *bts, const u_int8_t *buf, int len)
+int abis_nm_tlv_parse(struct tlv_parsed *tp, struct gsm_bts *bts, const uint8_t *buf, int len)
{
if (!bts->model)
return -EIO;
@@ -379,7 +379,7 @@ static int is_report(enum abis_nm_msgtype mt)
#define MT_ACK(x) (x+1)
#define MT_NACK(x) (x+2)
-static void fill_om_hdr(struct abis_om_hdr *oh, u_int8_t len)
+static void fill_om_hdr(struct abis_om_hdr *oh, uint8_t len)
{
oh->mdisc = ABIS_OM_MDISC_FOM;
oh->placement = ABIS_OM_PLACEMENT_ONLY;
@@ -387,9 +387,9 @@ static void fill_om_hdr(struct abis_om_hdr *oh, u_int8_t len)
oh->length = len;
}
-static void fill_om_fom_hdr(struct abis_om_hdr *oh, u_int8_t len,
- u_int8_t msg_type, u_int8_t obj_class,
- u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr)
+static void fill_om_fom_hdr(struct abis_om_hdr *oh, uint8_t len,
+ uint8_t msg_type, uint8_t obj_class,
+ uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr)
{
struct abis_om_fom_hdr *foh =
(struct abis_om_fom_hdr *) oh->data;
@@ -459,12 +459,12 @@ const struct value_string abis_nm_obj_class_names[] = {
{ 0, NULL }
};
-static const char *obj_class_name(u_int8_t oc)
+static const char *obj_class_name(uint8_t oc)
{
return get_value_string(abis_nm_obj_class_names, oc);
}
-const char *nm_opstate_name(u_int8_t os)
+const char *nm_opstate_name(uint8_t os)
{
switch (os) {
case NM_OPSTATE_DISABLED:
@@ -492,7 +492,7 @@ static const struct value_string avail_names[] = {
{ 0, NULL }
};
-const char *nm_avail_name(u_int8_t avail)
+const char *nm_avail_name(uint8_t avail)
{
return get_value_string(avail_names, avail);
}
@@ -517,7 +517,7 @@ const struct value_string abis_nm_adm_state_names[] = {
{ 0, NULL }
};
-const char *nm_adm_name(u_int8_t adm)
+const char *nm_adm_name(uint8_t adm)
{
return get_value_string(abis_nm_adm_state_names, adm);
}
@@ -539,7 +539,7 @@ static void debugp_foh(struct abis_om_fom_hdr *foh)
/* obtain the gsm_nm_state data structure for a given object instance */
static struct gsm_nm_state *
-objclass2nmstate(struct gsm_bts *bts, u_int8_t obj_class,
+objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
struct abis_om_obj_inst *obj_inst)
{
struct gsm_bts_trx *trx;
@@ -623,7 +623,7 @@ objclass2nmstate(struct gsm_bts *bts, u_int8_t obj_class,
/* obtain the in-memory data structure of a given object instance */
static void *
-objclass2obj(struct gsm_bts *bts, u_int8_t obj_class,
+objclass2obj(struct gsm_bts *bts, uint8_t obj_class,
struct abis_om_obj_inst *obj_inst)
{
struct gsm_bts_trx *trx;
@@ -679,8 +679,8 @@ objclass2obj(struct gsm_bts *bts, u_int8_t obj_class,
/* Update the administrative state of a given object in our in-memory data
* structures and send an event to the higher layer */
-static int update_admstate(struct gsm_bts *bts, u_int8_t obj_class,
- struct abis_om_obj_inst *obj_inst, u_int8_t adm_state)
+static int update_admstate(struct gsm_bts *bts, uint8_t obj_class,
+ struct abis_om_obj_inst *obj_inst, uint8_t adm_state)
{
struct gsm_nm_state *nm_state, new_state;
struct nm_statechg_signal_data nsd;
@@ -816,7 +816,7 @@ static int rx_fail_evt_rep(struct msgb *mb)
static int abis_nm_rcvmsg_report(struct msgb *mb)
{
struct abis_om_fom_hdr *foh = msgb_l3(mb);
- u_int8_t mt = foh->msg_type;
+ uint8_t mt = foh->msg_type;
debugp_foh(foh);
@@ -848,13 +848,13 @@ static int abis_nm_rcvmsg_report(struct msgb *mb)
}
/* Activate the specified software into the BTS */
-static int ipacc_sw_activate(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, u_int8_t i1,
- u_int8_t i2, const u_int8_t *sw_desc, u_int8_t swdesc_len)
+static int ipacc_sw_activate(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0, uint8_t i1,
+ uint8_t i2, const uint8_t *sw_desc, uint8_t swdesc_len)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t len = swdesc_len;
- u_int8_t *trailer;
+ uint8_t len = swdesc_len;
+ uint8_t *trailer;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, len, NM_MT_ACTIVATE_SW, obj_class, i0, i1, i2);
@@ -865,7 +865,7 @@ static int ipacc_sw_activate(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i
return abis_nm_sendmsg(bts, msg);
}
-static int abis_nm_parse_sw_descr(const u_int8_t *sw_descr, int sw_descr_len)
+static int abis_nm_parse_sw_descr(const uint8_t *sw_descr, int sw_descr_len)
{
static const struct tlv_definition sw_descr_def = {
.def = {
@@ -874,9 +874,9 @@ static int abis_nm_parse_sw_descr(const u_int8_t *sw_descr, int sw_descr_len)
},
};
- u_int8_t tag;
- u_int16_t tag_len;
- const u_int8_t *val;
+ uint8_t tag;
+ uint16_t tag_len;
+ const uint8_t *val;
int ofs = 0, len;
/* Classic TLV parsing doesn't work well with SW_DESCR because of it's
@@ -913,7 +913,7 @@ static int abis_nm_rx_sw_act_req(struct msgb *mb)
struct abis_om_hdr *oh = msgb_l2(mb);
struct abis_om_fom_hdr *foh = msgb_l3(mb);
struct tlv_parsed tp;
- const u_int8_t *sw_config;
+ const uint8_t *sw_config;
int ret, sw_config_len, sw_descr_len;
debugp_foh(foh);
@@ -956,7 +956,7 @@ static int abis_nm_rx_chg_adm_state_ack(struct msgb *mb)
struct abis_om_hdr *oh = msgb_l2(mb);
struct abis_om_fom_hdr *foh = msgb_l3(mb);
struct tlv_parsed tp;
- u_int8_t adm_state;
+ uint8_t adm_state;
abis_nm_tlv_parse(&tp, mb->trx->bts, foh->data, oh->length-sizeof(*foh));
if (!TLVP_PRESENT(&tp, NM_ATT_ADM_STATE))
@@ -977,12 +977,12 @@ static int abis_nm_rx_lmt_event(struct msgb *mb)
abis_nm_tlv_parse(&tp, mb->trx->bts, foh->data, oh->length-sizeof(*foh));
if (TLVP_PRESENT(&tp, NM_ATT_BS11_LMT_LOGON_SESSION) &&
TLVP_LEN(&tp, NM_ATT_BS11_LMT_LOGON_SESSION) >= 1) {
- u_int8_t onoff = *TLVP_VAL(&tp, NM_ATT_BS11_LMT_LOGON_SESSION);
+ uint8_t onoff = *TLVP_VAL(&tp, NM_ATT_BS11_LMT_LOGON_SESSION);
DEBUGPC(DNM, "LOG%s ", onoff ? "ON" : "OFF");
}
if (TLVP_PRESENT(&tp, NM_ATT_BS11_LMT_USER_ACC_LEV) &&
TLVP_LEN(&tp, NM_ATT_BS11_LMT_USER_ACC_LEV) >= 1) {
- u_int8_t level = *TLVP_VAL(&tp, NM_ATT_BS11_LMT_USER_ACC_LEV);
+ uint8_t level = *TLVP_VAL(&tp, NM_ATT_BS11_LMT_USER_ACC_LEV);
DEBUGPC(DNM, "Level=%u ", level);
}
if (TLVP_PRESENT(&tp, NM_ATT_BS11_LMT_USER_NAME) &&
@@ -1017,7 +1017,7 @@ static int abis_nm_rcvmsg_fom(struct msgb *mb)
{
struct abis_om_hdr *oh = msgb_l2(mb);
struct abis_om_fom_hdr *foh = msgb_l3(mb);
- u_int8_t mt = foh->msg_type;
+ uint8_t mt = foh->msg_type;
int ret = 0;
/* check for unsolicited message */
@@ -1138,7 +1138,7 @@ int abis_nm_rcvmsg(struct msgb *msg)
return -EINVAL;
}
#if 0
- unsigned int l2_len = msg->tail - (u_int8_t *)msgb_l2(msg);
+ unsigned int l2_len = msg->tail - (uint8_t *)msgb_l2(msg);
unsigned int hlen = sizeof(*oh) + sizeof(struct abis_om_fom_hdr);
if (oh->length + hlen > l2_len) {
LOGP(DNM, LOGL_ERROR, "ABIS OML truncated message (%u > %u)\n",
@@ -1219,17 +1219,17 @@ struct abis_nm_sw {
int forced;
/* this will become part of the SW LOAD INITIATE */
- u_int8_t obj_class;
- u_int8_t obj_instance[3];
+ uint8_t obj_class;
+ uint8_t obj_instance[3];
- 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;
- u_int8_t window_size;
- u_int8_t seg_in_window;
+ uint8_t window_size;
+ uint8_t seg_in_window;
int fd;
FILE *stream;
@@ -1260,7 +1260,7 @@ static int sw_load_init(struct abis_nm_sw *sw)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t len = 3*2 + sw->file_id_len + sw->file_version_len;
+ uint8_t len = 3*2 + sw->file_id_len + sw->file_version_len;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, len, NM_MT_LOAD_INIT, sw->obj_class,
@@ -1297,7 +1297,7 @@ static int sw_load_segment(struct abis_nm_sw *sw)
char seg_buf[256];
char *line_buf = seg_buf+2;
unsigned char *tlv;
- u_int8_t len;
+ uint8_t len;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
@@ -1318,7 +1318,7 @@ static int sw_load_segment(struct abis_nm_sw *sw)
len = strlen(line_buf) + 2;
tlv = msgb_put(msg, TLV_GROSS_LEN(len));
- tlv_put(tlv, NM_ATT_BS11_FILE_DATA, len, (u_int8_t *)seg_buf);
+ tlv_put(tlv, NM_ATT_BS11_FILE_DATA, len, (uint8_t *)seg_buf);
/* BS11 wants CR + LF in excess of the TLV length !?! */
tlv[1] -= 2;
@@ -1337,7 +1337,7 @@ static int sw_load_segment(struct abis_nm_sw *sw)
sw->last_seg = 1;
++sw->seg_in_window;
- msgb_tl16v_put(msg, NM_ATT_IPACC_FILE_DATA, len, (const u_int8_t *) seg_buf);
+ msgb_tl16v_put(msg, NM_ATT_IPACC_FILE_DATA, len, (const uint8_t *) seg_buf);
len += 3;
break;
}
@@ -1359,7 +1359,7 @@ static int sw_load_end(struct abis_nm_sw *sw)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t len = 2*2 + sw->file_id_len + sw->file_version_len;
+ uint8_t len = 2*2 + sw->file_id_len + sw->file_version_len;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, len, NM_MT_LOAD_END, sw->obj_class,
@@ -1375,7 +1375,7 @@ static int sw_activate(struct abis_nm_sw *sw)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t len = 2*2 + sw->file_id_len + sw->file_version_len;
+ uint8_t len = 2*2 + sw->file_id_len + sw->file_version_len;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, len, NM_MT_ACTIVATE_SW, sw->obj_class,
@@ -1675,7 +1675,7 @@ static int abis_nm_rcvmsg_sw(struct msgb *mb)
/* Load the specified software into the BTS */
int abis_nm_software_load(struct gsm_bts *bts, int trx_nr, const char *fname,
- u_int8_t win_size, int forced,
+ uint8_t win_size, int forced,
gsm_cbfn *cbfn, void *cb_data)
{
struct abis_nm_sw *sw = &g_sw;
@@ -1776,8 +1776,8 @@ int abis_nm_software_activate(struct gsm_bts *bts, const char *fname,
return sw_activate(sw);
}
-static void fill_nm_channel(struct abis_nm_channel *ch, u_int8_t bts_port,
- u_int8_t ts_nr, u_int8_t subslot_nr)
+static void fill_nm_channel(struct abis_nm_channel *ch, uint8_t bts_port,
+ uint8_t ts_nr, uint8_t subslot_nr)
{
ch->attrib = NM_ATT_ABIS_CHANNEL;
ch->bts_port = bts_port;
@@ -1785,13 +1785,13 @@ static void fill_nm_channel(struct abis_nm_channel *ch, u_int8_t bts_port,
ch->subslot = subslot_nr;
}
-int abis_nm_establish_tei(struct gsm_bts *bts, u_int8_t trx_nr,
- u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot,
- u_int8_t tei)
+int abis_nm_establish_tei(struct gsm_bts *bts, uint8_t trx_nr,
+ uint8_t e1_port, uint8_t e1_timeslot, uint8_t e1_subslot,
+ uint8_t tei)
{
struct abis_om_hdr *oh;
struct abis_nm_channel *ch;
- u_int8_t len = sizeof(*ch) + 2;
+ uint8_t len = sizeof(*ch) + 2;
struct msgb *msg = nm_msgb_alloc();
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
@@ -1808,7 +1808,7 @@ int abis_nm_establish_tei(struct gsm_bts *bts, u_int8_t trx_nr,
/* connect signalling of one (BTS,TRX) to a particular timeslot on the E1 */
int abis_nm_conn_terr_sign(struct gsm_bts_trx *trx,
- u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot)
+ uint8_t e1_port, uint8_t e1_timeslot, uint8_t e1_subslot)
{
struct gsm_bts *bts = trx->bts;
struct abis_om_hdr *oh;
@@ -1833,8 +1833,8 @@ int abis_nm_disc_terr_sign(struct abis_nm_h *h, struct abis_om_obj_inst *inst,
#endif
int abis_nm_conn_terr_traf(struct gsm_bts_trx_ts *ts,
- u_int8_t e1_port, u_int8_t e1_timeslot,
- u_int8_t e1_subslot)
+ uint8_t e1_port, uint8_t e1_timeslot,
+ uint8_t e1_subslot)
{
struct gsm_bts *bts = ts->trx->bts;
struct abis_om_hdr *oh;
@@ -1858,17 +1858,17 @@ int abis_nm_conn_terr_traf(struct gsm_bts_trx_ts *ts,
#if 0
int abis_nm_disc_terr_traf(struct abis_nm_h *h, struct abis_om_obj_inst *inst,
struct abis_nm_abis_channel *chan,
- u_int8_t subchan)
+ uint8_t subchan)
{
}
#endif
/* Chapter 8.6.1 */
-int abis_nm_set_bts_attr(struct gsm_bts *bts, u_int8_t *attr, int attr_len)
+int abis_nm_set_bts_attr(struct gsm_bts *bts, uint8_t *attr, int attr_len)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t *cur;
+ uint8_t *cur;
DEBUGP(DNM, "Set BTS Attr (bts=%d)\n", bts->nr);
@@ -1881,11 +1881,11 @@ int abis_nm_set_bts_attr(struct gsm_bts *bts, u_int8_t *attr, int attr_len)
}
/* Chapter 8.6.2 */
-int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, u_int8_t *attr, int attr_len)
+int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, uint8_t *attr, int attr_len)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t *cur;
+ uint8_t *cur;
DEBUGP(DNM, "Set TRX Attr (bts=%d,trx=%d)\n", trx->bts->nr, trx->nr);
@@ -1898,7 +1898,7 @@ int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, u_int8_t *attr, int attr_len
return abis_nm_sendmsg(trx->bts, msg);
}
-static int verify_chan_comb(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb)
+static int verify_chan_comb(struct gsm_bts_trx_ts *ts, uint8_t chan_comb)
{
int i;
@@ -2033,13 +2033,13 @@ static int verify_chan_comb(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb)
}
/* Chapter 8.6.3 */
-int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb)
+int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb)
{
struct gsm_bts *bts = ts->trx->bts;
struct abis_om_hdr *oh;
- u_int8_t zero = 0x00;
+ uint8_t zero = 0x00;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t len = 2 + 2;
+ uint8_t len = 2 + 2;
if (bts->type == GSM_BTS_TYPE_BS11)
len += 4 + 2 + 2 + 3;
@@ -2086,13 +2086,13 @@ int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb)
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_sw_act_req_ack(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i1,
- u_int8_t i2, u_int8_t i3, int nack, u_int8_t *attr, int att_len)
+int abis_nm_sw_act_req_ack(struct gsm_bts *bts, uint8_t obj_class, uint8_t i1,
+ uint8_t i2, uint8_t i3, int nack, uint8_t *attr, int att_len)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t msgtype = NM_MT_SW_ACT_REQ_ACK;
- u_int8_t len = att_len;
+ uint8_t msgtype = NM_MT_SW_ACT_REQ_ACK;
+ uint8_t len = att_len;
if (nack) {
len += 2;
@@ -2103,7 +2103,7 @@ int abis_nm_sw_act_req_ack(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i1,
fill_om_fom_hdr(oh, att_len, msgtype, obj_class, i1, i2, i3);
if (attr) {
- u_int8_t *ptr = msgb_put(msg, att_len);
+ uint8_t *ptr = msgb_put(msg, att_len);
memcpy(ptr, attr, att_len);
}
if (nack)
@@ -2112,11 +2112,11 @@ int abis_nm_sw_act_req_ack(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i1,
return abis_nm_sendmsg_direct(bts, msg);
}
-int abis_nm_raw_msg(struct gsm_bts *bts, int len, u_int8_t *rawmsg)
+int abis_nm_raw_msg(struct gsm_bts *bts, int len, uint8_t *rawmsg)
{
struct msgb *msg = nm_msgb_alloc();
struct abis_om_hdr *oh;
- u_int8_t *data;
+ uint8_t *data;
oh = (struct abis_om_hdr *) msgb_put(msg, sizeof(*oh));
fill_om_hdr(oh, len);
@@ -2127,7 +2127,7 @@ int abis_nm_raw_msg(struct gsm_bts *bts, int len, u_int8_t *rawmsg)
}
/* Siemens specific commands */
-static int __simple_cmd(struct gsm_bts *bts, u_int8_t msg_type)
+static int __simple_cmd(struct gsm_bts *bts, uint8_t msg_type)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2140,7 +2140,7 @@ static int __simple_cmd(struct gsm_bts *bts, u_int8_t msg_type)
}
/* Chapter 8.9.2 */
-int abis_nm_opstart(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, u_int8_t i1, u_int8_t i2)
+int abis_nm_opstart(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0, uint8_t i1, uint8_t i2)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2155,8 +2155,8 @@ int abis_nm_opstart(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, u_int8
}
/* Chapter 8.8.5 */
-int abis_nm_chg_adm_state(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0,
- u_int8_t i1, u_int8_t i2, enum abis_nm_adm_state adm_state)
+int abis_nm_chg_adm_state(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0,
+ uint8_t i1, uint8_t i2, enum abis_nm_adm_state adm_state)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2168,12 +2168,12 @@ int abis_nm_chg_adm_state(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0,
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_conn_mdrop_link(struct gsm_bts *bts, u_int8_t e1_port0, u_int8_t ts0,
- u_int8_t e1_port1, u_int8_t ts1)
+int abis_nm_conn_mdrop_link(struct gsm_bts *bts, uint8_t e1_port0, uint8_t ts0,
+ uint8_t e1_port1, uint8_t ts1)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t *attr;
+ uint8_t *attr;
DEBUGP(DNM, "CONNECT MDROP LINK E1=(%u,%u) -> E1=(%u, %u)\n",
e1_port0, ts0, e1_port1, ts1);
@@ -2196,9 +2196,9 @@ int abis_nm_conn_mdrop_link(struct gsm_bts *bts, u_int8_t e1_port0, u_int8_t ts0
}
/* Chapter 8.7.1 */
-int abis_nm_perform_test(struct gsm_bts *bts, u_int8_t obj_class,
- u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr,
- u_int8_t test_nr, u_int8_t auton_report, struct msgb *msg)
+int abis_nm_perform_test(struct gsm_bts *bts, uint8_t obj_class,
+ uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+ uint8_t test_nr, uint8_t auton_report, struct msgb *msg)
{
struct abis_om_hdr *oh;
@@ -2241,12 +2241,12 @@ int abis_nm_bs11_restart(struct gsm_bts *bts)
struct bs11_date_time {
- u_int16_t year;
- u_int8_t month;
- u_int8_t day;
- u_int8_t hour;
- u_int8_t min;
- u_int8_t sec;
+ uint16_t year;
+ uint8_t month;
+ uint8_t day;
+ uint8_t hour;
+ uint8_t min;
+ uint8_t sec;
} __attribute__((packed));
@@ -2279,12 +2279,12 @@ int abis_nm_bs11_db_transmission(struct gsm_bts *bts, int begin)
}
int abis_nm_bs11_create_object(struct gsm_bts *bts,
- enum abis_bs11_objtype type, u_int8_t idx,
- u_int8_t attr_len, const u_int8_t *attr)
+ enum abis_bs11_objtype type, uint8_t idx,
+ uint8_t attr_len, const uint8_t *attr)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t *cur;
+ uint8_t *cur;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, attr_len, NM_MT_BS11_CREATE_OBJ,
@@ -2296,7 +2296,7 @@ int abis_nm_bs11_create_object(struct gsm_bts *bts,
}
int abis_nm_bs11_delete_object(struct gsm_bts *bts,
- enum abis_bs11_objtype type, u_int8_t idx)
+ enum abis_bs11_objtype type, uint8_t idx)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2308,11 +2308,11 @@ int abis_nm_bs11_delete_object(struct gsm_bts *bts,
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, u_int8_t idx)
+int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, uint8_t idx)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t zero = 0x00;
+ uint8_t zero = 0x00;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, 3, NM_MT_BS11_CREATE_OBJ,
@@ -2322,7 +2322,7 @@ int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, u_int8_t idx)
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_bs11_create_bport(struct gsm_bts *bts, u_int8_t idx)
+int abis_nm_bs11_create_bport(struct gsm_bts *bts, uint8_t idx)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2334,7 +2334,7 @@ int abis_nm_bs11_create_bport(struct gsm_bts *bts, u_int8_t idx)
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_bs11_delete_bport(struct gsm_bts *bts, u_int8_t idx)
+int abis_nm_bs11_delete_bport(struct gsm_bts *bts, uint8_t idx)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2346,7 +2346,7 @@ int abis_nm_bs11_delete_bport(struct gsm_bts *bts, u_int8_t idx)
return abis_nm_sendmsg(bts, msg);
}
-static const u_int8_t sm_attr[] = { NM_ATT_TEI, NM_ATT_ABIS_CHANNEL };
+static const uint8_t sm_attr[] = { NM_ATT_TEI, NM_ATT_ABIS_CHANNEL };
int abis_nm_bs11_get_oml_tei_ts(struct gsm_bts *bts)
{
struct abis_om_hdr *oh;
@@ -2361,9 +2361,9 @@ int abis_nm_bs11_get_oml_tei_ts(struct gsm_bts *bts)
}
/* like abis_nm_conn_terr_traf + set_tei */
-int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, u_int8_t e1_port,
- u_int8_t e1_timeslot, u_int8_t e1_subslot,
- u_int8_t tei)
+int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, uint8_t e1_port,
+ uint8_t e1_timeslot, uint8_t e1_subslot,
+ uint8_t tei)
{
struct abis_om_hdr *oh;
struct abis_nm_channel *ch;
@@ -2380,7 +2380,7 @@ int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, u_int8_t e1_port,
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_bs11_set_trx_power(struct gsm_bts_trx *trx, u_int8_t level)
+int abis_nm_bs11_set_trx_power(struct gsm_bts_trx *trx, uint8_t level)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2397,7 +2397,7 @@ int abis_nm_bs11_get_trx_power(struct gsm_bts_trx *trx)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t attr = NM_ATT_BS11_TXPWR;
+ uint8_t attr = NM_ATT_BS11_TXPWR;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, 2+sizeof(attr), NM_MT_GET_ATTR,
@@ -2411,7 +2411,7 @@ int abis_nm_bs11_get_pll_mode(struct gsm_bts *bts)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t attr[] = { NM_ATT_BS11_PLL_MODE };
+ uint8_t attr[] = { NM_ATT_BS11_PLL_MODE };
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, 2+sizeof(attr), NM_MT_GET_ATTR,
@@ -2425,7 +2425,7 @@ int abis_nm_bs11_get_cclk(struct gsm_bts *bts)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t attr[] = { NM_ATT_BS11_CCLK_ACCURACY,
+ uint8_t attr[] = { NM_ATT_BS11_CCLK_ACCURACY,
NM_ATT_BS11_CCLK_TYPE };
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
@@ -2437,7 +2437,7 @@ int abis_nm_bs11_get_cclk(struct gsm_bts *bts)
}
-//static const u_int8_t bs11_logon_c7[] = { 0x07, 0xd9, 0x01, 0x11, 0x0d, 0x10, 0x20 };
+//static const uint8_t bs11_logon_c7[] = { 0x07, 0xd9, 0x01, 0x11, 0x0d, 0x10, 0x20 };
int abis_nm_bs11_factory_logon(struct gsm_bts *bts, int on)
{
@@ -2449,7 +2449,7 @@ int abis_nm_bs11_infield_logon(struct gsm_bts *bts, int on)
return abis_nm_bs11_logon(bts, 0x03, "FIELD ", on);
}
-int abis_nm_bs11_logon(struct gsm_bts *bts, u_int8_t level, const char *name, int on)
+int abis_nm_bs11_logon(struct gsm_bts *bts, uint8_t level, const char *name, int on)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2459,16 +2459,16 @@ int abis_nm_bs11_logon(struct gsm_bts *bts, u_int8_t level, const char *name, in
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
if (on) {
- u_int8_t len = 3*2 + sizeof(bdt)
+ uint8_t len = 3*2 + sizeof(bdt)
+ 1 + strlen(name);
fill_om_fom_hdr(oh, len, NM_MT_BS11_LMT_LOGON,
NM_OC_BS11_BTSE, 0xff, 0xff, 0xff);
msgb_tlv_put(msg, NM_ATT_BS11_LMT_LOGIN_TIME,
- sizeof(bdt), (u_int8_t *) &bdt);
+ sizeof(bdt), (uint8_t *) &bdt);
msgb_tlv_put(msg, NM_ATT_BS11_LMT_USER_ACC_LEV,
1, &level);
msgb_tlv_put(msg, NM_ATT_BS11_LMT_USER_NAME,
- strlen(name), (u_int8_t *)name);
+ strlen(name), (uint8_t *)name);
} else {
fill_om_fom_hdr(oh, 0, NM_MT_BS11_LMT_LOGOFF,
NM_OC_BS11_BTSE, 0xff, 0xff, 0xff);
@@ -2489,7 +2489,7 @@ int abis_nm_bs11_set_trx1_pw(struct gsm_bts *bts, const char *password)
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, 2+strlen(password), NM_MT_BS11_SET_ATTR,
NM_OC_BS11, BS11_OBJ_TRX1, 0x00, 0x00);
- msgb_tlv_put(msg, NM_ATT_BS11_PASSWORD, 10, (const u_int8_t *)password);
+ msgb_tlv_put(msg, NM_ATT_BS11_PASSWORD, 10, (const uint8_t *)password);
return abis_nm_sendmsg(bts, msg);
}
@@ -2499,7 +2499,7 @@ int abis_nm_bs11_set_pll_locked(struct gsm_bts *bts, int locked)
{
struct abis_om_hdr *oh;
struct msgb *msg;
- u_int8_t tlv_value;
+ uint8_t tlv_value;
msg = nm_msgb_alloc();
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
@@ -2522,7 +2522,7 @@ int abis_nm_bs11_set_pll(struct gsm_bts *bts, int value)
{
struct abis_om_hdr *oh;
struct msgb *msg;
- u_int8_t tlv_value[2];
+ uint8_t tlv_value[2];
msg = nm_msgb_alloc();
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
@@ -2549,7 +2549,7 @@ void *tall_fle_ctx;
struct abis_nm_bs11_sw {
struct gsm_bts *bts;
char swl_fname[PATH_MAX];
- u_int8_t win_size;
+ uint8_t win_size;
int forced;
struct llist_head file_list;
gsm_cbfn *user_cb; /* specified by the user */
@@ -2675,7 +2675,7 @@ static int bs11_swload_cbfn(unsigned int hook, unsigned int event,
* files that are part of a software release. We need to upload first
* the list file, and then each file that is listed in the list file */
int abis_nm_bs11_load_swl(struct gsm_bts *bts, const char *fname,
- u_int8_t win_size, int forced, gsm_cbfn *cbfn)
+ uint8_t win_size, int forced, gsm_cbfn *cbfn)
{
struct abis_nm_bs11_sw *bs11_sw = g_bs11_sw;
struct file_list_entry *fle;
@@ -2705,7 +2705,7 @@ int abis_nm_bs11_load_swl(struct gsm_bts *bts, const char *fname,
}
#if 0
-static u_int8_t req_attr_btse[] = {
+static uint8_t req_attr_btse[] = {
NM_ATT_ADM_STATE, NM_ATT_BS11_LMT_LOGON_SESSION,
NM_ATT_BS11_LMT_LOGIN_TIME, NM_ATT_BS11_LMT_USER_ACC_LEV,
NM_ATT_BS11_LMT_USER_NAME,
@@ -2716,14 +2716,14 @@ static u_int8_t req_attr_btse[] = {
NM_ATT_BS11_SW_LOAD_STORED };
-static u_int8_t req_attr_btsm[] = {
+static uint8_t req_attr_btsm[] = {
NM_ATT_ABIS_CHANNEL, NM_ATT_TEI, NM_ATT_BS11_ABIS_EXT_TIME,
NM_ATT_ADM_STATE, NM_ATT_AVAIL_STATUS, 0xce, NM_ATT_FILE_ID,
NM_ATT_FILE_VERSION, NM_ATT_OPER_STATE, 0xe8, NM_ATT_BS11_ALL_TEST_CATG,
NM_ATT_SW_DESCR, NM_ATT_GET_ARI };
#endif
-static u_int8_t req_attr[] = {
+static uint8_t req_attr[] = {
NM_ATT_ADM_STATE, NM_ATT_AVAIL_STATUS, 0xa8, NM_ATT_OPER_STATE,
0xd5, 0xa1, NM_ATT_BS11_ESN_FW_CODE_NO, NM_ATT_BS11_ESN_HW_CODE_NO,
0x42, NM_ATT_BS11_ESN_PCB_SERIAL, NM_ATT_BS11_PLL };
@@ -2753,16 +2753,16 @@ int abis_nm_bs11_set_ext_time(struct gsm_bts *bts)
/* SiemensHW CCTRL object */
fill_om_fom_hdr(oh, 2+sizeof(aet), NM_MT_BS11_SET_ATTR, NM_OC_SITE_MANAGER,
0xff, 0xff, 0xff);
- msgb_tlv_put(msg, NM_ATT_BS11_ABIS_EXT_TIME, sizeof(aet), (u_int8_t *) &aet);
+ msgb_tlv_put(msg, NM_ATT_BS11_ABIS_EXT_TIME, sizeof(aet), (uint8_t *) &aet);
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_bs11_get_bport_line_cfg(struct gsm_bts *bts, u_int8_t bport)
+int abis_nm_bs11_get_bport_line_cfg(struct gsm_bts *bts, uint8_t bport)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
- u_int8_t attr = NM_ATT_BS11_LINE_CFG;
+ uint8_t attr = NM_ATT_BS11_LINE_CFG;
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, 2+sizeof(attr), NM_MT_GET_ATTR,
@@ -2772,7 +2772,7 @@ int abis_nm_bs11_get_bport_line_cfg(struct gsm_bts *bts, u_int8_t bport)
return abis_nm_sendmsg(bts, msg);
}
-int abis_nm_bs11_set_bport_line_cfg(struct gsm_bts *bts, u_int8_t bport, enum abis_bs11_line_cfg line_cfg)
+int abis_nm_bs11_set_bport_line_cfg(struct gsm_bts *bts, uint8_t bport, enum abis_bs11_line_cfg line_cfg)
{
struct abis_om_hdr *oh;
struct msgb *msg = nm_msgb_alloc();
@@ -2796,7 +2796,7 @@ static int abis_nm_rx_ipacc(struct msgb *msg)
struct in_addr addr;
struct abis_om_hdr *oh = msgb_l2(msg);
struct abis_om_fom_hdr *foh;
- u_int8_t idstrlen = oh->data[0];
+ uint8_t idstrlen = oh->data[0];
struct tlv_parsed tp;
struct ipacc_ack_signal_data signal;
@@ -2823,7 +2823,7 @@ static int abis_nm_rx_ipacc(struct msgb *msg)
}
if (TLVP_PRESENT(&tp, NM_ATT_IPACC_DST_IP_PORT))
DEBUGPC(DNM, "PORT=%u ",
- ntohs(*((u_int16_t *)
+ ntohs(*((uint16_t *)
TLVP_VAL(&tp, NM_ATT_IPACC_DST_IP_PORT))));
if (TLVP_PRESENT(&tp, NM_ATT_IPACC_STREAM_ID))
DEBUGPC(DNM, "STREAM=0x%02x ",
@@ -2900,15 +2900,15 @@ static int abis_nm_rx_ipacc(struct msgb *msg)
}
/* send an ip-access manufacturer specific message */
-int abis_nm_ipaccess_msg(struct gsm_bts *bts, u_int8_t msg_type,
- u_int8_t obj_class, u_int8_t bts_nr,
- u_int8_t trx_nr, u_int8_t ts_nr,
- u_int8_t *attr, int attr_len)
+int abis_nm_ipaccess_msg(struct gsm_bts *bts, uint8_t msg_type,
+ uint8_t obj_class, uint8_t bts_nr,
+ uint8_t trx_nr, uint8_t ts_nr,
+ uint8_t *attr, int attr_len)
{
struct msgb *msg = nm_msgb_alloc();
struct abis_om_hdr *oh;
struct abis_om_fom_hdr *foh;
- u_int8_t *data;
+ uint8_t *data;
/* construct the 12.21 OM header, observe the erroneous length */
oh = (struct abis_om_hdr *) msgb_put(msg, sizeof(*oh));
@@ -2937,7 +2937,7 @@ int abis_nm_ipaccess_msg(struct gsm_bts *bts, u_int8_t msg_type,
}
/* set some attributes in NVRAM */
-int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, u_int8_t *attr,
+int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, uint8_t *attr,
int attr_len)
{
return abis_nm_ipaccess_msg(trx->bts, NM_MT_IPACC_SET_NVATTR,
@@ -2946,10 +2946,10 @@ int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, u_int8_t *attr,
}
int abis_nm_ipaccess_rsl_connect(struct gsm_bts_trx *trx,
- u_int32_t ip, u_int16_t port, u_int8_t stream)
+ uint32_t ip, uint16_t port, uint8_t stream)
{
struct in_addr ia;
- u_int8_t attr[] = { NM_ATT_IPACC_STREAM_ID, 0,
+ uint8_t attr[] = { NM_ATT_IPACC_STREAM_ID, 0,
NM_ATT_IPACC_DST_IP_PORT, 0, 0,
NM_ATT_IPACC_DST_IP, 0, 0, 0, 0 };
@@ -2959,7 +2959,7 @@ int abis_nm_ipaccess_rsl_connect(struct gsm_bts_trx *trx,
attr[1] = stream;
attr[3] = port >> 8;
attr[4] = port & 0xff;
- *(u_int32_t *)(attr+6) = ia.s_addr;
+ *(uint32_t *)(attr+6) = ia.s_addr;
/* if ip == 0, we use the default IP */
if (ip == 0)
@@ -2986,21 +2986,21 @@ int abis_nm_ipaccess_restart(struct gsm_bts_trx *trx)
return abis_nm_sendmsg(trx->bts, msg);
}
-int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, u_int8_t obj_class,
- u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr,
- u_int8_t *attr, u_int8_t attr_len)
+int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, uint8_t obj_class,
+ uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+ uint8_t *attr, uint8_t attr_len)
{
return abis_nm_ipaccess_msg(bts, NM_MT_IPACC_SET_ATTR,
obj_class, bts_nr, trx_nr, ts_nr,
attr, attr_len);
}
-void abis_nm_ipaccess_cgi(u_int8_t *buf, struct gsm_bts *bts)
+void abis_nm_ipaccess_cgi(uint8_t *buf, struct gsm_bts *bts)
{
/* we simply reuse the GSM48 function and overwrite the RAC
* with the Cell ID */
gsm48_ra_id_by_bts(buf, bts);
- *((u_int16_t *)(buf + 5)) = htons(bts->cell_identity);
+ *((uint16_t *)(buf + 5)) = htons(bts->cell_identity);
}
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked)
@@ -3025,12 +3025,12 @@ static const struct value_string ipacc_testres_names[] = {
{ 0, NULL }
};
-const char *ipacc_testres_name(u_int8_t res)
+const char *ipacc_testres_name(uint8_t res)
{
return get_value_string(ipacc_testres_names, res);
}
-void ipac_parse_cgi(struct cell_global_id *cid, const u_int8_t *buf)
+void ipac_parse_cgi(struct cell_global_id *cid, const uint8_t *buf)
{
cid->mcc = (buf[0] & 0xf) * 100;
cid->mcc += (buf[0] >> 4) * 10;
@@ -3045,15 +3045,15 @@ void ipac_parse_cgi(struct cell_global_id *cid, const u_int8_t *buf)
cid->mnc += (buf[1] >> 4) * 1;
}
- cid->lac = ntohs(*((u_int16_t *)&buf[3]));
- cid->ci = ntohs(*((u_int16_t *)&buf[5]));
+ cid->lac = ntohs(*((uint16_t *)&buf[3]));
+ cid->ci = ntohs(*((uint16_t *)&buf[5]));
}
/* parse BCCH information IEI from wire format to struct ipac_bcch_info */
-int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf)
+int ipac_parse_bcch_info(struct ipac_bcch_info *binf, uint8_t *buf)
{
- u_int8_t *cur = buf;
- u_int16_t len;
+ uint8_t *cur = buf;
+ uint16_t len;
memset(binf, 0, sizeof(*binf));
@@ -3061,10 +3061,10 @@ int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf)
return -EINVAL;
cur++;
- len = ntohs(*(u_int16_t *)cur);
+ len = ntohs(*(uint16_t *)cur);
cur += 2;
- binf->info_type = ntohs(*(u_int16_t *)cur);
+ binf->info_type = ntohs(*(uint16_t *)cur);
cur += 2;
if (binf->info_type & IPAC_BINF_FREQ_ERR_QUAL)
@@ -3082,15 +3082,15 @@ int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf)
cur++;
if (binf->info_type & IPAC_BINF_FREQ_ERR_QUAL)
- binf->freq_err = ntohs(*(u_int16_t *)cur);
+ binf->freq_err = ntohs(*(uint16_t *)cur);
cur += 2;
if (binf->info_type & IPAC_BINF_FRAME_OFFSET)
- binf->frame_offset = ntohs(*(u_int16_t *)cur);
+ binf->frame_offset = ntohs(*(uint16_t *)cur);
cur += 2;
if (binf->info_type & IPAC_BINF_FRAME_NR_OFFSET)
- binf->frame_nr_offset = ntohl(*(u_int32_t *)cur);
+ binf->frame_nr_offset = ntohl(*(uint32_t *)cur);
cur += 4;
#if 0
diff --git a/openbsc/src/libbsc/abis_nm_ipaccess.c b/openbsc/src/libbsc/abis_nm_ipaccess.c
index 754efe28d..b8225383a 100644
--- a/openbsc/src/libbsc/abis_nm_ipaccess.c
+++ b/openbsc/src/libbsc/abis_nm_ipaccess.c
@@ -63,12 +63,12 @@ enum ipa_embedded_att {
};
/* append an ip.access channel list to the given msgb */
-static int ipa_chan_list_append(struct msgb *msg, u_int8_t ie,
- u_int16_t *arfcns, int arfcn_count)
+static int ipa_chan_list_append(struct msgb *msg, uint8_t ie,
+ uint16_t *arfcns, int arfcn_count)
{
int i;
- u_int8_t *u8;
- u_int16_t *u16;
+ uint8_t *u8;
+ uint16_t *u16;
/* tag */
u8 = msgb_push(msg, 1);
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index c1aef9f78..7743cd803 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -631,7 +631,7 @@ static struct msgb *om2k_msgb_alloc(void)
"OM2000");
}
-static int abis_om2k_tlv_parse(struct tlv_parsed *tp, const u_int8_t *buf, int len)
+static int abis_om2k_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len)
{
return tlv_parse(tp, &om2k_att_tlvdef, buf, len, 0, 0);
}
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 8cac83285..70a4e9938 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -59,7 +59,7 @@ static void send_lchan_signal(int sig_no, struct gsm_lchan *lchan,
dispatch_signal(SS_LCHAN, sig_no, &sig);
}
-static u_int8_t mdisc_by_msgtype(u_int8_t msg_type)
+static uint8_t mdisc_by_msgtype(uint8_t msg_type)
{
/* mask off the transparent bit ? */
msg_type &= 0xfe;
@@ -79,7 +79,7 @@ static u_int8_t mdisc_by_msgtype(u_int8_t msg_type)
}
static inline void init_dchan_hdr(struct abis_rsl_dchan_hdr *dh,
- u_int8_t msg_type)
+ uint8_t msg_type)
{
dh->c.msg_discr = mdisc_by_msgtype(msg_type);
dh->c.msg_type = msg_type;
@@ -87,12 +87,12 @@ static inline void init_dchan_hdr(struct abis_rsl_dchan_hdr *dh,
}
/* determine logical channel based on TRX and channel number IE */
-struct gsm_lchan *lchan_lookup(struct gsm_bts_trx *trx, u_int8_t chan_nr)
+struct gsm_lchan *lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr)
{
struct gsm_lchan *lchan;
- u_int8_t ts_nr = chan_nr & 0x07;
- u_int8_t cbits = chan_nr >> 3;
- u_int8_t lch_idx;
+ uint8_t ts_nr = chan_nr & 0x07;
+ uint8_t cbits = chan_nr >> 3;
+ uint8_t lch_idx;
struct gsm_bts_trx_ts *ts = &trx->ts[ts_nr];
if (cbits == 0x01) {
@@ -138,9 +138,9 @@ struct gsm_lchan *lchan_lookup(struct gsm_bts_trx *trx, u_int8_t chan_nr)
}
/* See Table 10.5.25 of GSM04.08 */
-static u_int8_t ts2chan_nr(const struct gsm_bts_trx_ts *ts, uint8_t lchan_nr)
+static uint8_t ts2chan_nr(const struct gsm_bts_trx_ts *ts, uint8_t lchan_nr)
{
- u_int8_t cbits, chan_nr;
+ uint8_t cbits, chan_nr;
switch (ts->pchan) {
case GSM_PCHAN_TCH_F:
@@ -171,15 +171,15 @@ static u_int8_t ts2chan_nr(const struct gsm_bts_trx_ts *ts, uint8_t lchan_nr)
return chan_nr;
}
-u_int8_t lchan2chan_nr(const struct gsm_lchan *lchan)
+uint8_t lchan2chan_nr(const struct gsm_lchan *lchan)
{
return ts2chan_nr(lchan->ts, lchan->nr);
}
/* As per TS 03.03 Section 2.2, the IMSI has 'not more than 15 digits' */
-u_int64_t str_to_imsi(const char *imsi_str)
+uint64_t str_to_imsi(const char *imsi_str)
{
- u_int64_t ret;
+ uint64_t ret;
ret = strtoull(imsi_str, NULL, 10);
@@ -196,14 +196,14 @@ unsigned int n_pag_blocks(int bs_ccch_sdcch_comb, unsigned int bs_ag_blks_res)
}
/* Chapter 6.5.2 of TS 05.02 */
-unsigned int get_ccch_group(u_int64_t imsi, unsigned int bs_cc_chans,
+unsigned int get_ccch_group(uint64_t imsi, unsigned int bs_cc_chans,
unsigned int n_pag_blocks)
{
return (imsi % 1000) % (bs_cc_chans * n_pag_blocks) / n_pag_blocks;
}
/* Chapter 6.5.2 of TS 05.02 */
-unsigned int get_paging_group(u_int64_t imsi, unsigned int bs_cc_chans,
+unsigned int get_paging_group(uint64_t imsi, unsigned int bs_cc_chans,
int n_pag_blocks)
{
return (imsi % 1000) % (bs_cc_chans * n_pag_blocks) % n_pag_blocks;
@@ -216,7 +216,7 @@ static struct msgb *rsl_msgb_alloc(void)
}
#define MACBLOCK_SIZE 23
-static void pad_macblock(u_int8_t *out, const u_int8_t *in, int len)
+static void pad_macblock(uint8_t *out, const uint8_t *in, int len)
{
memcpy(out, in, len);
@@ -225,7 +225,7 @@ static void pad_macblock(u_int8_t *out, const u_int8_t *in, int len)
}
/* Chapter 9.3.7: Encryption Information */
-static int build_encr_info(u_int8_t *out, struct gsm_lchan *lchan)
+static int build_encr_info(uint8_t *out, struct gsm_lchan *lchan)
{
*out++ = lchan->encr.alg_id & 0xff;
if (lchan->encr.key_len)
@@ -233,7 +233,7 @@ static int build_encr_info(u_int8_t *out, struct gsm_lchan *lchan)
return lchan->encr.key_len + 1;
}
-static void print_rsl_cause(int lvl, const u_int8_t *cause_v, u_int8_t cause_len)
+static void print_rsl_cause(int lvl, const uint8_t *cause_v, uint8_t cause_len)
{
int i;
@@ -244,8 +244,8 @@ static void print_rsl_cause(int lvl, const u_int8_t *cause_v, u_int8_t cause_len
}
/* Send a BCCH_INFO message as per Chapter 8.5.1 */
-int rsl_bcch_info(struct gsm_bts_trx *trx, u_int8_t type,
- const u_int8_t *data, int len)
+int rsl_bcch_info(struct gsm_bts_trx *trx, uint8_t type,
+ const uint8_t *data, int len)
{
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg = rsl_msgb_alloc();
@@ -262,8 +262,8 @@ int rsl_bcch_info(struct gsm_bts_trx *trx, u_int8_t type,
return abis_rsl_sendmsg(msg);
}
-int rsl_sacch_filling(struct gsm_bts_trx *trx, u_int8_t type,
- const u_int8_t *data, int len)
+int rsl_sacch_filling(struct gsm_bts_trx *trx, uint8_t type,
+ const uint8_t *data, int len)
{
struct abis_rsl_common_hdr *ch;
struct msgb *msg = rsl_msgb_alloc();
@@ -280,12 +280,12 @@ int rsl_sacch_filling(struct gsm_bts_trx *trx, u_int8_t type,
return abis_rsl_sendmsg(msg);
}
-int rsl_sacch_info_modify(struct gsm_lchan *lchan, u_int8_t type,
- const u_int8_t *data, int len)
+int rsl_sacch_info_modify(struct gsm_lchan *lchan, uint8_t type,
+ const uint8_t *data, int len)
{
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg = rsl_msgb_alloc();
- u_int8_t chan_nr = lchan2chan_nr(lchan);
+ uint8_t chan_nr = lchan2chan_nr(lchan);
dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
init_dchan_hdr(dh, RSL_MT_SACCH_INFO_MODIFY);
@@ -303,7 +303,7 @@ int rsl_chan_bs_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int db)
{
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg;
- u_int8_t chan_nr = lchan2chan_nr(lchan);
+ uint8_t chan_nr = lchan2chan_nr(lchan);
db = abs(db);
if (db > 30)
@@ -330,7 +330,7 @@ int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int dbm)
{
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg;
- u_int8_t chan_nr = lchan2chan_nr(lchan);
+ uint8_t chan_nr = lchan2chan_nr(lchan);
int ctl_lvl;
ctl_lvl = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, dbm);
@@ -421,12 +421,12 @@ static int channel_mode_from_lchan(struct rsl_ie_chan_mode *cm,
/* Chapter 8.4.1 */
#if 0
-int rsl_chan_activate(struct gsm_bts_trx *trx, u_int8_t chan_nr,
- u_int8_t act_type,
+int rsl_chan_activate(struct gsm_bts_trx *trx, uint8_t chan_nr,
+ uint8_t act_type,
struct rsl_ie_chan_mode *chan_mode,
struct rsl_ie_chan_ident *chan_ident,
- u_int8_t bs_power, u_int8_t ms_power,
- u_int8_t ta)
+ uint8_t bs_power, uint8_t ms_power,
+ uint8_t ta)
{
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg = rsl_msgb_alloc();
@@ -438,12 +438,12 @@ int rsl_chan_activate(struct gsm_bts_trx *trx, u_int8_t chan_nr,
msgb_tv_put(msg, RSL_IE_ACT_TYPE, act_type);
/* For compatibility with Phase 1 */
msgb_tlv_put(msg, RSL_IE_CHAN_MODE, sizeof(*chan_mode),
- (u_int8_t *) chan_mode);
+ (uint8_t *) chan_mode);
msgb_tlv_put(msg, RSL_IE_CHAN_IDENT, 4,
- (u_int8_t *) chan_ident);
+ (uint8_t *) chan_ident);
#if 0
msgb_tlv_put(msg, RSL_IE_ENCR_INFO, 1,
- (u_int8_t *) &encr_info);
+ (uint8_t *) &encr_info);
#endif
msgb_tv_put(msg, RSL_IE_BS_POWER, bs_power);
msgb_tv_put(msg, RSL_IE_MS_POWER, ms_power);
@@ -455,15 +455,15 @@ int rsl_chan_activate(struct gsm_bts_trx *trx, u_int8_t chan_nr,
}
#endif
-int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
- u_int8_t ta, u_int8_t ho_ref)
+int rsl_chan_activate_lchan(struct gsm_lchan *lchan, uint8_t act_type,
+ uint8_t ta, uint8_t ho_ref)
{
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg;
int rc;
uint8_t *len;
- u_int8_t chan_nr = lchan2chan_nr(lchan);
+ uint8_t chan_nr = lchan2chan_nr(lchan);
struct rsl_ie_chan_mode cm;
struct gsm48_chan_desc cd;
@@ -481,7 +481,7 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
msgb_tv_put(msg, RSL_IE_ACT_TYPE, act_type);
msgb_tlv_put(msg, RSL_IE_CHAN_MODE, sizeof(cm),
- (u_int8_t *) &cm);
+ (uint8_t *) &cm);
/*
* The Channel Identification is needed for Phase1 phones
@@ -505,7 +505,7 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
*len = msgb_l3len(msg);
if (lchan->encr.alg_id > RSL_ENC_ALG_A5(0)) {
- u_int8_t encr_info[MAX_A5_KEY_LEN+2];
+ uint8_t encr_info[MAX_A5_KEY_LEN+2];
rc = build_encr_info(encr_info, lchan);
if (rc > 0)
msgb_tlv_put(msg, RSL_IE_ENCR_INFO, rc, encr_info);
@@ -526,7 +526,7 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR)
msgb_tlv_put(msg, RSL_IE_MR_CONFIG, sizeof(lchan->mr_conf),
- (u_int8_t *) &lchan->mr_conf);
+ (uint8_t *) &lchan->mr_conf);
msg->trx = lchan->ts->trx;
@@ -540,7 +540,7 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
struct msgb *msg;
int rc;
- u_int8_t chan_nr = lchan2chan_nr(lchan);
+ uint8_t chan_nr = lchan2chan_nr(lchan);
struct rsl_ie_chan_mode cm;
rc = channel_mode_from_lchan(&cm, lchan);
@@ -553,10 +553,10 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
dh->chan_nr = chan_nr;
msgb_tlv_put(msg, RSL_IE_CHAN_MODE, sizeof(cm),
- (u_int8_t *) &cm);
+ (uint8_t *) &cm);
if (lchan->encr.alg_id > RSL_ENC_ALG_A5(0)) {
- u_int8_t encr_info[MAX_A5_KEY_LEN+2];
+ uint8_t encr_info[MAX_A5_KEY_LEN+2];
rc = build_encr_info(encr_info, lchan);
if (rc > 0)
msgb_tlv_put(msg, RSL_IE_ENCR_INFO, rc, encr_info);
@@ -564,7 +564,7 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR) {
msgb_tlv_put(msg, RSL_IE_MR_CONFIG, sizeof(lchan->mr_conf),
- (u_int8_t *) &lchan->mr_conf);
+ (uint8_t *) &lchan->mr_conf);
}
msg->trx = lchan->ts->trx;
@@ -577,9 +577,9 @@ int rsl_encryption_cmd(struct msgb *msg)
{
struct abis_rsl_dchan_hdr *dh;
struct gsm_lchan *lchan = msg->lchan;
- u_int8_t chan_nr = lchan2chan_nr(lchan);
- u_int8_t encr_info[MAX_A5_KEY_LEN+2];
- u_int8_t l3_len = msg->len;
+ uint8_t chan_nr = lchan2chan_nr(lchan);
+ uint8_t encr_info[MAX_A5_KEY_LEN+2];
+ uint8_t l3_len = msg->len;
int rc;
/* First push the L3 IE tag and length */
@@ -704,8 +704,8 @@ static int rsl_rx_rf_chan_rel_ack(struct gsm_lchan *lchan)
return 0;
}
-int rsl_paging_cmd(struct gsm_bts *bts, u_int8_t paging_group, u_int8_t len,
- u_int8_t *ms_ident, u_int8_t chan_needed)
+int rsl_paging_cmd(struct gsm_bts *bts, uint8_t paging_group, uint8_t len,
+ uint8_t *ms_ident, uint8_t chan_needed)
{
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg = rsl_msgb_alloc();
@@ -723,7 +723,7 @@ int rsl_paging_cmd(struct gsm_bts *bts, u_int8_t paging_group, u_int8_t len,
return abis_rsl_sendmsg(msg);
}
-int imsi_str2bcd(u_int8_t *bcd_out, const char *str_in)
+int imsi_str2bcd(uint8_t *bcd_out, const char *str_in)
{
int i, len = strlen(str_in);
@@ -741,11 +741,11 @@ int imsi_str2bcd(u_int8_t *bcd_out, const char *str_in)
}
/* Chapter 8.5.6 */
-int rsl_imm_assign_cmd(struct gsm_bts *bts, u_int8_t len, u_int8_t *val)
+int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val)
{
struct msgb *msg = rsl_msgb_alloc();
struct abis_rsl_dchan_hdr *dh;
- u_int8_t buf[MACBLOCK_SIZE];
+ uint8_t buf[MACBLOCK_SIZE];
dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
init_dchan_hdr(dh, RSL_MT_IMMEDIATE_ASSIGN_CMD);
@@ -777,10 +777,10 @@ int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci)
init_dchan_hdr(dh, RSL_MT_SIEMENS_MRPCI);
dh->c.msg_discr = ABIS_RSL_MDISC_DED_CHAN;
dh->chan_nr = lchan2chan_nr(lchan);
- msgb_tv_put(msg, RSL_IE_SIEMENS_MRPCI, *(u_int8_t *)mrpci);
+ msgb_tv_put(msg, RSL_IE_SIEMENS_MRPCI, *(uint8_t *)mrpci);
DEBUGP(DRSL, "%s TX Siemens MRPCI 0x%02x\n",
- gsm_lchan_name(lchan), *(u_int8_t *)mrpci);
+ gsm_lchan_name(lchan), *(uint8_t *)mrpci);
msg->trx = lchan->ts->trx;
@@ -790,7 +790,7 @@ int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci)
/* Send "DATA REQUEST" message with given L3 Info payload */
/* Chapter 8.3.1 */
-int rsl_data_request(struct msgb *msg, u_int8_t link_id)
+int rsl_data_request(struct msgb *msg, uint8_t link_id)
{
if (msg->lchan == NULL) {
LOGP(DRSL, LOGL_ERROR, "cannot send DATA REQUEST to unknown lchan\n");
@@ -807,7 +807,7 @@ int rsl_data_request(struct msgb *msg, u_int8_t link_id)
/* Send "ESTABLISH REQUEST" message with given L3 Info payload */
/* Chapter 8.3.1 */
-int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id)
+int rsl_establish_request(struct gsm_lchan *lchan, uint8_t link_id)
{
struct msgb *msg;
@@ -823,7 +823,7 @@ int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id)
RELEASE CONFIRM, which we in turn use to trigger RSL CHANNEL RELEASE,
which in turn is acknowledged by RSL CHANNEL RELEASE ACK, which calls
lchan_free() */
-int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t reason)
+int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id, uint8_t reason)
{
struct msgb *msg;
@@ -889,7 +889,7 @@ static int rsl_rx_chan_act_nack(struct msgb *msg)
rsl_tlv_parse(&tp, dh->data, msgb_l2len(msg)-sizeof(*dh));
if (TLVP_PRESENT(&tp, RSL_IE_CAUSE)) {
- const u_int8_t *cause = TLVP_VAL(&tp, RSL_IE_CAUSE);
+ const uint8_t *cause = TLVP_VAL(&tp, RSL_IE_CAUSE);
print_rsl_cause(LOGL_ERROR, cause,
TLVP_LEN(&tp, RSL_IE_CAUSE));
if (*cause != RSL_ERR_RCH_ALR_ACTV_ALLOC)
@@ -982,8 +982,8 @@ static int rsl_rx_meas_res(struct msgb *msg)
struct abis_rsl_dchan_hdr *dh = msgb_l2(msg);
struct tlv_parsed tp;
struct gsm_meas_rep *mr = lchan_next_meas_rep(msg->lchan);
- u_int8_t len;
- const u_int8_t *val;
+ uint8_t len;
+ const uint8_t *val;
int rc;
/* check if this channel is actually active */
@@ -1034,7 +1034,7 @@ static int rsl_rx_meas_res(struct msgb *msg)
mr->ms_l1.ta = val[1];
}
if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) {
- msg->l3h = (u_int8_t *) TLVP_VAL(&tp, RSL_IE_L3_INFO);
+ msg->l3h = (uint8_t *) TLVP_VAL(&tp, RSL_IE_L3_INFO);
rc = gsm48_parse_meas_rep(mr, msg);
if (rc < 0)
return rc;
@@ -1247,11 +1247,11 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
enum gsm_chan_t lctype;
enum gsm_chreq_reason_t chreq_reason;
struct gsm_lchan *lchan;
- u_int8_t rqd_ta;
+ uint8_t rqd_ta;
int is_lu;
- u_int16_t arfcn;
- u_int8_t ts_number, subch;
+ uint16_t arfcn;
+ uint8_t ts_number, subch;
/* parse request reference to be used in immediate assign */
if (rqd_hdr->data[0] != RSL_IE_REQ_REFERENCE)
@@ -1329,7 +1329,7 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
static int rsl_send_imm_assignment(struct gsm_lchan *lchan)
{
struct gsm_bts *bts = lchan->ts->trx->bts;
- u_int8_t buf[GSM_MACBLOCK_LEN];
+ uint8_t buf[GSM_MACBLOCK_LEN];
struct gsm48_imm_ass *ia = (struct gsm48_imm_ass *) buf;
/* create IMMEDIATE ASSIGN 04.08 messge */
@@ -1358,17 +1358,17 @@ static int rsl_send_imm_assignment(struct gsm_lchan *lchan)
bsc_schedule_timer(&lchan->T3101, bts->network->T3101, 0);
/* send IMMEDIATE ASSIGN CMD on RSL to BTS (to send on CCCH to MS) */
- return rsl_imm_assign_cmd(bts, sizeof(*ia)+ia->mob_alloc_len, (u_int8_t *) ia);
+ return rsl_imm_assign_cmd(bts, sizeof(*ia)+ia->mob_alloc_len, (uint8_t *) ia);
}
/* MS has requested a channel on the RACH */
static int rsl_rx_ccch_load(struct msgb *msg)
{
struct abis_rsl_dchan_hdr *rslh = msgb_l2(msg);
- u_int16_t pg_buf_space;
- u_int16_t rach_slot_count = -1;
- u_int16_t rach_busy_count = -1;
- u_int16_t rach_access_count = -1;
+ uint16_t pg_buf_space;
+ uint16_t rach_slot_count = -1;
+ uint16_t rach_busy_count = -1;
+ uint16_t rach_access_count = -1;
switch (rslh->data[0]) {
case RSL_IE_PAGING_LOAD:
@@ -1428,7 +1428,7 @@ static int abis_rsl_rx_cchan(struct msgb *msg)
static int rsl_rx_rll_err_ind(struct msgb *msg)
{
struct abis_rsl_rll_hdr *rllh = msgb_l2(msg);
- u_int8_t *rlm_cause = rllh->data;
+ uint8_t *rlm_cause = rllh->data;
LOGP(DRLL, LOGL_ERROR, "%s ERROR INDICATION cause=%s\n",
gsm_lchan_name(msg->lchan),
@@ -1481,7 +1481,7 @@ static int abis_rsl_rx_rll(struct msgb *msg)
struct abis_rsl_rll_hdr *rllh = msgb_l2(msg);
int rc = 0;
char *ts_name;
- u_int8_t sapi = rllh->link_id & 7;
+ uint8_t sapi = rllh->link_id & 7;
msg->lchan = lchan_lookup(msg->trx, rllh->chan_nr);
ts_name = gsm_lchan_name(msg->lchan);
@@ -1546,7 +1546,7 @@ static int abis_rsl_rx_rll(struct msgb *msg)
return rc;
}
-static u_int8_t ipa_smod_s_for_lchan(struct gsm_lchan *lchan)
+static uint8_t ipa_smod_s_for_lchan(struct gsm_lchan *lchan)
{
switch (lchan->tch_mode) {
case GSM48_CMODE_SPEECH_V1:
@@ -1583,7 +1583,7 @@ static u_int8_t ipa_smod_s_for_lchan(struct gsm_lchan *lchan)
return 0;
}
-static u_int8_t ipa_rtp_pt_for_lchan(struct gsm_lchan *lchan)
+static uint8_t ipa_rtp_pt_for_lchan(struct gsm_lchan *lchan)
{
struct gsm_network *net = lchan->ts->trx->bts->network;
@@ -1631,23 +1631,23 @@ static u_int8_t ipa_rtp_pt_for_lchan(struct gsm_lchan *lchan)
static void ipac_parse_rtp(struct gsm_lchan *lchan, struct tlv_parsed *tv)
{
struct in_addr ip;
- u_int16_t port, conn_id;
+ uint16_t port, conn_id;
if (TLVP_PRESENT(tv, RSL_IE_IPAC_LOCAL_IP)) {
- ip.s_addr = *((u_int32_t *) TLVP_VAL(tv, RSL_IE_IPAC_LOCAL_IP));
+ ip.s_addr = *((uint32_t *) TLVP_VAL(tv, RSL_IE_IPAC_LOCAL_IP));
DEBUGPC(DRSL, "LOCAL_IP=%s ", inet_ntoa(ip));
lchan->abis_ip.bound_ip = ntohl(ip.s_addr);
}
if (TLVP_PRESENT(tv, RSL_IE_IPAC_LOCAL_PORT)) {
- port = *((u_int16_t *) TLVP_VAL(tv, RSL_IE_IPAC_LOCAL_PORT));
+ port = *((uint16_t *) TLVP_VAL(tv, RSL_IE_IPAC_LOCAL_PORT));
port = ntohs(port);
DEBUGPC(DRSL, "LOCAL_PORT=%u ", port);
lchan->abis_ip.bound_port = port;
}
if (TLVP_PRESENT(tv, RSL_IE_IPAC_CONN_ID)) {
- conn_id = *((u_int16_t *) TLVP_VAL(tv, RSL_IE_IPAC_CONN_ID));
+ conn_id = *((uint16_t *) TLVP_VAL(tv, RSL_IE_IPAC_CONN_ID));
conn_id = ntohs(conn_id);
DEBUGPC(DRSL, "CON_ID=%u ", conn_id);
lchan->abis_ip.conn_id = conn_id;
@@ -1668,13 +1668,13 @@ static void ipac_parse_rtp(struct gsm_lchan *lchan, struct tlv_parsed *tv)
}
if (TLVP_PRESENT(tv, RSL_IE_IPAC_REMOTE_IP)) {
- ip.s_addr = *((u_int32_t *) TLVP_VAL(tv, RSL_IE_IPAC_REMOTE_IP));
+ ip.s_addr = *((uint32_t *) TLVP_VAL(tv, RSL_IE_IPAC_REMOTE_IP));
DEBUGPC(DRSL, "REMOTE_IP=%s ", inet_ntoa(ip));
lchan->abis_ip.connect_ip = ntohl(ip.s_addr);
}
if (TLVP_PRESENT(tv, RSL_IE_IPAC_REMOTE_PORT)) {
- port = *((u_int16_t *) TLVP_VAL(tv, RSL_IE_IPAC_REMOTE_PORT));
+ port = *((uint16_t *) TLVP_VAL(tv, RSL_IE_IPAC_REMOTE_PORT));
port = ntohs(port);
DEBUGPC(DRSL, "REMOTE_PORT=%u ", port);
lchan->abis_ip.connect_port = port;
@@ -1706,12 +1706,12 @@ int rsl_ipacc_crcx(struct gsm_lchan *lchan)
return abis_rsl_sendmsg(msg);
}
-int rsl_ipacc_mdcx(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port,
- u_int8_t rtp_payload2)
+int rsl_ipacc_mdcx(struct gsm_lchan *lchan, uint32_t ip, uint16_t port,
+ uint8_t rtp_payload2)
{
struct msgb *msg = rsl_msgb_alloc();
struct abis_rsl_dchan_hdr *dh;
- u_int32_t *att_ip;
+ uint32_t *att_ip;
struct in_addr ia;
dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
@@ -1736,7 +1736,7 @@ int rsl_ipacc_mdcx(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port,
msgb_tv16_put(msg, RSL_IE_IPAC_CONN_ID, lchan->abis_ip.conn_id);
msgb_v_put(msg, RSL_IE_IPAC_REMOTE_IP);
- att_ip = (u_int32_t *) msgb_put(msg, sizeof(ip));
+ att_ip = (uint32_t *) msgb_put(msg, sizeof(ip));
*att_ip = ia.s_addr;
msgb_tv16_put(msg, RSL_IE_IPAC_REMOTE_PORT, port);
msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode);
@@ -1767,7 +1767,7 @@ int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act)
{
struct msgb *msg = rsl_msgb_alloc();
struct abis_rsl_dchan_hdr *dh;
- u_int8_t msg_type;
+ uint8_t msg_type;
if (act)
msg_type = RSL_MT_IPAC_PDCH_ACT;
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index bbd9b5841..4b48ec69b 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -47,9 +47,9 @@ static void handle_chan_ack(struct gsm_subscriber_connection *conn, struct bsc_a
static void handle_chan_nack(struct gsm_subscriber_connection *conn, struct bsc_api *bsc, struct gsm_lchan *lchan);
/* GSM 08.08 3.2.2.33 */
-static u_int8_t lchan_to_chosen_channel(struct gsm_lchan *lchan)
+static uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan)
{
- u_int8_t channel_mode = 0, channel = 0;
+ uint8_t channel_mode = 0, channel = 0;
switch (lchan->tch_mode) {
case GSM48_CMODE_SPEECH_V1:
@@ -95,7 +95,7 @@ static u_int8_t lchan_to_chosen_channel(struct gsm_lchan *lchan)
return channel_mode << 4 | channel;
}
-static u_int8_t chan_mode_to_speech(struct gsm_lchan *lchan)
+static uint8_t chan_mode_to_speech(struct gsm_lchan *lchan)
{
int mode = 0;
diff --git a/openbsc/src/libbsc/bsc_msc.c b/openbsc/src/libbsc/bsc_msc.c
index e9a51131b..aa084b83e 100644
--- a/openbsc/src/libbsc/bsc_msc.c
+++ b/openbsc/src/libbsc/bsc_msc.c
@@ -254,6 +254,6 @@ struct msgb *bsc_msc_id_get_resp(const char *token)
msg->l2h = msgb_v_put(msg, IPAC_MSGT_ID_RESP);
msgb_l16tv_put(msg, strlen(token) + 1,
- IPAC_IDTAG_UNITNAME, (u_int8_t *) token);
+ IPAC_IDTAG_UNITNAME, (uint8_t *) token);
return msg;
}
diff --git a/openbsc/src/libbsc/bsc_rll.c b/openbsc/src/libbsc/bsc_rll.c
index f3eef99da..b02394a59 100644
--- a/openbsc/src/libbsc/bsc_rll.c
+++ b/openbsc/src/libbsc/bsc_rll.c
@@ -37,9 +37,9 @@ struct bsc_rll_req {
struct timer_list timer;
struct gsm_lchan *lchan;
- u_int8_t link_id;
+ uint8_t link_id;
- void (*cb)(struct gsm_lchan *lchan, u_int8_t link_id,
+ void (*cb)(struct gsm_lchan *lchan, uint8_t link_id,
void *data, enum bsc_rllr_ind);
void *data;
};
@@ -64,13 +64,13 @@ static void timer_cb(void *_rllr)
}
/* establish a RLL connection with given SAPI / priority */
-int rll_establish(struct gsm_lchan *lchan, u_int8_t sapi,
- void (*cb)(struct gsm_lchan *, u_int8_t, void *,
+int rll_establish(struct gsm_lchan *lchan, uint8_t sapi,
+ void (*cb)(struct gsm_lchan *, uint8_t, void *,
enum bsc_rllr_ind),
void *data)
{
struct bsc_rll_req *rllr = talloc_zero(tall_bsc_ctx, struct bsc_rll_req);
- u_int8_t link_id;
+ uint8_t link_id;
if (!rllr)
return -ENOMEM;
@@ -100,7 +100,7 @@ int rll_establish(struct gsm_lchan *lchan, u_int8_t sapi,
/* Called from RSL code in case we have received an indication regarding
* any RLL link */
-void rll_indication(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t type)
+void rll_indication(struct gsm_lchan *lchan, uint8_t link_id, uint8_t type)
{
struct bsc_rll_req *rllr, *rllr2;
diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
index e4d9a0421..c579c7580 100644
--- a/openbsc/src/libbsc/bts_ipaccess_nanobts.c
+++ b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
@@ -182,8 +182,8 @@ static void patch_32(uint8_t *data, const uint32_t val)
*/
static void patch_nm_tables(struct gsm_bts *bts)
{
- u_int8_t arfcn_low = bts->c0->arfcn & 0xff;
- u_int8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f;
+ uint8_t arfcn_low = bts->c0->arfcn & 0xff;
+ uint8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f;
/* patch ARFCN into BTS Attributes */
nanobts_attr_bts[42] &= 0xf0;
@@ -196,8 +196,8 @@ static void patch_nm_tables(struct gsm_bts *bts)
}
if (bts->rach_ldavg_slots != -1) {
- u_int8_t avg_high = bts->rach_ldavg_slots & 0xff;
- u_int8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f;
+ uint8_t avg_high = bts->rach_ldavg_slots & 0xff;
+ uint8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f;
nanobts_attr_bts[35] = avg_high;
nanobts_attr_bts[36] = avg_low;
@@ -249,7 +249,7 @@ static void patch_nm_tables(struct gsm_bts *bts)
/* Callback function to be called whenever we get a GSM 12.21 state change event */
static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd)
{
- u_int8_t obj_class = nsd->obj_class;
+ uint8_t obj_class = nsd->obj_class;
void *obj = nsd->obj;
struct gsm_nm_state *new_state = nsd->new_state;
diff --git a/openbsc/src/libbsc/bts_siemens_bs11.c b/openbsc/src/libbsc/bts_siemens_bs11.c
index 0ab42e89a..0a4c24717 100644
--- a/openbsc/src/libbsc/bts_siemens_bs11.c
+++ b/openbsc/src/libbsc/bts_siemens_bs11.c
@@ -346,8 +346,8 @@ static unsigned char bs11_attr_radio[] =
*/
static void patch_nm_tables(struct gsm_bts *bts)
{
- u_int8_t arfcn_low = bts->c0->arfcn & 0xff;
- u_int8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f;
+ uint8_t arfcn_low = bts->c0->arfcn & 0xff;
+ uint8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f;
/* patch ARFCN into BTS Attributes */
bs11_attr_bts[69] &= 0xf0;
@@ -364,8 +364,8 @@ static void patch_nm_tables(struct gsm_bts *bts)
bs11_attr_bts[33] = bts->rach_b_thresh & 0xff;
if (bts->rach_ldavg_slots != -1) {
- u_int8_t avg_high = bts->rach_ldavg_slots & 0xff;
- u_int8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f;
+ uint8_t avg_high = bts->rach_ldavg_slots & 0xff;
+ uint8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f;
bs11_attr_bts[35] = avg_high;
bs11_attr_bts[36] = avg_low;
@@ -425,9 +425,9 @@ static void nm_reconfig_trx(struct gsm_bts_trx *trx)
abis_nm_set_radio_attr(trx, bs11_attr_radio,
sizeof(bs11_attr_radio));
else {
- u_int8_t trx1_attr_radio[sizeof(bs11_attr_radio)];
- u_int8_t arfcn_low = trx->arfcn & 0xff;
- u_int8_t arfcn_high = (trx->arfcn >> 8) & 0x0f;
+ uint8_t trx1_attr_radio[sizeof(bs11_attr_radio)];
+ uint8_t arfcn_low = trx->arfcn & 0xff;
+ uint8_t arfcn_high = (trx->arfcn >> 8) & 0x0f;
memcpy(trx1_attr_radio, bs11_attr_radio,
sizeof(trx1_attr_radio));
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index f12e21b7b..b794132a6 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -143,7 +143,7 @@ void ts_free(struct gsm_bts_trx_ts *ts)
ts->pchan = GSM_PCHAN_NONE;
}
-static const u_int8_t subslots_per_pchan[] = {
+static const uint8_t subslots_per_pchan[] = {
[GSM_PCHAN_NONE] = 0,
[GSM_PCHAN_CCCH] = 0,
[GSM_PCHAN_CCCH_SDCCH4] = 4,
@@ -370,7 +370,7 @@ static int _lchan_release_next_sapi(struct gsm_lchan *lchan)
int sapi;
for (sapi = 1; sapi < ARRAY_SIZE(lchan->sapis); ++sapi) {
- u_int8_t link_id;
+ uint8_t link_id;
if (lchan->sapis[sapi] == LCHAN_SAPI_UNUSED)
continue;
@@ -401,7 +401,7 @@ static void _lchan_handle_release(struct gsm_lchan *lchan)
}
/* called from abis rsl */
-int rsl_lchan_rll_release(struct gsm_lchan *lchan, u_int8_t link_id)
+int rsl_lchan_rll_release(struct gsm_lchan *lchan, uint8_t link_id)
{
if (lchan->state != LCHAN_S_REL_REQ)
return -1;
diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c
index 1aab2eed4..1cff1d9c2 100644
--- a/openbsc/src/libbsc/gsm_04_08_utils.c
+++ b/openbsc/src/libbsc/gsm_04_08_utils.c
@@ -52,8 +52,8 @@ static int gsm48_sendmsg(struct msgb *msg)
/* Section 9.1.8 / Table 9.9 */
struct chreq {
- u_int8_t val;
- u_int8_t mask;
+ uint8_t val;
+ uint8_t mask;
enum chreq_type type;
};
@@ -166,7 +166,7 @@ void gsm_net_update_ctype(struct gsm_network *network)
}
}
-enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *network, u_int8_t ra)
+enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *network, uint8_t ra)
{
int i;
int length;
@@ -190,7 +190,7 @@ enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *network, u_int8_t ra)
return GSM_LCHAN_SDCCH;
}
-enum gsm_chreq_reason_t get_reason_by_chreq(u_int8_t ra, int neci)
+enum gsm_chreq_reason_t get_reason_by_chreq(uint8_t ra, int neci)
{
int i;
int length;
@@ -218,7 +218,7 @@ int gsm48_send_rr_release(struct gsm_lchan *lchan)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
- u_int8_t *cause;
+ uint8_t *cause;
msg->lchan = lchan;
gh->proto_discr = GSM48_PDISC_RR;
@@ -239,7 +239,7 @@ int gsm48_send_rr_release(struct gsm_lchan *lchan)
}
int send_siemens_mrpci(struct gsm_lchan *lchan,
- u_int8_t *classmark2_lv)
+ uint8_t *classmark2_lv)
{
struct rsl_mrpci mrpci;
@@ -260,7 +260,7 @@ int gsm48_extract_mi(uint8_t *classmark2_lv, int length, char *mi_string, uint8_
if (length < 1 + *classmark2_lv)
return -1;
- u_int8_t *mi_lv = classmark2_lv + *classmark2_lv + 1;
+ uint8_t *mi_lv = classmark2_lv + *classmark2_lv + 1;
if (length < 2 + *classmark2_lv + mi_lv[0])
return -2;
@@ -269,11 +269,11 @@ int gsm48_extract_mi(uint8_t *classmark2_lv, int length, char *mi_string, uint8_
}
int gsm48_paging_extract_mi(struct gsm48_pag_resp *resp, int length,
- char *mi_string, u_int8_t *mi_type)
+ char *mi_string, uint8_t *mi_type)
{
static const uint32_t classmark_offset =
offsetof(struct gsm48_pag_resp, classmark2);
- u_int8_t *classmark2_lv = (uint8_t *) &resp->classmark2;
+ uint8_t *classmark2_lv = (uint8_t *) &resp->classmark2;
return gsm48_extract_mi(classmark2_lv, length - classmark_offset,
mi_string, mi_type);
}
@@ -283,7 +283,7 @@ int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn,
{
struct gsm_bts *bts = msg->lchan->ts->trx->bts;
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t *classmark2_lv = gh->data + 1;
+ uint8_t *classmark2_lv = gh->data + 1;
if (is_siemens_bts(bts))
send_siemens_mrpci(msg->lchan, classmark2_lv);
@@ -312,7 +312,7 @@ int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
- u_int8_t ciph_mod_set;
+ uint8_t ciph_mod_set;
msg->lchan = lchan;
@@ -343,7 +343,7 @@ static void gsm48_cell_desc(struct gsm48_cell_desc *cd,
void gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd,
const struct gsm_lchan *lchan)
{
- u_int16_t arfcn = lchan->ts->trx->arfcn & 0x3ff;
+ uint16_t arfcn = lchan->ts->trx->arfcn & 0x3ff;
cd->chan_nr = lchan2chan_nr(lchan);
if (!lchan->ts->hopping.enabled) {
@@ -364,7 +364,7 @@ void gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd,
/* Chapter 9.1.15: Handover Command */
int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
- u_int8_t power_command, u_int8_t ho_ref)
+ uint8_t power_command, uint8_t ho_ref)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
@@ -403,7 +403,7 @@ int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
}
/* Chapter 9.1.2: Assignment Command */
-int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, u_int8_t power_command)
+int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_command)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
@@ -443,7 +443,7 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan,
LOGP(DRR, LOGL_ERROR, "BUG: Using multirate codec "
"without multirate config.\n");
} else {
- u_int8_t *data = msgb_put(msg, 4);
+ uint8_t *data = msgb_put(msg, 4);
data[0] = GSM48_IE_MUL_RATE_CFG;
data[1] = 0x2;
memcpy(&data[2], &lchan->mr_conf, 2);
@@ -454,7 +454,7 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan,
}
/* 9.1.5 Channel mode modify: Modify the mode on the MS side */
-int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, u_int8_t mode)
+int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, uint8_t mode)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
@@ -479,7 +479,7 @@ int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, u_int8_t mode)
LOGP(DRR, LOGL_ERROR, "BUG: Using multirate codec "
"without multirate config.\n");
} else {
- u_int8_t *data = msgb_put(msg, 4);
+ uint8_t *data = msgb_put(msg, 4);
data[0] = GSM48_IE_MUL_RATE_CFG;
data[1] = 0x2;
memcpy(&data[2], &lchan->mr_conf, 2);
@@ -489,7 +489,7 @@ int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, u_int8_t mode)
return gsm48_sendmsg(msg);
}
-int gsm48_lchan_modify(struct gsm_lchan *lchan, u_int8_t lchan_mode)
+int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode)
{
int rc;
@@ -547,7 +547,7 @@ int gsm48_rx_rr_modif_ack(struct msgb *msg)
int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t *data = gh->data;
+ uint8_t *data = gh->data;
struct gsm_bts *bts = msg->lchan->ts->trx->bts;
struct bitvec *nbv = &bts->si_common.neigh_list;
struct gsm_meas_rep_cell *mrc;
diff --git a/openbsc/src/libbsc/handover_decision.c b/openbsc/src/libbsc/handover_decision.c
index 3b81dde56..31fd6107a 100644
--- a/openbsc/src/libbsc/handover_decision.c
+++ b/openbsc/src/libbsc/handover_decision.c
@@ -35,7 +35,7 @@
/* issue handover to a cell identified by ARFCN and BSIC */
static int handover_to_arfcn_bsic(struct gsm_lchan *lchan,
- u_int16_t arfcn, u_int8_t bsic)
+ uint16_t arfcn, uint8_t bsic)
{
struct gsm_bts *new_bts;
@@ -53,7 +53,7 @@ static int handover_to_arfcn_bsic(struct gsm_lchan *lchan,
/* did we get a RXLEV for a given cell in the given report? */
static int rxlev_for_cell_in_rep(struct gsm_meas_rep *mr,
- u_int16_t arfcn, u_int8_t bsic)
+ uint16_t arfcn, uint8_t bsic)
{
int i;
diff --git a/openbsc/src/libbsc/handover_logic.c b/openbsc/src/libbsc/handover_logic.c
index ad79f8a3e..976a7fd00 100644
--- a/openbsc/src/libbsc/handover_logic.c
+++ b/openbsc/src/libbsc/handover_logic.c
@@ -49,7 +49,7 @@ struct bsc_handover {
struct timer_list T3103;
- u_int8_t ho_ref;
+ uint8_t ho_ref;
};
static LLIST_HEAD(bsc_handovers);
@@ -85,7 +85,7 @@ int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts)
{
struct gsm_lchan *new_lchan;
struct bsc_handover *ho;
- static u_int8_t ho_ref;
+ static uint8_t ho_ref;
int rc;
/* don't attempt multiple handovers for the same lchan at
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index c5425441a..2de098bdb 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -81,7 +81,7 @@ static void paging_remove_request(struct gsm_bts_paging_state *paging_bts,
static void page_ms(struct gsm_paging_request *request)
{
- u_int8_t mi[128];
+ uint8_t mi[128];
unsigned int mi_len;
unsigned int page_group;
@@ -387,7 +387,7 @@ void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
} while (1);
}
-void paging_update_buffer_space(struct gsm_bts *bts, u_int16_t free_slots)
+void paging_update_buffer_space(struct gsm_bts *bts, uint16_t free_slots)
{
bsc_del_timer(&bts->paging.credit_timer);
bts->paging.available_slots = free_slots;
diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c
index c040d2684..0545426c0 100644
--- a/openbsc/src/libbsc/rest_octets.c
+++ b/openbsc/src/libbsc/rest_octets.c
@@ -30,7 +30,7 @@
#include <openbsc/rest_octets.h>
/* generate SI1 rest octets */
-int rest_octets_si1(u_int8_t *data, u_int8_t *nch_pos)
+int rest_octets_si1(uint8_t *data, uint8_t *nch_pos)
{
struct bitvec bv;
@@ -88,7 +88,7 @@ static void append_gprs_ind(struct bitvec *bv,
/* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
-int rest_octets_si3(u_int8_t *data, const struct gsm48_si_ro_info *si3)
+int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
{
struct bitvec bv;
@@ -136,7 +136,7 @@ static int append_lsa_params(struct bitvec *bv,
}
/* Generate SI4 Rest Octets (Chapter 10.5.2.35) */
-int rest_octets_si4(u_int8_t *data, const struct gsm48_si_ro_info *si4)
+int rest_octets_si4(uint8_t *data, const struct gsm48_si_ro_info *si4)
{
struct bitvec bv;
@@ -366,7 +366,7 @@ static void append_gprs_pwr_ctrl_pars(struct bitvec *bv,
}
/* Generate SI13 Rest Octests (04.08 Chapter 10.5.2.37b) */
-int rest_octets_si13(u_int8_t *data, const struct gsm48_si13_info *si13)
+int rest_octets_si13(uint8_t *data, const struct gsm48_si13_info *si13)
{
struct bitvec bv;
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index 1cbbcc93a..0cae71687 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -56,7 +56,7 @@ static_assert(sizeof(struct gsm48_system_information_type_13) == 3, _si13_size);
/* Frequency Lists as per TS 04.08 10.5.2.13 */
/* 10.5.2.13.2: Bit map 0 format */
-static int freq_list_bm0_set_arfcn(u_int8_t *chan_list, unsigned int arfcn)
+static int freq_list_bm0_set_arfcn(uint8_t *chan_list, unsigned int arfcn)
{
unsigned int byte, bit;
@@ -77,7 +77,7 @@ static int freq_list_bm0_set_arfcn(u_int8_t *chan_list, unsigned int arfcn)
}
/* 10.5.2.13.7: Variable bit map format */
-static int freq_list_bmrel_set_arfcn(u_int8_t *chan_list, unsigned int arfcn)
+static int freq_list_bmrel_set_arfcn(uint8_t *chan_list, unsigned int arfcn)
{
unsigned int byte, bit;
unsigned int min_arfcn;
@@ -110,7 +110,7 @@ static int freq_list_bmrel_set_arfcn(u_int8_t *chan_list, unsigned int arfcn)
}
/* generate a cell channel list as per Section 10.5.2.1b of 04.08 */
-static int bitvec2freq_list(u_int8_t *chan_list, struct bitvec *bv,
+static int bitvec2freq_list(uint8_t *chan_list, struct bitvec *bv,
const struct gsm_bts *bts)
{
int i, rc, min = 1024, max = -1;
@@ -171,7 +171,7 @@ static int bitvec2freq_list(u_int8_t *chan_list, struct bitvec *bv,
}
/* generate a cell channel list as per Section 10.5.2.1b of 04.08 */
-static int generate_cell_chan_list(u_int8_t *chan_list, struct gsm_bts *bts)
+static int generate_cell_chan_list(uint8_t *chan_list, struct gsm_bts *bts)
{
struct gsm_bts_trx *trx;
struct bitvec *bv = &bts->si_common.cell_alloc;
@@ -199,7 +199,7 @@ static int generate_cell_chan_list(u_int8_t *chan_list, struct gsm_bts *bts)
}
/* generate a cell channel list as per Section 10.5.2.1b of 04.08 */
-static int generate_bcch_chan_list(u_int8_t *chan_list, struct gsm_bts *bts, int si5)
+static int generate_bcch_chan_list(uint8_t *chan_list, struct gsm_bts *bts, int si5)
{
struct gsm_bts *cur_bts;
struct bitvec *bv;
@@ -226,7 +226,7 @@ static int generate_bcch_chan_list(u_int8_t *chan_list, struct gsm_bts *bts, int
return bitvec2freq_list(chan_list, bv, bts);
}
-static int generate_si1(u_int8_t *output, struct gsm_bts *bts)
+static int generate_si1(uint8_t *output, struct gsm_bts *bts)
{
int rc;
struct gsm48_system_information_type_1 *si1 =
@@ -251,7 +251,7 @@ static int generate_si1(u_int8_t *output, struct gsm_bts *bts)
return sizeof(*si1) + rc;
}
-static int generate_si2(u_int8_t *output, struct gsm_bts *bts)
+static int generate_si2(uint8_t *output, struct gsm_bts *bts)
{
int rc;
struct gsm48_system_information_type_2 *si2 =
@@ -298,7 +298,7 @@ static struct gsm48_si_ro_info si_info = {
.break_ind = 0,
};
-static int generate_si3(u_int8_t *output, struct gsm_bts *bts)
+static int generate_si3(uint8_t *output, struct gsm_bts *bts)
{
int rc;
struct gsm48_system_information_type_3 *si3 =
@@ -329,7 +329,7 @@ static int generate_si3(u_int8_t *output, struct gsm_bts *bts)
return sizeof(*si3) + rc;
}
-static int generate_si4(u_int8_t *output, struct gsm_bts *bts)
+static int generate_si4(uint8_t *output, struct gsm_bts *bts)
{
int rc;
struct gsm48_system_information_type_4 *si4 =
@@ -362,7 +362,7 @@ static int generate_si4(u_int8_t *output, struct gsm_bts *bts)
return sizeof(*si4) + rc;
}
-static int generate_si5(u_int8_t *output, struct gsm_bts *bts)
+static int generate_si5(uint8_t *output, struct gsm_bts *bts)
{
struct gsm48_system_information_type_5 *si5;
int rc, l2_plen = 18;
@@ -394,7 +394,7 @@ static int generate_si5(u_int8_t *output, struct gsm_bts *bts)
return l2_plen;
}
-static int generate_si6(u_int8_t *output, struct gsm_bts *bts)
+static int generate_si6(uint8_t *output, struct gsm_bts *bts)
{
struct gsm48_system_information_type_6 *si6;
int l2_plen = 11;
@@ -468,7 +468,7 @@ static struct gsm48_si13_info si13_default = {
},
};
-static int generate_si13(u_int8_t *output, struct gsm_bts *bts)
+static int generate_si13(uint8_t *output, struct gsm_bts *bts)
{
struct gsm48_system_information_type_13 *si13 =
(struct gsm48_system_information_type_13 *) output;
diff --git a/openbsc/src/libbsc/transaction.c b/openbsc/src/libbsc/transaction.c
index 180f9f96b..0c72c03ee 100644
--- a/openbsc/src/libbsc/transaction.c
+++ b/openbsc/src/libbsc/transaction.c
@@ -34,7 +34,7 @@ void *tall_trans_ctx;
void _gsm48_cc_trans_free(struct gsm_trans *trans);
struct gsm_trans *trans_find_by_id(struct gsm_subscriber *subscr,
- u_int8_t proto, u_int8_t trans_id)
+ uint8_t proto, uint8_t trans_id)
{
struct gsm_trans *trans;
struct gsm_network *net = subscr->net;
@@ -49,7 +49,7 @@ struct gsm_trans *trans_find_by_id(struct gsm_subscriber *subscr,
}
struct gsm_trans *trans_find_by_callref(struct gsm_network *net,
- u_int32_t callref)
+ uint32_t callref)
{
struct gsm_trans *trans;
@@ -61,8 +61,8 @@ struct gsm_trans *trans_find_by_callref(struct gsm_network *net,
}
struct gsm_trans *trans_alloc(struct gsm_subscriber *subscr,
- u_int8_t protocol, u_int8_t trans_id,
- u_int32_t callref)
+ uint8_t protocol, uint8_t trans_id,
+ uint32_t callref)
{
struct gsm_trans *trans;
@@ -118,7 +118,7 @@ void trans_free(struct gsm_trans *trans)
/* allocate an unused transaction ID for the given subscriber
* in the given protocol using the ti_flag specified */
int trans_assign_trans_id(struct gsm_subscriber *subscr,
- u_int8_t protocol, u_int8_t ti_flag)
+ uint8_t protocol, uint8_t ti_flag)
{
struct gsm_network *net = subscr->net;
struct gsm_trans *trans;
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index cab1e4a58..081605f65 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -39,8 +39,8 @@ void *tall_bsc_ctx;
static LLIST_HEAD(bts_models);
-void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
- u_int8_t e1_ts, u_int8_t e1_ts_ss)
+void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr,
+ uint8_t e1_ts, uint8_t e1_ts_ss)
{
ts->e1_link.e1_nr = e1_nr;
ts->e1_link.e1_ts = e1_ts;
@@ -184,7 +184,7 @@ static const uint8_t bts_cell_timer_default[] =
{ 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 3 };
struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, enum gsm_bts_type type,
- u_int8_t tsc, u_int8_t bsic)
+ uint8_t tsc, uint8_t bsic)
{
struct gsm_bts *bts = talloc_zero(net, struct gsm_bts);
struct gsm_bts_model *model = bts_model_find(type);
@@ -252,7 +252,7 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, enum gsm_bts_type type,
return bts;
}
-struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_code,
+struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_code,
int (*mncc_recv)(struct gsm_network *, struct msgb *))
{
struct gsm_network *net;
@@ -350,7 +350,7 @@ struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num)
/* Get reference to a neighbor cell on a given BCCH ARFCN */
struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts,
- u_int16_t arfcn, u_int8_t bsic)
+ uint16_t arfcn, uint8_t bsic)
{
struct gsm_bts *neigh;
/* FIXME: use some better heuristics here to determine which cell
@@ -493,7 +493,7 @@ void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts)
raid->rac = bts->gprs.rac;
}
-int gsm48_ra_id_by_bts(u_int8_t *buf, struct gsm_bts *bts)
+int gsm48_ra_id_by_bts(uint8_t *buf, struct gsm_bts *bts)
{
struct gprs_ra_id raid;
diff --git a/openbsc/src/libcommon/socket.c b/openbsc/src/libcommon/socket.c
index 5ca7ec90f..bbe50d5c4 100644
--- a/openbsc/src/libcommon/socket.c
+++ b/openbsc/src/libcommon/socket.c
@@ -41,7 +41,7 @@
#include <osmocom/core/talloc.h>
int make_sock(struct bsc_fd *bfd, int proto,
- u_int32_t ip, u_int16_t port, int priv_nr,
+ uint32_t ip, uint16_t port, int priv_nr,
int (*cb)(struct bsc_fd *fd, unsigned int what), void *data)
{
struct sockaddr_in addr;
diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c
index 3de683044..f08fb790c 100644
--- a/openbsc/src/libmsc/db.c
+++ b/openbsc/src/libmsc/db.c
@@ -737,7 +737,7 @@ int db_sync_equipment(struct gsm_equipment *equip)
dbi_result result;
unsigned char *cm2, *cm3;
char *q_imei;
- u_int8_t classmark1;
+ uint8_t classmark1;
memcpy(&classmark1, &equip->classmark1, sizeof(classmark1));
DEBUGP(DDB, "Sync Equipment IMEI=%s, classmark1=%02x",
@@ -821,7 +821,7 @@ int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber)
int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber)
{
dbi_result result = NULL;
- u_int32_t try;
+ uint32_t try;
for (;;) {
try = (rand()%(GSM_MAX_EXTEN-GSM_MIN_EXTEN+1)+GSM_MIN_EXTEN);
@@ -855,10 +855,10 @@ int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber)
* an error.
*/
-int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, u_int32_t *token)
+int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, uint32_t *token)
{
dbi_result result;
- u_int32_t try;
+ uint32_t try;
for (;;) {
try = rand();
@@ -1060,7 +1060,7 @@ static struct gsm_sms *sms_from_result(struct gsm_network *net, dbi_result resul
sms->user_data_len = dbi_result_get_field_length(result, "user_data");
user_data = dbi_result_get_binary(result, "user_data");
if (sms->user_data_len > sizeof(sms->user_data))
- sms->user_data_len = (u_int8_t) sizeof(sms->user_data);
+ sms->user_data_len = (uint8_t) sizeof(sms->user_data);
memcpy(sms->user_data, user_data, sms->user_data_len);
text = dbi_result_get_string(result, "text");
@@ -1219,8 +1219,8 @@ int db_sms_inc_deliver_attempts(struct gsm_sms *sms)
}
int db_apdu_blob_store(struct gsm_subscriber *subscr,
- u_int8_t apdu_id_flags, u_int8_t len,
- u_int8_t *apdu)
+ uint8_t apdu_id_flags, uint8_t len,
+ uint8_t *apdu)
{
dbi_result result;
unsigned char *q_apdu;
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 138e26cfa..7d6580a19 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -61,19 +61,19 @@
void *tall_locop_ctx;
void *tall_authciphop_ctx;
-int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn, u_int32_t tmsi);
+int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn, uint32_t tmsi);
static int gsm48_tx_simple(struct gsm_subscriber_connection *conn,
- u_int8_t pdisc, u_int8_t msg_type);
+ uint8_t pdisc, uint8_t msg_type);
static void schedule_reject(struct gsm_subscriber_connection *conn);
static void release_anchor(struct gsm_subscriber_connection *conn);
struct gsm_lai {
- u_int16_t mcc;
- u_int16_t mnc;
- u_int16_t lac;
+ uint16_t mcc;
+ uint16_t mnc;
+ uint16_t lac;
};
-static u_int32_t new_callref = 0x80000001;
+static uint32_t new_callref = 0x80000001;
void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg)
{
@@ -356,7 +356,7 @@ void gsm0408_clear_all_trans(struct gsm_network *net, int protocol)
}
/* Chapter 9.2.14 : Send LOCATION UPDATING REJECT */
-int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, u_int8_t cause)
+int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, uint8_t cause)
{
struct gsm_bts *bts = conn->bts;
struct msgb *msg;
@@ -380,13 +380,13 @@ int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, u_int8_t cause)
}
/* Chapter 9.2.13 : Send LOCATION UPDATE ACCEPT */
-int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn, u_int32_t tmsi)
+int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn, uint32_t tmsi)
{
struct gsm_bts *bts = conn->bts;
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
struct gsm48_loc_area_id *lai;
- u_int8_t *mid;
+ uint8_t *mid;
msg->lchan = conn->lchan;
@@ -409,7 +409,7 @@ int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn, u_int32_t tmsi)
}
/* Transmit Chapter 9.2.10 Identity Request */
-static int mm_tx_identity_req(struct gsm_subscriber_connection *conn, u_int8_t id_type)
+static int mm_tx_identity_req(struct gsm_subscriber_connection *conn, uint8_t id_type)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
@@ -432,7 +432,7 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms
struct gsm_lchan *lchan = msg->lchan;
struct gsm_bts *bts = lchan->ts->trx->bts;
struct gsm_network *net = bts->network;
- u_int8_t mi_type = gh->data[1] & GSM_MI_TYPE_MASK;
+ uint8_t mi_type = gh->data[1] & GSM_MI_TYPE_MASK;
char mi_string[GSM48_MI_SIZE];
gsm48_mi_to_string(mi_string, sizeof(mi_string), &gh->data[1], gh->data[0]);
@@ -486,7 +486,7 @@ static void schedule_reject(struct gsm_subscriber_connection *conn)
bsc_schedule_timer(&conn->loc_operation->updating_timer, 5, 0);
}
-static const char *lupd_name(u_int8_t type)
+static const char *lupd_name(uint8_t type)
{
switch (type) {
case GSM48_LUPD_NORMAL:
@@ -507,7 +507,7 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb
struct gsm48_loc_upd_req *lu;
struct gsm_subscriber *subscr = NULL;
struct gsm_bts *bts = conn->bts;
- u_int8_t mi_type;
+ uint8_t mi_type;
char mi_string[GSM48_MI_SIZE];
int rc;
@@ -604,7 +604,7 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb
}
#if 0
-static u_int8_t to_bcd8(u_int8_t val)
+static uint8_t to_bcd8(uint8_t val)
{
return ((val / 10) << 4) | (val % 10);
}
@@ -616,7 +616,7 @@ int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn)
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
struct gsm_network *net = conn->bts->network;
- u_int8_t *ptr8;
+ uint8_t *ptr8;
int name_len, name_pad;
#if 0
time_t cur_t;
@@ -639,7 +639,7 @@ int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn)
ptr8[1] = name_len*2 +1;
ptr8[2] = 0x90; /* UCS2, no spare bits, no CI */
- ptr16 = (u_int16_t *) msgb_put(msg, name_len*2);
+ ptr16 = (uint16_t *) msgb_put(msg, name_len*2);
for (i = 0; i < name_len; i++)
ptr16[i] = htons(net->name_long[i]);
@@ -665,12 +665,12 @@ int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn)
#if 0
name_len = strlen(net->name_short);
/* 10.5.3.5a */
- ptr8 = (u_int8_t *) msgb_put(msg, 3);
+ ptr8 = (uint8_t *) msgb_put(msg, 3);
ptr8[0] = GSM48_IE_NAME_SHORT;
ptr8[1] = name_len*2 + 1;
ptr8[2] = 0x90; /* UCS2, no spare bits, no CI */
- ptr16 = (u_int16_t *) msgb_put(msg, name_len*2);
+ ptr16 = (uint16_t *) msgb_put(msg, name_len*2);
for (i = 0; i < name_len; i++)
ptr16[i] = htons(net->name_short[i]);
#endif
@@ -679,7 +679,7 @@ int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn)
if (name_pad > 0)
name_len++;
/* 10.5.3.5a */
- ptr8 = (u_int8_t *) msgb_put(msg, 3);
+ ptr8 = (uint8_t *) msgb_put(msg, 3);
ptr8[0] = GSM48_IE_NAME_SHORT;
ptr8[1] = name_len +1;
ptr8[2] = 0x80 | name_pad; /* Cell Broadcast DCS, no CI */
@@ -714,7 +714,7 @@ int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn)
}
/* Section 9.2.2 */
-int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, u_int8_t *rand, int key_seq)
+int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand, int key_seq)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
@@ -804,7 +804,7 @@ static int _gsm48_rx_mm_serv_req_sec_cb(
*/
static int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
- u_int8_t mi_type;
+ uint8_t mi_type;
char mi_string[GSM48_MI_SIZE];
struct gsm_bts *bts = conn->bts;
@@ -813,10 +813,10 @@ static int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct m
struct gsm48_service_request *req =
(struct gsm48_service_request *)gh->data;
/* unfortunately in Phase1 the classmark2 length is variable */
- u_int8_t classmark2_len = gh->data[1];
- u_int8_t *classmark2 = gh->data+2;
- u_int8_t mi_len = *(classmark2 + classmark2_len);
- u_int8_t *mi = (classmark2 + classmark2_len + 1);
+ uint8_t classmark2_len = gh->data[1];
+ uint8_t *classmark2 = gh->data+2;
+ uint8_t mi_len = *(classmark2 + classmark2_len);
+ uint8_t *mi = (classmark2 + classmark2_len + 1);
DEBUGP(DMM, "<- CM SERVICE REQUEST ");
if (msg->data_len < sizeof(struct gsm48_service_request*)) {
@@ -878,7 +878,7 @@ static int gsm48_rx_mm_imsi_detach_ind(struct msgb *msg)
struct gsm48_hdr *gh = msgb_l3(msg);
struct gsm48_imsi_detach_ind *idi =
(struct gsm48_imsi_detach_ind *) gh->data;
- u_int8_t mi_type = idi->mi[0] & GSM_MI_TYPE_MASK;
+ uint8_t mi_type = idi->mi[0] & GSM_MI_TYPE_MASK;
char mi_string[GSM48_MI_SIZE];
struct gsm_subscriber *subscr = NULL;
@@ -1025,8 +1025,8 @@ static int gsm48_rx_rr_pag_resp(struct gsm_subscriber_connection *conn, struct m
struct gsm_bts *bts = conn->bts;
struct gsm48_hdr *gh = msgb_l3(msg);
struct gsm48_pag_resp *resp;
- u_int8_t *classmark2_lv = gh->data + 1;
- u_int8_t mi_type;
+ uint8_t *classmark2_lv = gh->data + 1;
+ uint8_t mi_type;
char mi_string[GSM48_MI_SIZE];
struct gsm_subscriber *subscr = NULL;
int rc = 0;
@@ -1068,8 +1068,8 @@ static int gsm48_rx_rr_classmark(struct gsm_subscriber_connection *conn, struct
struct gsm48_hdr *gh = msgb_l3(msg);
struct gsm_subscriber *subscr = conn->subscr;
unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
- u_int8_t cm2_len, cm3_len = 0;
- u_int8_t *cm2, *cm3 = NULL;
+ uint8_t cm2_len, cm3_len = 0;
+ uint8_t *cm2, *cm3 = NULL;
DEBUGP(DRR, "CLASSMARK CHANGE ");
@@ -1136,9 +1136,9 @@ static int gsm48_rx_rr_meas_rep(struct msgb *msg)
static int gsm48_rx_rr_app_info(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t apdu_id_flags;
- u_int8_t apdu_len;
- u_int8_t *apdu_data;
+ uint8_t apdu_id_flags;
+ uint8_t apdu_len;
+ uint8_t *apdu_data;
apdu_id_flags = gh->data[0];
apdu_len = gh->data[1];
@@ -1256,8 +1256,8 @@ static int gsm0408_rcv_rr(struct gsm_subscriber_connection *conn, struct msgb *m
return rc;
}
-int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, u_int8_t apdu_id,
- u_int8_t apdu_len, const u_int8_t *apdu)
+int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, uint8_t apdu_id,
+ uint8_t apdu_len, const uint8_t *apdu)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
@@ -1300,7 +1300,7 @@ static int gsm48_cc_tx_status(struct gsm_trans *trans, void *arg)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
- u_int8_t *cause, *call_state;
+ uint8_t *cause, *call_state;
gh->msg_type = GSM48_MT_CC_STATUS;
@@ -1316,7 +1316,7 @@ static int gsm48_cc_tx_status(struct gsm_trans *trans, void *arg)
}
static int gsm48_tx_simple(struct gsm_subscriber_connection *conn,
- u_int8_t pdisc, u_int8_t msg_type)
+ uint8_t pdisc, uint8_t msg_type)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
@@ -1377,7 +1377,7 @@ static int mncc_recvmsg(struct gsm_network *net, struct gsm_trans *trans,
}
int mncc_release_ind(struct gsm_network *net, struct gsm_trans *trans,
- u_int32_t callref, int location, int value)
+ uint32_t callref, int location, int value)
{
struct gsm_mncc rel;
@@ -1475,7 +1475,7 @@ static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event,
return 0;
}
-static int tch_recv_mncc(struct gsm_network *net, u_int32_t callref, int enable);
+static int tch_recv_mncc(struct gsm_network *net, uint32_t callref, int enable);
/* handle audio path for handover */
static int handle_ho_signal(unsigned int subsys, unsigned int signal,
@@ -1645,7 +1645,7 @@ static int tch_map(struct gsm_lchan *lchan, struct gsm_lchan *remote_lchan)
}
/* bridge channels of two transactions */
-static int tch_bridge(struct gsm_network *net, u_int32_t *refs)
+static int tch_bridge(struct gsm_network *net, uint32_t *refs)
{
struct gsm_trans *trans1 = trans_find_by_callref(net, refs[0]);
struct gsm_trans *trans2 = trans_find_by_callref(net, refs[1]);
@@ -1661,7 +1661,7 @@ static int tch_bridge(struct gsm_network *net, u_int32_t *refs)
}
/* enable receive of channels to MNCC upqueue */
-static int tch_recv_mncc(struct gsm_network *net, u_int32_t callref, int enable)
+static int tch_recv_mncc(struct gsm_network *net, uint32_t callref, int enable)
{
struct gsm_trans *trans;
struct gsm_lchan *lchan;
@@ -1823,7 +1823,7 @@ static void gsm48_start_cc_timer(struct gsm_trans *trans, int current,
static int gsm48_cc_rx_setup(struct gsm_trans *trans, struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t msg_type = gh->msg_type & 0xbf;
+ uint8_t msg_type = gh->msg_type & 0xbf;
unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
struct tlv_parsed tp;
struct gsm_mncc setup;
@@ -2882,7 +2882,7 @@ static int _gsm48_lchan_modify(struct gsm_trans *trans, void *arg)
}
static struct downstate {
- u_int32_t states;
+ uint32_t states;
int type;
int (*rout) (struct gsm_trans *trans, void *arg);
} downstatelist[] = {
@@ -3154,7 +3154,7 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg)
static struct datastate {
- u_int32_t states;
+ uint32_t states;
int type;
int (*rout) (struct gsm_trans *trans, struct msgb *msg);
} datastatelist[] = {
@@ -3210,8 +3210,8 @@ static struct datastate {
static int gsm0408_rcv_cc(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t msg_type = gh->msg_type & 0xbf;
- u_int8_t transaction_id = ((gh->proto_discr & 0xf0) ^ 0x80) >> 4; /* flip */
+ uint8_t msg_type = gh->msg_type & 0xbf;
+ uint8_t transaction_id = ((gh->proto_discr & 0xf0) ^ 0x80) >> 4; /* flip */
struct gsm_trans *trans = NULL;
int i, rc = 0;
@@ -3298,7 +3298,7 @@ int gsm0408_new_conn(struct gsm_subscriber_connection *conn)
int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t pdisc = gh->proto_discr & 0x0f;
+ uint8_t pdisc = gh->proto_discr & 0x0f;
int rc = 0;
if (silent_call_reroute(conn, msg))
diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index 0f8d7c24c..c7ac8f4a4 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -55,7 +55,7 @@
#define GSM411_ALLOC_HEADROOM 128
void *tall_gsms_ctx;
-static u_int32_t new_callref = 0x40000001;
+static uint32_t new_callref = 0x40000001;
static const struct value_string cp_cause_strs[] = {
{ GSM411_CP_CAUSE_NET_FAIL, "Network Failure" },
@@ -173,7 +173,7 @@ struct msgb *gsm411_msgb_alloc(void)
"GSM 04.11");
}
-static int gsm411_sendmsg(struct gsm_subscriber_connection *conn, struct msgb *msg, u_int8_t link_id)
+static int gsm411_sendmsg(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t link_id)
{
DEBUGP(DSMS, "GSM4.11 TX %s\n", hexdump(msg->data, msg->len));
msg->l3h = msg->data;
@@ -192,7 +192,7 @@ static void cp_timer_expired(void *data)
/* Prefix msg with a 04.08/04.11 CP header */
static int gsm411_cp_sendmsg(struct msgb *msg, struct gsm_trans *trans,
- u_int8_t msg_type)
+ uint8_t msg_type)
{
struct gsm48_hdr *gh;
@@ -228,10 +228,10 @@ static int gsm411_cp_sendmsg(struct msgb *msg, struct gsm_trans *trans,
/* Prefix msg with a RP-DATA header and send as CP-DATA */
static int gsm411_rp_sendmsg(struct msgb *msg, struct gsm_trans *trans,
- u_int8_t rp_msg_type, u_int8_t rp_msg_ref)
+ uint8_t rp_msg_type, uint8_t rp_msg_ref)
{
struct gsm411_rp_hdr *rp;
- u_int8_t len = msg->len;
+ uint8_t len = msg->len;
/* GSM 04.11 RP-DATA header */
rp = (struct gsm411_rp_hdr *)msgb_push(msg, sizeof(*rp));
@@ -243,9 +243,9 @@ static int gsm411_rp_sendmsg(struct msgb *msg, struct gsm_trans *trans,
}
/* Turn int into semi-octet representation: 98 => 0x89 */
-static u_int8_t bcdify(u_int8_t value)
+static uint8_t bcdify(uint8_t value)
{
- u_int8_t ret;
+ uint8_t ret;
ret = value / 10;
ret |= (value % 10) << 4;
@@ -254,9 +254,9 @@ static u_int8_t bcdify(u_int8_t value)
}
/* Turn semi-octet representation into int: 0x89 => 98 */
-static u_int8_t unbcdify(u_int8_t value)
+static uint8_t unbcdify(uint8_t value)
{
- u_int8_t ret;
+ uint8_t ret;
if ((value & 0x0F) > 9 || (value >> 4) > 9)
LOGP(DSMS, LOGL_ERROR,
@@ -269,7 +269,7 @@ static u_int8_t unbcdify(u_int8_t value)
}
/* Generate 03.40 TP-SCTS */
-static void gsm340_gen_scts(u_int8_t *scts, time_t time)
+static void gsm340_gen_scts(uint8_t *scts, time_t time)
{
struct tm *tm = localtime(&time);
@@ -283,11 +283,11 @@ static void gsm340_gen_scts(u_int8_t *scts, time_t time)
}
/* Decode 03.40 TP-SCTS (into utc/gmt timestamp) */
-static time_t gsm340_scts(u_int8_t *scts)
+static time_t gsm340_scts(uint8_t *scts)
{
struct tm tm;
- u_int8_t yr = unbcdify(*scts++);
+ uint8_t yr = unbcdify(*scts++);
if (yr <= 80)
tm.tm_year = 100 + yr;
@@ -315,10 +315,10 @@ static unsigned long gsm340_vp_default(void)
}
/* Decode validity period format 'relative' */
-static unsigned long gsm340_vp_relative(u_int8_t *sms_vp)
+static unsigned long gsm340_vp_relative(uint8_t *sms_vp)
{
/* Chapter 9.2.3.12.1 */
- u_int8_t vp;
+ uint8_t vp;
unsigned long minutes;
vp = *(sms_vp);
@@ -334,7 +334,7 @@ static unsigned long gsm340_vp_relative(u_int8_t *sms_vp)
}
/* Decode validity period format 'absolute' */
-static unsigned long gsm340_vp_absolute(u_int8_t *sms_vp)
+static unsigned long gsm340_vp_absolute(uint8_t *sms_vp)
{
/* Chapter 9.2.3.12.2 */
time_t expires, now;
@@ -350,9 +350,9 @@ static unsigned long gsm340_vp_absolute(u_int8_t *sms_vp)
}
/* Decode validity period format 'relative in integer representation' */
-static unsigned long gsm340_vp_relative_integer(u_int8_t *sms_vp)
+static unsigned long gsm340_vp_relative_integer(uint8_t *sms_vp)
{
- u_int8_t vp;
+ uint8_t vp;
unsigned long minutes;
vp = *(sms_vp);
if (vp == 0) {
@@ -365,7 +365,7 @@ static unsigned long gsm340_vp_relative_integer(u_int8_t *sms_vp)
}
/* Decode validity period format 'relative in semi-octet representation' */
-static unsigned long gsm340_vp_relative_semioctet(u_int8_t *sms_vp)
+static unsigned long gsm340_vp_relative_semioctet(uint8_t *sms_vp)
{
unsigned long minutes;
minutes = unbcdify(*sms_vp++)*60; /* hours */
@@ -375,9 +375,9 @@ static unsigned long gsm340_vp_relative_semioctet(u_int8_t *sms_vp)
}
/* decode validity period. return minutes */
-static unsigned long gsm340_validity_period(u_int8_t sms_vpf, u_int8_t *sms_vp)
+static unsigned long gsm340_validity_period(uint8_t sms_vpf, uint8_t *sms_vp)
{
- u_int8_t fi; /* functionality indicator */
+ uint8_t fi; /* functionality indicator */
switch (sms_vpf) {
case GSM340_TP_VPF_RELATIVE:
@@ -413,9 +413,9 @@ static unsigned long gsm340_validity_period(u_int8_t sms_vpf, u_int8_t *sms_vp)
}
/* determine coding alphabet dependent on GSM 03.38 Section 4 DCS */
-enum sms_alphabet gsm338_get_sms_alphabet(u_int8_t dcs)
+enum sms_alphabet gsm338_get_sms_alphabet(uint8_t dcs)
{
- u_int8_t cgbits = dcs >> 4;
+ uint8_t cgbits = dcs >> 4;
enum sms_alphabet alpha = DCS_NONE;
if ((cgbits & 0xc) == 0) {
@@ -463,7 +463,7 @@ static int gsm340_rx_sms_submit(struct msgb *msg, struct gsm_sms *gsms)
}
/* generate a TPDU address field compliant with 03.40 sec. 9.1.2.5 */
-static int gsm340_gen_oa(u_int8_t *oa, unsigned int oa_len,
+static int gsm340_gen_oa(uint8_t *oa, unsigned int oa_len,
struct gsm_subscriber *subscr)
{
int len_in_bytes;
@@ -482,10 +482,10 @@ static int gsm340_gen_oa(u_int8_t *oa, unsigned int oa_len,
* returns total size of TPDU */
static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms)
{
- u_int8_t *smsp;
- u_int8_t oa[12]; /* max len per 03.40 */
- u_int8_t oa_len = 0;
- u_int8_t octet_len;
+ uint8_t *smsp;
+ uint8_t oa[12]; /* max len per 03.40 */
+ uint8_t oa_len = 0;
+ uint8_t octet_len;
unsigned int old_msg_len = msg->len;
/* generate first octet with masked bits */
@@ -552,12 +552,12 @@ static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms)
* return value > 0: RP CAUSE for ERROR; < 0: silent error; 0 = success */
static int gsm340_rx_tpdu(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
- u_int8_t *smsp = msgb_sms(msg);
+ uint8_t *smsp = msgb_sms(msg);
struct gsm_sms *gsms;
- u_int8_t sms_mti, sms_mms, sms_vpf, sms_alphabet, sms_rp;
- u_int8_t *sms_vp;
- u_int8_t da_len_bytes;
- u_int8_t address_lv[12]; /* according to 03.40 / 9.1.2.5 */
+ uint8_t sms_mti, sms_mms, sms_vpf, sms_alphabet, sms_rp;
+ uint8_t *sms_vp;
+ uint8_t da_len_bytes;
+ uint8_t address_lv[12]; /* according to 03.40 / 9.1.2.5 */
int rc = 0;
counter_inc(conn->bts->network->stats.sms.submitted);
@@ -685,7 +685,7 @@ out:
return rc;
}
-static int gsm411_send_rp_ack(struct gsm_trans *trans, u_int8_t msg_ref)
+static int gsm411_send_rp_ack(struct gsm_trans *trans, uint8_t msg_ref)
{
struct msgb *msg = gsm411_msgb_alloc();
@@ -695,7 +695,7 @@ static int gsm411_send_rp_ack(struct gsm_trans *trans, u_int8_t msg_ref)
}
static int gsm411_send_rp_error(struct gsm_trans *trans,
- u_int8_t msg_ref, u_int8_t cause)
+ uint8_t msg_ref, uint8_t cause)
{
struct msgb *msg = gsm411_msgb_alloc();
@@ -710,9 +710,9 @@ static int gsm411_send_rp_error(struct gsm_trans *trans,
/* Receive a 04.11 TPDU inside RP-DATA / user data */
static int gsm411_rx_rp_ud(struct msgb *msg, struct gsm_trans *trans,
struct gsm411_rp_hdr *rph,
- u_int8_t src_len, u_int8_t *src,
- u_int8_t dst_len, u_int8_t *dst,
- u_int8_t tpdu_len, u_int8_t *tpdu)
+ uint8_t src_len, uint8_t *src,
+ uint8_t dst_len, uint8_t *dst,
+ uint8_t tpdu_len, uint8_t *tpdu)
{
int rc = 0;
@@ -743,8 +743,8 @@ static int gsm411_rx_rp_ud(struct msgb *msg, struct gsm_trans *trans,
static int gsm411_rx_rp_data(struct msgb *msg, struct gsm_trans *trans,
struct gsm411_rp_hdr *rph)
{
- u_int8_t src_len, dst_len, rpud_len;
- u_int8_t *src = NULL, *dst = NULL , *rp_ud = NULL;
+ uint8_t src_len, dst_len, rpud_len;
+ uint8_t *src = NULL, *dst = NULL , *rp_ud = NULL;
/* in the MO case, this should always be zero length */
src_len = rph->data[0];
@@ -812,8 +812,8 @@ static int gsm411_rx_rp_error(struct msgb *msg, struct gsm_trans *trans,
{
struct gsm_network *net = trans->conn->bts->network;
struct gsm_sms *sms = trans->sms.sms;
- u_int8_t cause_len = rph->data[0];
- u_int8_t cause = rph->data[1];
+ uint8_t cause_len = rph->data[0];
+ uint8_t cause = rph->data[1];
/* Error in response to MT RP_DATA, i.e. the MS did not
* successfully receive the SMS. We need to investigate
@@ -886,7 +886,7 @@ static int gsm411_rx_cp_data(struct msgb *msg, struct gsm48_hdr *gh,
struct gsm_trans *trans)
{
struct gsm411_rp_hdr *rp_data = (struct gsm411_rp_hdr*)&gh->data;
- u_int8_t msg_type = rp_data->msg_type & 0x07;
+ uint8_t msg_type = rp_data->msg_type & 0x07;
int rc = 0;
switch (msg_type) {
@@ -936,10 +936,10 @@ static int gsm411_tx_cp_ack(struct gsm_trans *trans)
return rc;
}
-static int gsm411_tx_cp_error(struct gsm_trans *trans, u_int8_t cause)
+static int gsm411_tx_cp_error(struct gsm_trans *trans, uint8_t cause)
{
struct msgb *msg = gsm411_msgb_alloc();
- u_int8_t *causep;
+ uint8_t *causep;
LOGP(DSMS, LOGL_NOTICE, "TX CP-ERROR, cause %d (%s)\n", cause,
get_value_string(cp_cause_strs, cause));
@@ -955,8 +955,8 @@ int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn,
struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t msg_type = gh->msg_type;
- u_int8_t transaction_id = ((gh->proto_discr >> 4) ^ 0x8); /* flip */
+ uint8_t msg_type = gh->msg_type;
+ uint8_t transaction_id = ((gh->proto_discr >> 4) ^ 0x8); /* flip */
struct gsm_trans *trans;
int rc = 0;
@@ -1074,8 +1074,8 @@ int gsm411_send_sms(struct gsm_subscriber_connection *conn, struct gsm_sms *sms)
{
struct msgb *msg = gsm411_msgb_alloc();
struct gsm_trans *trans;
- u_int8_t *data, *rp_ud_len;
- u_int8_t msg_ref = 42;
+ uint8_t *data, *rp_ud_len;
+ uint8_t msg_ref = 42;
int transaction_id;
int rc;
@@ -1108,7 +1108,7 @@ int gsm411_send_sms(struct gsm_subscriber_connection *conn, struct gsm_sms *sms)
trans->conn = conn;
/* Hardcode SMSC Originating Address for now */
- data = (u_int8_t *)msgb_put(msg, 8);
+ data = (uint8_t *)msgb_put(msg, 8);
data[0] = 0x07; /* originator length == 7 */
data[1] = 0x91; /* type of number: international, ISDN */
data[2] = 0x44; /* 447785016005 */
@@ -1119,11 +1119,11 @@ int gsm411_send_sms(struct gsm_subscriber_connection *conn, struct gsm_sms *sms)
data[7] = 0x50;
/* Hardcoded Destination Address */
- data = (u_int8_t *)msgb_put(msg, 1);
+ data = (uint8_t *)msgb_put(msg, 1);
data[0] = 0; /* destination length == 0 */
/* obtain a pointer for the rp_ud_len, so we can fill it later */
- rp_ud_len = (u_int8_t *)msgb_put(msg, 1);
+ rp_ud_len = (uint8_t *)msgb_put(msg, 1);
/* generate the 03.40 TPDU */
rc = gsm340_gen_tpdu(msg, sms);
diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c
index 240bfb3a9..39738a5ee 100644
--- a/openbsc/src/libmsc/gsm_04_80.c
+++ b/openbsc/src/libmsc/gsm_04_80.c
@@ -39,7 +39,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/tlv.h>
-static inline unsigned char *msgb_wrap_with_TL(struct msgb *msgb, u_int8_t tag)
+static inline unsigned char *msgb_wrap_with_TL(struct msgb *msgb, uint8_t tag)
{
uint8_t *data = msgb_push(msgb, 2);
@@ -48,8 +48,8 @@ static inline unsigned char *msgb_wrap_with_TL(struct msgb *msgb, u_int8_t tag)
return data;
}
-static inline unsigned char *msgb_push_TLV1(struct msgb *msgb, u_int8_t tag,
- u_int8_t value)
+static inline unsigned char *msgb_push_TLV1(struct msgb *msgb, uint8_t tag,
+ uint8_t value)
{
uint8_t *data = msgb_push(msgb, 3);
@@ -67,7 +67,7 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
- u_int8_t *ptr8;
+ uint8_t *ptr8;
int response_len;
/* First put the payload text into the message */
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index ff4a647d5..f0372aff7 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -266,7 +266,7 @@ void subscr_put_channel(struct gsm_subscriber *subscr)
struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_network *net,
- u_int32_t tmsi)
+ uint32_t tmsi)
{
char tmsi_string[14];
struct gsm_subscriber *subscr;
diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c
index 11355fba0..96b729011 100644
--- a/openbsc/src/libmsc/mncc_builtin.c
+++ b/openbsc/src/libmsc/mncc_builtin.c
@@ -40,7 +40,7 @@ void *tall_call_ctx;
static LLIST_HEAD(call_list);
-static u_int32_t new_callref = 0x00000001;
+static uint32_t new_callref = 0x00000001;
static void free_call(struct gsm_call *call)
{
@@ -50,7 +50,7 @@ static void free_call(struct gsm_call *call)
}
-static struct gsm_call *get_call_ref(u_int32_t callref)
+static struct gsm_call *get_call_ref(uint32_t callref)
{
struct gsm_call *callt;
@@ -168,7 +168,7 @@ static int mncc_setup_cnf(struct gsm_call *call, int msg_type,
struct gsm_mncc connect_ack, frame_recv;
struct gsm_network *net = call->net;
struct gsm_call *remote;
- u_int32_t refs[2];
+ uint32_t refs[2];
/* acknowledge connect */
memset(&connect_ack, 0, sizeof(struct gsm_mncc));
diff --git a/openbsc/src/libmsc/rrlp.c b/openbsc/src/libmsc/rrlp.c
index ae5ca478e..37f7f3eda 100644
--- a/openbsc/src/libmsc/rrlp.c
+++ b/openbsc/src/libmsc/rrlp.c
@@ -29,20 +29,20 @@
/* RRLP msPositionReq, nsBased,
* Accuracy=60, Method=gps, ResponseTime=2, oneSet */
-static const u_int8_t ms_based_pos_req[] = { 0x40, 0x01, 0x78, 0xa8 };
+static const uint8_t ms_based_pos_req[] = { 0x40, 0x01, 0x78, 0xa8 };
/* RRLP msPositionReq, msBasedPref,
Accuracy=60, Method=gpsOrEOTD, ResponseTime=5, multipleSets */
-static const u_int8_t ms_pref_pos_req[] = { 0x40, 0x02, 0x79, 0x50 };
+static const uint8_t ms_pref_pos_req[] = { 0x40, 0x02, 0x79, 0x50 };
/* RRLP msPositionReq, msAssistedPref,
Accuracy=60, Method=gpsOrEOTD, ResponseTime=5, multipleSets */
-static const u_int8_t ass_pref_pos_req[] = { 0x40, 0x03, 0x79, 0x50 };
+static const uint8_t ass_pref_pos_req[] = { 0x40, 0x03, 0x79, 0x50 };
static int send_rrlp_req(struct gsm_subscriber_connection *conn)
{
struct gsm_network *net = conn->bts->network;
- const u_int8_t *req;
+ const uint8_t *req;
switch (net->rrlp.mode) {
case RRLP_MODE_MS_BASED:
diff --git a/openbsc/src/libmsc/silent_call.c b/openbsc/src/libmsc/silent_call.c
index 83e27a924..9e9b72db1 100644
--- a/openbsc/src/libmsc/silent_call.c
+++ b/openbsc/src/libmsc/silent_call.c
@@ -80,8 +80,8 @@ int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg)
}
struct msg_match {
- u_int8_t pdisc;
- u_int8_t msg_type;
+ uint8_t pdisc;
+ uint8_t msg_type;
};
/* list of messages that are handled inside OpenBSC, even in a silent call */
@@ -94,7 +94,7 @@ static const struct msg_match silent_call_accept[] = {
int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
- u_int8_t pdisc = gh->proto_discr & 0x0f;
+ uint8_t pdisc = gh->proto_discr & 0x0f;
int i;
/* if we're not part of a silent call, never reroute */
diff --git a/openbsc/src/libmsc/token_auth.c b/openbsc/src/libmsc/token_auth.c
index 4a62e8d47..b9e481dc1 100644
--- a/openbsc/src/libmsc/token_auth.c
+++ b/openbsc/src/libmsc/token_auth.c
@@ -32,7 +32,7 @@
#define TOKEN_SMS_TEXT "HAR 2009 GSM. Register at http://har2009.gnumonks.org/ " \
"Your IMSI is %s, auth token is %08X, phone no is %s."
-static char *build_sms_string(struct gsm_subscriber *subscr, u_int32_t token)
+static char *build_sms_string(struct gsm_subscriber *subscr, uint32_t token)
{
char *sms_str;
unsigned int len;
@@ -63,7 +63,7 @@ static int token_subscr_cb(unsigned int subsys, unsigned int signal,
return 0;
if (subscr->flags & GSM_SUBSCRIBER_FIRST_CONTACT) {
- u_int32_t token;
+ uint32_t token;
char *sms_str;
/* we've seen this subscriber for the first time. */
@@ -97,7 +97,7 @@ unauth:
if (rc) {
struct gsm_subscriber_connection *conn = connection_for_subscr(subscr);
if (conn) {
- u_int8_t auth_rand[16];
+ uint8_t auth_rand[16];
/* kick the subscriber off the network */
gsm48_tx_mm_auth_req(conn, auth_rand, 0);
gsm48_tx_mm_auth_rej(conn);
@@ -116,7 +116,7 @@ static int token_sms_cb(unsigned int subsys, unsigned int signal,
struct sms_signal_data *sig = signal_data;
struct gsm_sms *sms = sig->sms;;
struct gsm_subscriber_connection *conn;
- u_int8_t auth_rand[16];
+ uint8_t auth_rand[16];
if (signal != S_SMS_DELIVERED)
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 8d6109b46..503bee470 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -142,7 +142,7 @@ DEFUN(sms_send_pend,
}
static int _send_sms_str(struct gsm_subscriber *receiver, char *str,
- u_int8_t tp_pid)
+ uint8_t tp_pid)
{
struct gsm_sms *sms;
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 75f825600..97284ae18 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -60,9 +60,9 @@ enum rtp_bfd_priv {
/* according to RFC 1889 */
struct rtcp_hdr {
- u_int8_t byte0;
- u_int8_t type;
- u_int16_t length;
+ uint8_t byte0;
+ uint8_t type;
+ uint16_t length;
} __attribute__((packed));
#define RTCP_TYPE_SDES 202
@@ -72,40 +72,40 @@ struct rtcp_hdr {
/* according to RFC 3550 */
struct rtp_hdr {
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int8_t csrc_count:4,
+ uint8_t csrc_count:4,
extension:1,
padding:1,
version:2;
- u_int8_t payload_type:7,
+ uint8_t payload_type:7,
marker:1;
#elif __BYTE_ORDER == __BIG_ENDIAN
- u_int8_t version:2,
+ uint8_t version:2,
padding:1,
extension:1,
csrc_count:4;
- u_int8_t marker:1,
+ uint8_t marker:1,
payload_type:7;
#endif
- u_int16_t sequence;
- u_int32_t timestamp;
- u_int32_t ssrc;
+ uint16_t sequence;
+ uint32_t timestamp;
+ uint32_t ssrc;
} __attribute__((packed));
struct rtp_x_hdr {
- u_int16_t by_profile;
- u_int16_t length;
+ uint16_t by_profile;
+ uint16_t length;
} __attribute__((packed));
#define RTP_VERSION 2
/* decode an rtp frame and create a new buffer with payload */
-static int rtp_decode(struct msgb *msg, u_int32_t callref, struct msgb **data)
+static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data)
{
struct msgb *new_msg;
struct gsm_data_frame *frame;
struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data;
struct rtp_x_hdr *rtpxh;
- u_int8_t *payload;
+ uint8_t *payload;
int payload_len;
int msg_type;
int x_len;
@@ -286,11 +286,11 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
/* iterate over all chunks in one RTCP message, look for CNAME IEs and
* replace all of those with 'new_cname' */
static int rtcp_sdes_cname_mangle(struct msgb *msg, struct rtcp_hdr *rh,
- u_int16_t *rtcp_len, const char *new_cname)
+ uint16_t *rtcp_len, const char *new_cname)
{
- u_int8_t *rtcp_end;
- u_int8_t *cur = (u_int8_t *) rh;
- u_int8_t tag, len = 0;
+ uint8_t *rtcp_end;
+ uint8_t *cur = (uint8_t *) rh;
+ uint8_t tag, len = 0;
rtcp_end = cur + *rtcp_len;
/* move cur to end of RTP header */
@@ -343,7 +343,7 @@ static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs)
{
struct rtp_sub_socket *rss = &rs->rtcp;
struct rtcp_hdr *rtph;
- u_int16_t old_len;
+ uint16_t old_len;
int rc;
if (!mangle_rtcp_cname)
@@ -572,8 +572,8 @@ out_free:
return NULL;
}
-static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, u_int32_t ip,
- u_int16_t port)
+static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, uint32_t ip,
+ uint16_t port)
{
int rc;
socklen_t alen = sizeof(rss->sin_local);
@@ -598,7 +598,7 @@ static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, u_int32_t ip,
static unsigned int next_udp_port = RTP_PORT_BASE;
/* bind a RTP socket to a local address */
-int rtp_socket_bind(struct rtp_socket *rs, u_int32_t ip)
+int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip)
{
int rc = -EIO;
struct in_addr ia;
@@ -630,7 +630,7 @@ int rtp_socket_bind(struct rtp_socket *rs, u_int32_t ip)
}
static int rtp_sub_socket_connect(struct rtp_sub_socket *rss,
- u_int32_t ip, u_int16_t port)
+ uint32_t ip, uint16_t port)
{
int rc;
socklen_t alen = sizeof(rss->sin_local);
@@ -649,7 +649,7 @@ static int rtp_sub_socket_connect(struct rtp_sub_socket *rss,
}
/* 'connect' a RTP socket to a remote peer */
-int rtp_socket_connect(struct rtp_socket *rs, u_int32_t ip, u_int16_t port)
+int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port)
{
int rc;
struct in_addr ia;
@@ -682,7 +682,7 @@ int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other)
/* bind RTP/RTCP socket to application */
int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net,
- u_int32_t callref)
+ uint32_t callref)
{
DEBUGP(DMUX, "rtp_socket_proxy(this=%p, callref=%u)\n",
this, callref);
diff --git a/openbsc/src/libtrau/subchan_demux.c b/openbsc/src/libtrau/subchan_demux.c
index ee62d41d3..740d2caaf 100644
--- a/openbsc/src/libtrau/subchan_demux.c
+++ b/openbsc/src/libtrau/subchan_demux.c
@@ -32,17 +32,17 @@
void *tall_tqe_ctx;
-static inline void append_bit(struct demux_subch *sch, u_int8_t bit)
+static inline void append_bit(struct demux_subch *sch, uint8_t bit)
{
sch->out_bitbuf[sch->out_idx++] = bit;
}
#define SYNC_HDR_BITS 16
-static const u_int8_t nullbytes[SYNC_HDR_BITS];
+static const uint8_t nullbytes[SYNC_HDR_BITS];
/* check if we have just completed the 16 bit zero sync header,
* in accordance with GSM TS 08.60 Chapter 4.8.1 */
-static int sync_hdr_complete(struct demux_subch *sch, u_int8_t bit)
+static int sync_hdr_complete(struct demux_subch *sch, uint8_t bit)
{
if (bit == 0)
sch->consecutive_zeros++;
@@ -83,7 +83,7 @@ int subch_demux_init(struct subch_demux *dmx)
/* input some arbitrary (modulo 4) number of bytes of a 64k E1 channel,
* split it into the 16k subchannels */
-int subch_demux_in(struct subch_demux *dmx, u_int8_t *data, int len)
+int subch_demux_in(struct subch_demux *dmx, uint8_t *data, int len)
{
int i, c;
@@ -92,12 +92,12 @@ int subch_demux_in(struct subch_demux *dmx, u_int8_t *data, int len)
return -EINVAL;
for (i = 0; i < len; i++) {
- u_int8_t inbyte = data[i];
+ uint8_t inbyte = data[i];
for (c = 0; c < NR_SUBCH; c++) {
struct demux_subch *sch = &dmx->subch[c];
- u_int8_t inbits;
- u_int8_t bit;
+ uint8_t inbits;
+ uint8_t bit;
/* ignore inactive subchannels */
if (!(dmx->chan_activ & (1 << c)))
@@ -171,7 +171,7 @@ static int alloc_add_idle_frame(struct subch_mux *mx, int sch_nr)
/* return the requested number of bits from the specified subchannel */
static int get_subch_bits(struct subch_mux *mx, int subch,
- u_int8_t *bits, int num_requested)
+ uint8_t *bits, int num_requested)
{
struct mux_subch *sch = &mx->subch[subch];
int num_bits = 0;
@@ -215,9 +215,9 @@ static int get_subch_bits(struct subch_mux *mx, int subch,
}
/* compact an array of 8 single-bit bytes into one byte of 8 bits */
-static u_int8_t compact_bits(const u_int8_t *bits)
+static uint8_t compact_bits(const uint8_t *bits)
{
- u_int8_t ret = 0;
+ uint8_t ret = 0;
int i;
for (i = 0; i < 8; i++)
@@ -227,9 +227,9 @@ static u_int8_t compact_bits(const u_int8_t *bits)
}
/* obtain a single output byte from the subchannel muxer */
-static int mux_output_byte(struct subch_mux *mx, u_int8_t *byte)
+static int mux_output_byte(struct subch_mux *mx, uint8_t *byte)
{
- u_int8_t bits[8];
+ uint8_t bits[8];
int rc;
/* combine two bits of every subchan */
@@ -244,7 +244,7 @@ static int mux_output_byte(struct subch_mux *mx, u_int8_t *byte)
}
/* Request the output of some muxed bytes from the subchan muxer */
-int subchan_mux_out(struct subch_mux *mx, u_int8_t *data, int len)
+int subchan_mux_out(struct subch_mux *mx, uint8_t *data, int len)
{
int i;
@@ -285,7 +285,7 @@ static void tx_queue_evict(struct mux_subch *sch, int num_evict)
}
/* enqueue some data into the tx_queue of a given subchannel */
-int subchan_mux_enqueue(struct subch_mux *mx, int s_nr, const u_int8_t *data,
+int subchan_mux_enqueue(struct subch_mux *mx, int s_nr, const uint8_t *data,
int len)
{
struct mux_subch *sch = &mx->subch[s_nr];
diff --git a/openbsc/src/libtrau/trau_frame.c b/openbsc/src/libtrau/trau_frame.c
index d4d6447cc..15cbe4ff9 100644
--- a/openbsc/src/libtrau/trau_frame.c
+++ b/openbsc/src/libtrau/trau_frame.c
@@ -28,10 +28,10 @@
#include <openbsc/subchan_demux.h>
#include <openbsc/debug.h>
-static u_int32_t get_bits(const u_int8_t *bitbuf, int offset, int num)
+static uint32_t get_bits(const uint8_t *bitbuf, int offset, int num)
{
int i;
- u_int32_t ret = 0;
+ uint32_t ret = 0;
for (i = offset; i < offset + num; i++) {
ret = ret << 1;
@@ -42,7 +42,7 @@ static u_int32_t get_bits(const u_int8_t *bitbuf, int offset, int num)
}
/* Decode according to 3.1.1 */
-static void decode_fr(struct decoded_trau_frame *fr, const u_int8_t *trau_bits)
+static void decode_fr(struct decoded_trau_frame *fr, const uint8_t *trau_bits)
{
int i;
int d_idx = 0;
@@ -63,7 +63,7 @@ static void decode_fr(struct decoded_trau_frame *fr, const u_int8_t *trau_bits)
}
/* Decode according to 3.1.2 */
-static void decode_amr(struct decoded_trau_frame *fr, const u_int8_t *trau_bits)
+static void decode_amr(struct decoded_trau_frame *fr, const uint8_t *trau_bits)
{
int i;
int d_idx = 0;
@@ -85,9 +85,9 @@ static void decode_amr(struct decoded_trau_frame *fr, const u_int8_t *trau_bits)
memcpy(fr->d_bits + d_idx, trau_bits + 305, 11);
}
-int decode_trau_frame(struct decoded_trau_frame *fr, const u_int8_t *trau_bits)
+int decode_trau_frame(struct decoded_trau_frame *fr, const uint8_t *trau_bits)
{
- u_int8_t cbits5 = get_bits(trau_bits, 17, 5);
+ uint8_t cbits5 = get_bits(trau_bits, 17, 5);
switch (cbits5) {
case TRAU_FT_FR_UP:
@@ -120,13 +120,13 @@ int decode_trau_frame(struct decoded_trau_frame *fr, const u_int8_t *trau_bits)
return 0;
}
-const u_int8_t ft_fr_down_bits[] = { 1, 1, 1, 0, 0 };
-const u_int8_t ft_idle_down_bits[] = { 0, 1, 1, 1, 0 };
+const uint8_t ft_fr_down_bits[] = { 1, 1, 1, 0, 0 };
+const uint8_t ft_idle_down_bits[] = { 0, 1, 1, 1, 0 };
/* modify an uplink TRAU frame so we can send it downlink */
int trau_frame_up2down(struct decoded_trau_frame *fr)
{
- u_int8_t cbits5 = get_bits(fr->c_bits, 0, 5);
+ uint8_t cbits5 = get_bits(fr->c_bits, 0, 5);
switch (cbits5) {
case TRAU_FT_FR_UP:
@@ -178,7 +178,7 @@ int trau_frame_up2down(struct decoded_trau_frame *fr)
}
-static void encode_fr(u_int8_t *trau_bits, const struct decoded_trau_frame *fr)
+static void encode_fr(uint8_t *trau_bits, const struct decoded_trau_frame *fr)
{
int i;
int d_idx = 0;
@@ -205,9 +205,9 @@ static void encode_fr(u_int8_t *trau_bits, const struct decoded_trau_frame *fr)
}
-int encode_trau_frame(u_int8_t *trau_bits, const struct decoded_trau_frame *fr)
+int encode_trau_frame(uint8_t *trau_bits, const struct decoded_trau_frame *fr)
{
- u_int8_t cbits5 = get_bits(fr->c_bits, 0, 5);
+ uint8_t cbits5 = get_bits(fr->c_bits, 0, 5);
/* 16 bits of sync header */
memset(trau_bits, 0, 16);
@@ -245,10 +245,10 @@ static struct decoded_trau_frame fr_idle_frame = {
.c_bits = { 0, 1, 1, 1, 0 }, /* IDLE DOWNLINK 3.5.5 */
.t_bits = { 1, 1, 1, 1 },
};
-static u_int8_t encoded_idle_frame[TRAU_FRAME_BITS];
+static uint8_t encoded_idle_frame[TRAU_FRAME_BITS];
static int dbits_initted;
-u_int8_t *trau_idle_frame(void)
+uint8_t *trau_idle_frame(void)
{
/* only initialize during the first call */
if (!dbits_initted) {
diff --git a/openbsc/src/libtrau/trau_mux.c b/openbsc/src/libtrau/trau_mux.c
index 645155422..82813b392 100644
--- a/openbsc/src/libtrau/trau_mux.c
+++ b/openbsc/src/libtrau/trau_mux.c
@@ -31,7 +31,7 @@
#include <openbsc/debug.h>
#include <osmocom/core/talloc.h>
-u_int8_t gsm_fr_map[] = {
+uint8_t gsm_fr_map[] = {
6, 6, 5, 5, 4, 4, 3, 3,
7, 2, 2, 6, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
@@ -53,7 +53,7 @@ struct upqueue_entry {
struct llist_head list;
struct gsm_network *net;
struct gsm_e1_subslot src;
- u_int32_t callref;
+ uint32_t callref;
};
static LLIST_HEAD(ss_map);
@@ -102,7 +102,7 @@ int trau_mux_map_lchan(const struct gsm_lchan *src,
/* unmap one particular subslot from another subslot */
-int trau_mux_unmap(const struct gsm_e1_subslot *ss, u_int32_t callref)
+int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref)
{
struct map_entry *me, *me2;
struct upqueue_entry *ue, *ue2;
@@ -156,14 +156,14 @@ lookup_trau_upqueue(const struct gsm_e1_subslot *src)
return NULL;
}
-static const u_int8_t c_bits_check[] = { 0, 0, 0, 1, 0 };
+static const uint8_t c_bits_check[] = { 0, 0, 0, 1, 0 };
/* we get called by subchan_demux */
int trau_mux_input(struct gsm_e1_subslot *src_e1_ss,
- const u_int8_t *trau_bits, int num_bits)
+ const uint8_t *trau_bits, int num_bits)
{
struct decoded_trau_frame tf;
- u_int8_t trau_bits_out[TRAU_FRAME_BITS];
+ uint8_t trau_bits_out[TRAU_FRAME_BITS];
struct gsm_e1_subslot *dst_e1_ss = lookup_trau_mux_map(src_e1_ss);
struct subch_mux *mx;
struct upqueue_entry *ue;
@@ -231,7 +231,7 @@ int trau_mux_input(struct gsm_e1_subslot *src_e1_ss,
}
/* add receiver instance for lchan and callref */
-int trau_recv_lchan(struct gsm_lchan *lchan, u_int32_t callref)
+int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref)
{
struct gsm_e1_subslot *src_ss;
struct upqueue_entry *ue;
@@ -260,7 +260,7 @@ int trau_recv_lchan(struct gsm_lchan *lchan, u_int32_t callref)
int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame)
{
- u_int8_t trau_bits_out[TRAU_FRAME_BITS];
+ uint8_t trau_bits_out[TRAU_FRAME_BITS];
struct gsm_e1_subslot *dst_e1_ss = &lchan->ts->e1_link;
struct subch_mux *mx;
int i, j, k, l, o;
diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c
index 110d337e7..0047a92c6 100644
--- a/openbsc/src/utils/bs11_config.c
+++ b/openbsc/src/utils/bs11_config.c
@@ -53,22 +53,22 @@ static enum bs11cfg_state bs11cfg_state = STATE_NONE;
static char *command, *value;
struct timer_list status_timer;
-static const u_int8_t obj_li_attr[] = {
+static const uint8_t obj_li_attr[] = {
NM_ATT_BS11_BIT_ERR_THESH, 0x09, 0x00,
NM_ATT_BS11_L1_PROT_TYPE, 0x00,
NM_ATT_BS11_LINE_CFG, 0x00,
};
-static const u_int8_t obj_bbsig0_attr[] = {
+static const uint8_t obj_bbsig0_attr[] = {
NM_ATT_BS11_RSSI_OFFS, 0x02, 0x00, 0x00,
NM_ATT_BS11_DIVERSITY, 0x01, 0x00,
};
-static const u_int8_t obj_pa0_attr[] = {
+static const uint8_t obj_pa0_attr[] = {
NM_ATT_BS11_TXPWR, 0x01, BS11_TRX_POWER_GSM_30mW,
};
static const char *trx1_password = "1111111111";
#define TEI_OML 25
-static const u_int8_t too_fast[] = { 0x12, 0x80, 0x00, 0x00, 0x02, 0x02 };
+static const uint8_t too_fast[] = { 0x12, 0x80, 0x00, 0x00, 0x02, 0x02 };
static struct log_target *stderr_target;
@@ -113,8 +113,8 @@ static int create_objects(struct gsm_bts *bts)
static int create_trx1(struct gsm_bts *bts)
{
- u_int8_t bbsig1_attr[sizeof(obj_bbsig0_attr)+12];
- u_int8_t *cur = bbsig1_attr;
+ uint8_t bbsig1_attr[sizeof(obj_bbsig0_attr)+12];
+ uint8_t *cur = bbsig1_attr;
struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, 1);
if (!trx)
@@ -127,7 +127,7 @@ static int create_trx1(struct gsm_bts *bts)
sleep(1);
cur = tlv_put(cur, NM_ATT_BS11_PASSWORD, 10,
- (u_int8_t *)trx1_password);
+ (uint8_t *)trx1_password);
memcpy(cur, obj_bbsig0_attr, sizeof(obj_bbsig0_attr));
abis_nm_bs11_create_object(bts, BS11_OBJ_BBSIG, 1,
sizeof(bbsig1_attr), bbsig1_attr);
@@ -217,7 +217,7 @@ static const char *bs11_link_state[] = {
[0x02] = "Restoring",
};
-static const char *linkstate_name(u_int8_t linkstate)
+static const char *linkstate_name(uint8_t linkstate)
{
if (linkstate > ARRAY_SIZE(bs11_link_state))
return "Unknown";
@@ -234,7 +234,7 @@ static const char *mbccu_load[] = {
[5] = "Load",
};
-static const char *mbccu_load_name(u_int8_t linkstate)
+static const char *mbccu_load_name(uint8_t linkstate)
{
if (linkstate > ARRAY_SIZE(mbccu_load))
return "Unknown";
@@ -242,7 +242,7 @@ static const char *mbccu_load_name(u_int8_t linkstate)
return mbccu_load[linkstate];
}
-static const char *bts_phase_name(u_int8_t phase)
+static const char *bts_phase_name(uint8_t phase)
{
switch (phase) {
case BS11_STATE_WARM_UP:
@@ -280,7 +280,7 @@ static const char *bts_phase_name(u_int8_t phase)
}
}
-static const char *trx_power_name(u_int8_t pwr)
+static const char *trx_power_name(uint8_t pwr)
{
switch (pwr) {
case BS11_TRX_POWER_GSM_2W:
@@ -304,7 +304,7 @@ static const char *trx_power_name(u_int8_t pwr)
}
}
-static const char *pll_mode_name(u_int8_t mode)
+static const char *pll_mode_name(uint8_t mode)
{
switch (mode) {
case BS11_LI_PLL_LOCKED:
@@ -316,7 +316,7 @@ static const char *pll_mode_name(u_int8_t mode)
}
}
-static const char *cclk_acc_name(u_int8_t acc)
+static const char *cclk_acc_name(uint8_t acc)
{
switch (acc) {
case 0:
@@ -330,7 +330,7 @@ static const char *cclk_acc_name(u_int8_t acc)
}
}
-static const char *bport_lcfg_name(u_int8_t lcfg)
+static const char *bport_lcfg_name(uint8_t lcfg)
{
switch (lcfg) {
case BS11_LINE_CFG_STAR:
@@ -378,7 +378,7 @@ static const char *obj_name(struct abis_om_fom_hdr *foh)
static void print_state(struct tlv_parsed *tp)
{
if (TLVP_PRESENT(tp, NM_ATT_BS11_BTS_STATE)) {
- u_int8_t phase, mbccu;
+ uint8_t phase, mbccu;
if (TLVP_LEN(tp, NM_ATT_BS11_BTS_STATE) >= 1) {
phase = *TLVP_VAL(tp, NM_ATT_BS11_BTS_STATE);
printf("PHASE: %u %-20s ", phase & 0xf,
@@ -392,7 +392,7 @@ static void print_state(struct tlv_parsed *tp)
}
if (TLVP_PRESENT(tp, NM_ATT_BS11_E1_STATE) &&
TLVP_LEN(tp, NM_ATT_BS11_E1_STATE) >= 1) {
- u_int8_t e1_state = *TLVP_VAL(tp, NM_ATT_BS11_E1_STATE);
+ uint8_t e1_state = *TLVP_VAL(tp, NM_ATT_BS11_E1_STATE);
printf("Abis-link: %-9s ", linkstate_name(e1_state & 0xf));
}
printf("\n");
@@ -420,7 +420,7 @@ static int print_attr(struct tlv_parsed *tp)
#endif
if (TLVP_PRESENT(tp, NM_ATT_ABIS_CHANNEL) &&
TLVP_LEN(tp, NM_ATT_ABIS_CHANNEL) >= 3) {
- const u_int8_t *chan = TLVP_VAL(tp, NM_ATT_ABIS_CHANNEL);
+ const uint8_t *chan = TLVP_VAL(tp, NM_ATT_ABIS_CHANNEL);
printf("\tE1 Channel: Port=%u Timeslot=%u ",
chan[0], chan[1]);
if (chan[2] == 0xff)
@@ -442,23 +442,23 @@ static int print_attr(struct tlv_parsed *tp)
}
if (TLVP_PRESENT(tp, NM_ATT_BS11_PLL) &&
TLVP_LEN(tp, NM_ATT_BS11_PLL) >= 4) {
- const u_int8_t *vp = TLVP_VAL(tp, NM_ATT_BS11_PLL);
+ const uint8_t *vp = TLVP_VAL(tp, NM_ATT_BS11_PLL);
printf("\tPLL Set Value=%d, Work Value=%d\n",
vp[0] << 8 | vp[1], vp[2] << 8 | vp[3]);
}
if (TLVP_PRESENT(tp, NM_ATT_BS11_CCLK_ACCURACY) &&
TLVP_LEN(tp, NM_ATT_BS11_CCLK_ACCURACY) >= 1) {
- const u_int8_t *acc = TLVP_VAL(tp, NM_ATT_BS11_CCLK_ACCURACY);
+ const uint8_t *acc = TLVP_VAL(tp, NM_ATT_BS11_CCLK_ACCURACY);
printf("\tCCLK Accuracy: %s (%d)\n", cclk_acc_name(*acc), *acc);
}
if (TLVP_PRESENT(tp, NM_ATT_BS11_CCLK_TYPE) &&
TLVP_LEN(tp, NM_ATT_BS11_CCLK_TYPE) >= 1) {
- const u_int8_t *acc = TLVP_VAL(tp, NM_ATT_BS11_CCLK_TYPE);
+ const uint8_t *acc = TLVP_VAL(tp, NM_ATT_BS11_CCLK_TYPE);
printf("\tCCLK Type=%d\n", *acc);
}
if (TLVP_PRESENT(tp, NM_ATT_BS11_LINE_CFG) &&
TLVP_LEN(tp, NM_ATT_BS11_LINE_CFG) >= 1) {
- const u_int8_t *lcfg = TLVP_VAL(tp, NM_ATT_BS11_LINE_CFG);
+ const uint8_t *lcfg = TLVP_VAL(tp, NM_ATT_BS11_LINE_CFG);
printf("\tLine Configuration: %s (%d)\n",
bport_lcfg_name(*lcfg), *lcfg);
}
diff --git a/openbsc/src/utils/rs232.c b/openbsc/src/utils/rs232.c
index 5c20531f9..43b0dc4fa 100644
--- a/openbsc/src/utils/rs232.c
+++ b/openbsc/src/utils/rs232.c
@@ -57,7 +57,7 @@ static int handle_ser_write(struct bsc_fd *bfd);
int _abis_nm_sendmsg(struct msgb *msg, int to_trx_oml)
{
struct serial_handle *sh = ser_handle;
- u_int8_t *lapd;
+ uint8_t *lapd;
unsigned int len;
msg->l2h = msg->data;