aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libabis
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libabis')
-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
5 files changed, 54 insertions, 54 deletions
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;