nat: u_int8_t -> uint8_t
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 15019b4..b628ed0 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -246,7 +246,7 @@
/* MGCP config */
struct mgcp_config *mgcp_cfg;
struct write_queue mgcp_queue;
- u_int8_t mgcp_msg[4096];
+ uint8_t mgcp_msg[4096];
int mgcp_length;
/* msc things */
@@ -311,7 +311,7 @@
/**
* MGCP/Audio handling
*/
-int bsc_write_mgcp(struct bsc_connection *bsc, const u_int8_t *data, unsigned int length);
+int bsc_write_mgcp(struct bsc_connection *bsc, const uint8_t *data, unsigned int length);
int bsc_mgcp_assign(struct sccp_connections *, struct msgb *msg);
void bsc_mgcp_init(struct sccp_connections *);
void bsc_mgcp_dlcx(struct sccp_connections *);
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c
index ef55f8a..48be904 100644
--- a/openbsc/src/nat/bsc_mgcp_utils.c
+++ b/openbsc/src/nat/bsc_mgcp_utils.c
@@ -42,8 +42,8 @@
struct sccp_connections *mcon;
struct tlv_parsed tp;
u_int16_t cic;
- u_int8_t timeslot;
- u_int8_t multiplex;
+ uint8_t timeslot;
+ uint8_t multiplex;
int combined;
if (!msg->l3h) {
@@ -140,7 +140,7 @@
return;
}
- bsc_write_mgcp(bsc, (u_int8_t *) buf, len);
+ bsc_write_mgcp(bsc, (uint8_t *) buf, len);
}
void bsc_mgcp_init(struct sccp_connections *con)
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index 6d3110e..dd0f240 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -72,7 +72,7 @@
"There is NO WARRANTY, to the extent permitted by law.\n";
static struct bsc_nat *nat;
-static void bsc_send_data(struct bsc_connection *bsc, const u_int8_t *data, unsigned int length, int);
+static void bsc_send_data(struct bsc_connection *bsc, const uint8_t *data, unsigned int length, int);
static void msc_send_reset(struct bsc_msc_connection *con);
struct bsc_config *bsc_config_num(struct bsc_nat *nat, int num)
@@ -89,7 +89,7 @@
/*
* below are stubs we need to link
*/
-int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
+int nm_state_event(enum nm_evt 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_ins)
{
@@ -109,7 +109,7 @@
static void send_reset_ack(struct bsc_connection *bsc)
{
- static const u_int8_t gsm_reset_ack[] = {
+ static const uint8_t gsm_reset_ack[] = {
0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x01,
0x00, 0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x03,
0x00, 0x01, 0x31,
@@ -120,7 +120,7 @@
static void send_ping(struct bsc_connection *bsc)
{
- static const u_int8_t id_ping[] = {
+ static const uint8_t id_ping[] = {
IPAC_MSGT_PING,
};
@@ -129,7 +129,7 @@
static void send_pong(struct bsc_connection *bsc)
{
- static const u_int8_t id_pong[] = {
+ static const uint8_t id_pong[] = {
IPAC_MSGT_PONG,
};
@@ -172,7 +172,7 @@
static void send_id_ack(struct bsc_connection *bsc)
{
- static const u_int8_t id_ack[] = {
+ static const uint8_t id_ack[] = {
IPAC_MSGT_ID_ACK
};
@@ -181,7 +181,7 @@
static void send_id_req(struct bsc_connection *bsc)
{
- static const u_int8_t id_req[] = {
+ static const uint8_t id_req[] = {
IPAC_MSGT_ID_GET,
0x01, IPAC_IDTAG_UNIT,
0x01, IPAC_IDTAG_MACADDR,
@@ -245,7 +245,7 @@
static void send_mgcp_reset(struct bsc_connection *bsc)
{
- static const u_int8_t mgcp_reset[] = {
+ static const uint8_t mgcp_reset[] = {
"RSIP 1 13@mgw MGCP 1.0\r\n"
};
@@ -279,7 +279,7 @@
/*
* Currently we are lacking refcounting so we need to copy each message.
*/
-static void bsc_send_data(struct bsc_connection *bsc, const u_int8_t *data, unsigned int length, int proto)
+static void bsc_send_data(struct bsc_connection *bsc, const uint8_t *data, unsigned int length, int proto)
{
struct msgb *msg;
@@ -503,7 +503,7 @@
static void msc_send_reset(struct bsc_msc_connection *msc_con)
{
- static const u_int8_t reset[] = {
+ static const uint8_t reset[] = {
0x00, 0x12, 0xfd,
0x09, 0x00, 0x03, 0x05, 0x07, 0x02, 0x42, 0xfe,
0x02, 0x42, 0xfe, 0x06, 0x00, 0x04, 0x30, 0x04,
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index 39de817..5418dc1 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -134,7 +134,7 @@
{
struct bsc_connection *bsc;
int data_length;
- const u_int8_t *data;
+ const uint8_t *data;
struct tlv_parsed tp;
int i = 0;
@@ -179,7 +179,7 @@
return NULL;
}
-int bsc_write_mgcp(struct bsc_connection *bsc, const u_int8_t *data, unsigned int length)
+int bsc_write_mgcp(struct bsc_connection *bsc, const uint8_t *data, unsigned int length)
{
struct msgb *msg;
@@ -287,7 +287,7 @@
static int _cr_check_loc_upd(struct bsc_connection *bsc, uint8_t *data, unsigned int length)
{
- u_int8_t mi_type;
+ uint8_t mi_type;
struct gsm48_loc_upd_req *lu;
char mi_string[GSM48_MI_SIZE];
@@ -348,7 +348,7 @@
{
struct gsm48_pag_resp *resp;
char mi_string[GSM48_MI_SIZE];
- u_int8_t mi_type;
+ uint8_t mi_type;
if (length < sizeof(*resp)) {
LOGP(DNAT, LOGL_ERROR, "PAG RESP does not fit. Length was %d.\n", length);
diff --git a/openbsc/tests/bsc-nat/bsc_data.c b/openbsc/tests/bsc-nat/bsc_data.c
index 34242db..6700b0c 100644
--- a/openbsc/tests/bsc-nat/bsc_data.c
+++ b/openbsc/tests/bsc-nat/bsc_data.c
@@ -1,7 +1,7 @@
/* test data */
/* BSC -> MSC, CR */
-static const u_int8_t bsc_cr[] = {
+static const uint8_t bsc_cr[] = {
0x00, 0x2e, 0xfd,
0x01, 0x00, 0x00, 0x15, 0x02, 0x02, 0x04, 0x02,
0x42, 0xfe, 0x0f, 0x21, 0x00, 0x1f, 0x57, 0x05,
@@ -10,7 +10,7 @@
0x90, 0x20, 0x1d, 0x50, 0x08, 0x29, 0x47, 0x80,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00 };
-static const u_int8_t bsc_cr_patched[] = {
+static const uint8_t bsc_cr_patched[] = {
0x00, 0x2e, 0xfd,
0x01, 0x00, 0x00, 0x05, 0x02, 0x02, 0x04, 0x02,
0x42, 0xfe, 0x0f, 0x21, 0x00, 0x1f, 0x57, 0x05,
@@ -20,60 +20,60 @@
0x00, 0x00, 0x00, 0x00, 0x80, 0x00 };
/* CC, MSC -> BSC */
-static const u_int8_t msc_cc[] = {
+static const uint8_t msc_cc[] = {
0x00, 0x0a, 0xfd,
0x02, 0x00, 0x00, 0x05, 0x01, 0x1f, 0xe4, 0x02,
0x01, 0x00 };
-static const u_int8_t msc_cc_patched[] = {
+static const uint8_t msc_cc_patched[] = {
0x00, 0x0a, 0xfd,
0x02, 0x00, 0x00, 0x15, 0x01, 0x1f, 0xe4, 0x02,
0x01, 0x00 };
/* Classmark, BSC -> MSC */
-static const u_int8_t bsc_dtap[] = {
+static const uint8_t bsc_dtap[] = {
0x00, 0x17, 0xfd,
0x06, 0x01, 0x1f, 0xe4, 0x00, 0x01, 0x10, 0x00,
0x0e, 0x54, 0x12, 0x03, 0x50, 0x18, 0x93, 0x13,
0x06, 0x60, 0x14, 0x45, 0x00, 0x81, 0x00 };
-static const u_int8_t bsc_dtap_patched[] = {
+static const uint8_t bsc_dtap_patched[] = {
0x00, 0x17, 0xfd,
0x06, 0x01, 0x1f, 0xe4, 0x00, 0x01, 0x10, 0x00,
0x0e, 0x54, 0x12, 0x03, 0x50, 0x18, 0x93, 0x13,
0x06, 0x60, 0x14, 0x45, 0x00, 0x81, 0x00 };
/* Clear command, MSC -> BSC */
-static const u_int8_t msc_dtap[] = {
+static const uint8_t msc_dtap[] = {
0x00, 0x0d, 0xfd,
0x06, 0x00, 0x00, 0x05, 0x00, 0x01, 0x06, 0x00,
0x04, 0x20, 0x04, 0x01, 0x09 };
-static const u_int8_t msc_dtap_patched[] = {
+static const uint8_t msc_dtap_patched[] = {
0x00, 0x0d, 0xfd,
0x06, 0x00, 0x00, 0x15, 0x00, 0x01, 0x06, 0x00,
0x04, 0x20, 0x04, 0x01, 0x09 };
/*RLSD, MSC -> BSC */
-static const u_int8_t msc_rlsd[] = {
+static const uint8_t msc_rlsd[] = {
0x00, 0x0a, 0xfd,
0x04, 0x00, 0x00, 0x05, 0x01, 0x1f, 0xe4, 0x00,
0x01, 0x00 };
-static const u_int8_t msc_rlsd_patched[] = {
+static const uint8_t msc_rlsd_patched[] = {
0x00, 0x0a, 0xfd,
0x04, 0x00, 0x00, 0x15, 0x01, 0x1f, 0xe4, 0x00,
0x01, 0x00 };
/* RLC, BSC -> MSC */
-static const u_int8_t bsc_rlc[] = {
+static const uint8_t bsc_rlc[] = {
0x00, 0x07, 0xfd,
0x05, 0x01, 0x1f, 0xe4, 0x00, 0x00, 0x15 };
-static const u_int8_t bsc_rlc_patched[] = {
+static const uint8_t bsc_rlc_patched[] = {
0x00, 0x07, 0xfd,
0x05, 0x01, 0x1f, 0xe4, 0x00, 0x00, 0x05 };
/* a paging command */
-static const u_int8_t paging_by_lac_cmd[] = {
+static const uint8_t paging_by_lac_cmd[] = {
0x00, 0x22, 0xfd, 0x09,
0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x02, 0x00,
0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x12, 0x00,
@@ -82,7 +82,7 @@
0x15 };
/* an assignment command */
-static const u_int8_t ass_cmd[] = {
+static const uint8_t ass_cmd[] = {
0x00, 0x12, 0xfd, 0x06,
0x00, 0x00, 0x49, 0x00, 0x01, 0x0b, 0x00, 0x09,
0x01, 0x0b, 0x03, 0x01, 0x0a, 0x11, 0x01, 0x00,
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c
index d49ab6c..e39ec0c 100644
--- a/openbsc/tests/bsc-nat/bsc_nat_test.c
+++ b/openbsc/tests/bsc-nat/bsc_nat_test.c
@@ -32,26 +32,26 @@
#include <stdio.h>
/* test messages for ipa */
-static u_int8_t ipa_id[] = {
+static uint8_t ipa_id[] = {
0x00, 0x01, 0xfe, 0x06,
};
/* SCCP messages are below */
-static u_int8_t gsm_reset[] = {
+static uint8_t gsm_reset[] = {
0x00, 0x12, 0xfd,
0x09, 0x00, 0x03, 0x05, 0x07, 0x02, 0x42, 0xfe,
0x02, 0x42, 0xfe, 0x06, 0x00, 0x04, 0x30, 0x04,
0x01, 0x20,
};
-static const u_int8_t gsm_reset_ack[] = {
+static const uint8_t gsm_reset_ack[] = {
0x00, 0x13, 0xfd,
0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x01,
0x00, 0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x03,
0x00, 0x01, 0x31,
};
-static const u_int8_t gsm_paging[] = {
+static const uint8_t gsm_paging[] = {
0x00, 0x20, 0xfd,
0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x01,
0x00, 0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x10,
@@ -60,7 +60,7 @@
};
/* BSC -> MSC connection open */
-static const u_int8_t bssmap_cr[] = {
+static const uint8_t bssmap_cr[] = {
0x00, 0x2c, 0xfd,
0x01, 0x01, 0x02, 0x03, 0x02, 0x02, 0x04, 0x02,
0x42, 0xfe, 0x0f, 0x1f, 0x00, 0x1d, 0x57, 0x05,
@@ -71,45 +71,45 @@
};
/* MSC -> BSC connection confirm */
-static const u_int8_t bssmap_cc[] = {
+static const uint8_t bssmap_cc[] = {
0x00, 0x0a, 0xfd,
0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00,
};
/* MSC -> BSC released */
-static const u_int8_t bssmap_released[] = {
+static const uint8_t bssmap_released[] = {
0x00, 0x0e, 0xfd,
0x04, 0x00, 0x00, 0x03, 0x01, 0x02, 0x03, 0x00, 0x01, 0x0f,
0x02, 0x23, 0x42, 0x00,
};
/* BSC -> MSC released */
-static const u_int8_t bssmap_release_complete[] = {
+static const uint8_t bssmap_release_complete[] = {
0x00, 0x07, 0xfd,
0x05, 0x01, 0x02, 0x03, 0x00, 0x00, 0x03
};
/* both directions IT timer */
-static const u_int8_t connnection_it[] = {
+static const uint8_t connnection_it[] = {
0x00, 0x0b, 0xfd,
0x10, 0x01, 0x02, 0x03, 0x01, 0x02, 0x03,
0x00, 0x00, 0x00, 0x00,
};
/* error in both directions */
-static const u_int8_t proto_error[] = {
+static const uint8_t proto_error[] = {
0x00, 0x05, 0xfd,
0x0f, 0x22, 0x33, 0x44, 0x00,
};
/* MGCP wrap... */
-static const u_int8_t mgcp_msg[] = {
+static const uint8_t mgcp_msg[] = {
0x00, 0x03, 0xfc,
0x20, 0x20, 0x20,
};
/* location updating request */
-static const u_int8_t bss_lu[] = {
+static const uint8_t bss_lu[] = {
0x00, 0x2e, 0xfd,
0x01, 0x91, 0x45, 0x14, 0x02, 0x02, 0x04, 0x02,
0x42, 0xfe, 0x0f, 0x21, 0x00, 0x1f, 0x57, 0x05,
@@ -131,7 +131,7 @@
};
struct filter_result {
- const u_int8_t *data;
+ const uint8_t *data;
const u_int16_t length;
const int dir;
const int result;
@@ -253,7 +253,7 @@
#include "bsc_data.c"
-static void copy_to_msg(struct msgb *msg, const u_int8_t *data, unsigned int length)
+static void copy_to_msg(struct msgb *msg, const uint8_t *data, unsigned int length)
{
msgb_reset(msg);
msg->l2h = msgb_put(msg, length);
@@ -567,7 +567,7 @@
}
struct cr_filter {
- const u_int8_t *data;
+ const uint8_t *data;
int length;
int result;
int contype;