aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 04:37:26 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 04:37:26 +0800
commit5aa17014deace6d91a5cbb9784a9c05521ba19c8 (patch)
tree50cc56ab2fa7732216e13755112e7ef3735e4241 /include
parent97f66e2b534e2a54c63360a3f8134a0189c54e25 (diff)
u_int8_t -> uint8_t
Diffstat (limited to 'include')
-rw-r--r--include/bsc_data.h2
-rw-r--r--include/ipaccess.h4
-rw-r--r--include/mgcp_ss7.h4
-rw-r--r--include/mtp_data.h4
-rw-r--r--include/mtp_level3.h26
-rw-r--r--include/mtp_pcap.h2
-rw-r--r--include/openbsc_nat/bssap.h26
-rw-r--r--include/openbsc_nat/tlv.h92
8 files changed, 80 insertions, 80 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h
index 6d61a22..9b5bbfd 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -126,6 +126,6 @@ int link_c7_init(struct link_data *data);
int link_udp_init(struct link_data *data, int src_port, const char *dest_ip, int port);
/* MGCP */
-void mgcp_forward(struct bsc_data *bsc, const u_int8_t *data, unsigned int length);
+void mgcp_forward(struct bsc_data *bsc, const uint8_t *data, unsigned int length);
#endif
diff --git a/include/ipaccess.h b/include/ipaccess.h
index 345ed3c..c6c4739 100644
--- a/include/ipaccess.h
+++ b/include/ipaccess.h
@@ -8,8 +8,8 @@
struct ipaccess_head {
u_int16_t len; /* network byte order */
- u_int8_t proto;
- u_int8_t data[0];
+ uint8_t proto;
+ uint8_t data[0];
} __attribute__ ((packed));
enum ipaccess_proto {
diff --git a/include/mgcp_ss7.h b/include/mgcp_ss7.h
index 04eeb5e..d3fae18 100644
--- a/include/mgcp_ss7.h
+++ b/include/mgcp_ss7.h
@@ -54,12 +54,12 @@ enum {
struct mgcp_ss7_cmd {
struct llist_head entry;
- u_int8_t type;
+ uint8_t type;
u_int32_t port;
u_int32_t param;
};
-void mgcp_ss7_exec(struct mgcp_ss7 *mgcp, u_int8_t type, u_int32_t port, u_int32_t param);
+void mgcp_ss7_exec(struct mgcp_ss7 *mgcp, uint8_t type, u_int32_t port, u_int32_t param);
struct mgcp_ss7 *mgcp_ss7_init(int endpoints, const char *local_ip, const char *mgw_ip, int base_port, int payload);
void mgcp_ss7_reset(struct mgcp_ss7 *mgcp);
diff --git a/include/mtp_data.h b/include/mtp_data.h
index d8cdff3..7006953 100644
--- a/include/mtp_data.h
+++ b/include/mtp_data.h
@@ -45,7 +45,7 @@ struct mtp_link {
int sccp_up;
/* misc data */
- u_int8_t test_ptrn[14];
+ uint8_t test_ptrn[14];
int sltm_pending;
struct llist_head pending_msgs;
@@ -68,7 +68,7 @@ struct mtp_link *mtp_link_alloc(void);
void mtp_link_stop(struct mtp_link *link);
void mtp_link_reset(struct mtp_link *link);
int mtp_link_data(struct mtp_link *link, struct msgb *msg);
-int mtp_link_submit_sccp_data(struct mtp_link *link, int sls, const u_int8_t *data, unsigned int length);
+int mtp_link_submit_sccp_data(struct mtp_link *link, int sls, const uint8_t *data, unsigned int length);
/* one time init function */
diff --git a/include/mtp_level3.h b/include/mtp_level3.h
index 46cde40..9c64e5c 100644
--- a/include/mtp_level3.h
+++ b/include/mtp_level3.h
@@ -99,7 +99,7 @@ static inline u_int16_t c_swap_16(u_int16_t in)
struct mtp_addr {
u_int16_t dpc;
u_int16_t opc;
- u_int8_t link;
+ uint8_t link;
} __attribute__((packed));
/*
@@ -108,24 +108,24 @@ struct mtp_addr {
*/
struct mtp_level_3_hdr {
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int8_t ser_ind : 4,
+ uint8_t ser_ind : 4,
spare : 2,
ni : 2;
#elif __BYTE_ORDER == __BIG_ENDIAN
- u_int8_t ni : 2,
+ uint8_t ni : 2,
spare : 2,
ser_ind : 4;
#endif
u_int32_t addr;
- u_int8_t data[0];
+ uint8_t data[0];
} __attribute__((packed));
struct mtp_level_3_cmn {
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int8_t h0 : 4,
+ uint8_t h0 : 4,
h1 : 4;
#elif __BYTE_ORDER == __BIG_ENDIAN
- u_int8_t h1 : 4,
+ uint8_t h1 : 4,
h0 : 4;
#endif
} __attribute__((packed));
@@ -133,13 +133,13 @@ struct mtp_level_3_cmn {
struct mtp_level_3_mng {
struct mtp_level_3_cmn cmn;
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int8_t spare : 4,
+ uint8_t spare : 4,
length : 4;
#elif __BYTE_ORDER == __BIG_ENDIAN
- u_int8_t length : 4,
+ uint8_t length : 4,
spare : 4;
#endif
- u_int8_t data[0];
+ uint8_t data[0];
} __attribute__((packed));
struct mtp_level_3_prohib {
@@ -149,14 +149,14 @@ struct mtp_level_3_prohib {
} __attribute__((packed));
struct sccp_con_ctrl_prt_mgt {
- u_int8_t sst;
- u_int8_t assn; /* affected sub system number */
+ uint8_t sst;
+ uint8_t assn; /* affected sub system number */
u_int16_t apoc;
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int8_t mul_ind : 2,
+ uint8_t mul_ind : 2,
spare : 6;
#elif __BYTE_ORDER == __BIG_ENDIAN
- u_int8_t spare : 6,
+ uint8_t spare : 6,
mul_ind : 2;
#endif
} __attribute__((packed));
diff --git a/include/mtp_pcap.h b/include/mtp_pcap.h
index 9334393..1b7334a 100644
--- a/include/mtp_pcap.h
+++ b/include/mtp_pcap.h
@@ -24,6 +24,6 @@
#include <sys/types.h>
int mtp_pcap_write_header(int fd);
-int mtp_pcap_write_msu(int fd, const u_int8_t *data, int length);
+int mtp_pcap_write_msu(int fd, const uint8_t *data, int length);
#endif
diff --git a/include/openbsc_nat/bssap.h b/include/openbsc_nat/bssap.h
index 8c785bb..4986f9d 100644
--- a/include/openbsc_nat/bssap.h
+++ b/include/openbsc_nat/bssap.h
@@ -36,14 +36,14 @@ enum BSSAP_MSG_TYPE {
};
struct bssmap_header {
- u_int8_t type;
- u_int8_t length;
+ uint8_t type;
+ uint8_t length;
} __attribute__((packed));
struct dtap_header {
- u_int8_t type;
- u_int8_t link_id;
- u_int8_t length;
+ uint8_t type;
+ uint8_t link_id;
+ uint8_t length;
} __attribute__((packed));
@@ -313,17 +313,17 @@ struct msgb *bssmap_create_layer3(struct msgb *msg);
struct msgb *bssmap_create_reset(void);
struct msgb *bssmap_create_clear_complete(void);
struct msgb *bssmap_create_cipher_complete(struct msgb *layer3);
-struct msgb *bssmap_create_cipher_reject(u_int8_t cause);
-struct msgb *bssmap_create_sapi_reject(u_int8_t link_id);
-struct msgb *bssmap_create_assignment_completed(struct gsm_lchan *lchan, u_int8_t rr_cause);
-struct msgb *bssmap_create_assignment_failure(u_int8_t cause, u_int8_t *rr_cause);
-struct msgb *bssmap_create_classmark_update(const u_int8_t *classmark, u_int8_t length);
+struct msgb *bssmap_create_cipher_reject(uint8_t cause);
+struct msgb *bssmap_create_sapi_reject(uint8_t link_id);
+struct msgb *bssmap_create_assignment_completed(struct gsm_lchan *lchan, uint8_t rr_cause);
+struct msgb *bssmap_create_assignment_failure(uint8_t cause, uint8_t *rr_cause);
+struct msgb *bssmap_create_classmark_update(const uint8_t *classmark, uint8_t length);
-void gsm0808_send_assignment_failure(struct gsm_lchan *l, u_int8_t cause, u_int8_t *rr_value);
-void gsm0808_send_assignment_compl(struct gsm_lchan *l, u_int8_t rr_value);
+void gsm0808_send_assignment_failure(struct gsm_lchan *l, uint8_t cause, uint8_t *rr_value);
+void gsm0808_send_assignment_compl(struct gsm_lchan *l, uint8_t rr_value);
int dtap_rcvmsg(struct gsm_lchan *lchan, struct msgb *msg, unsigned int length);
-struct msgb *dtap_create_msg(struct msgb *msg_l3, u_int8_t link_id);
+struct msgb *dtap_create_msg(struct msgb *msg_l3, uint8_t link_id);
void bsc_queue_connection_write(struct sccp_connection *conn, struct msgb *msg);
void bsc_free_queued(struct sccp_connection *conn);
diff --git a/include/openbsc_nat/tlv.h b/include/openbsc_nat/tlv.h
index 0fa8e40..a6ad48b 100644
--- a/include/openbsc_nat/tlv.h
+++ b/include/openbsc_nat/tlv.h
@@ -36,16 +36,16 @@ static inline u_int16_t TVLV_GROSS_LEN(u_int16_t len)
/* TLV generation */
-static inline u_int8_t *lv_put(u_int8_t *buf, u_int8_t len,
- const u_int8_t *val)
+static inline uint8_t *lv_put(uint8_t *buf, uint8_t len,
+ const uint8_t *val)
{
*buf++ = len;
memcpy(buf, val, len);
return buf + len;
}
-static inline u_int8_t *tlv_put(u_int8_t *buf, u_int8_t tag, u_int8_t len,
- const u_int8_t *val)
+static inline uint8_t *tlv_put(uint8_t *buf, uint8_t tag, uint8_t len,
+ const uint8_t *val)
{
*buf++ = tag;
*buf++ = len;
@@ -53,7 +53,7 @@ static inline u_int8_t *tlv_put(u_int8_t *buf, u_int8_t tag, u_int8_t len,
return buf + len;
}
-static inline u_int8_t *tlv16_put(u_int8_t *buf, u_int8_t tag, u_int8_t len,
+static inline uint8_t *tlv16_put(uint8_t *buf, uint8_t tag, uint8_t len,
const u_int16_t *val)
{
*buf++ = tag;
@@ -62,8 +62,8 @@ static inline u_int8_t *tlv16_put(u_int8_t *buf, u_int8_t tag, u_int8_t len,
return buf + len*2;
}
-static inline u_int8_t *tl16v_put(u_int8_t *buf, u_int8_t tag, u_int16_t len,
- const u_int8_t *val)
+static inline uint8_t *tl16v_put(uint8_t *buf, uint8_t tag, u_int16_t len,
+ const uint8_t *val)
{
*buf++ = tag;
*buf++ = len >> 8;
@@ -72,10 +72,10 @@ static inline u_int8_t *tl16v_put(u_int8_t *buf, u_int8_t tag, u_int16_t len,
return buf + len*2;
}
-static inline u_int8_t *tvlv_put(u_int8_t *buf, u_int8_t tag, u_int16_t len,
- const u_int8_t *val)
+static inline uint8_t *tvlv_put(uint8_t *buf, uint8_t tag, u_int16_t len,
+ const uint8_t *val)
{
- u_int8_t *ret;
+ uint8_t *ret;
if (len <= TVLV_MAX_ONEBYTE) {
ret = tlv_put(buf, tag, len, val);
@@ -86,30 +86,30 @@ static inline u_int8_t *tvlv_put(u_int8_t *buf, u_int8_t tag, u_int16_t len,
return ret;
}
-static inline u_int8_t *msgb_tlv16_put(struct msgb *msg, u_int8_t tag, u_int8_t len, const u_int16_t *val)
+static inline uint8_t *msgb_tlv16_put(struct msgb *msg, uint8_t tag, uint8_t len, const u_int16_t *val)
{
- u_int8_t *buf = msgb_put(msg, TLV16_GROSS_LEN(len));
+ uint8_t *buf = msgb_put(msg, TLV16_GROSS_LEN(len));
return tlv16_put(buf, tag, len, val);
}
-static inline u_int8_t *msgb_tl16v_put(struct msgb *msg, u_int8_t tag, u_int16_t len,
- const u_int8_t *val)
+static inline uint8_t *msgb_tl16v_put(struct msgb *msg, uint8_t tag, u_int16_t len,
+ const uint8_t *val)
{
- u_int8_t *buf = msgb_put(msg, TL16V_GROSS_LEN(len));
+ uint8_t *buf = msgb_put(msg, TL16V_GROSS_LEN(len));
return tl16v_put(buf, tag, len, val);
}
-static inline u_int8_t *msgb_tvlv_put(struct msgb *msg, u_int8_t tag, u_int16_t len,
- const u_int8_t *val)
+static inline uint8_t *msgb_tvlv_put(struct msgb *msg, uint8_t tag, u_int16_t len,
+ const uint8_t *val)
{
- u_int8_t *buf = msgb_put(msg, TVLV_GROSS_LEN(len));
+ uint8_t *buf = msgb_put(msg, TVLV_GROSS_LEN(len));
return tvlv_put(buf, tag, len, val);
}
-static inline u_int8_t *msgb_l16tv_put(struct msgb *msg, u_int16_t len, u_int8_t tag,
- const u_int8_t *val)
+static inline uint8_t *msgb_l16tv_put(struct msgb *msg, u_int16_t len, uint8_t tag,
+ const uint8_t *val)
{
- u_int8_t *buf = msgb_put(msg, L16TV_GROSS_LEN(len));
+ uint8_t *buf = msgb_put(msg, L16TV_GROSS_LEN(len));
*buf++ = len >> 8;
*buf++ = len & 0xff;
@@ -118,14 +118,14 @@ static inline u_int8_t *msgb_l16tv_put(struct msgb *msg, u_int16_t len, u_int8_t
return buf + len;
}
-static inline u_int8_t *v_put(u_int8_t *buf, u_int8_t val)
+static inline uint8_t *v_put(uint8_t *buf, uint8_t val)
{
*buf++ = val;
return buf;
}
-static inline u_int8_t *tv_put(u_int8_t *buf, u_int8_t tag,
- u_int8_t val)
+static inline uint8_t *tv_put(uint8_t *buf, uint8_t tag,
+ uint8_t val)
{
*buf++ = tag;
*buf++ = val;
@@ -133,7 +133,7 @@ static inline u_int8_t *tv_put(u_int8_t *buf, u_int8_t tag,
}
/* 'val' is still in host byte order! */
-static inline u_int8_t *tv16_put(u_int8_t *buf, u_int8_t tag,
+static inline uint8_t *tv16_put(uint8_t *buf, uint8_t tag,
u_int16_t val)
{
*buf++ = tag;
@@ -142,51 +142,51 @@ static inline u_int8_t *tv16_put(u_int8_t *buf, u_int8_t tag,
return buf;
}
-static inline u_int8_t *msgb_lv_put(struct msgb *msg, u_int8_t len, const u_int8_t *val)
+static inline uint8_t *msgb_lv_put(struct msgb *msg, uint8_t len, const uint8_t *val)
{
- u_int8_t *buf = msgb_put(msg, LV_GROSS_LEN(len));
+ uint8_t *buf = msgb_put(msg, LV_GROSS_LEN(len));
return lv_put(buf, len, val);
}
-static inline u_int8_t *msgb_tlv_put(struct msgb *msg, u_int8_t tag, u_int8_t len, const u_int8_t *val)
+static inline uint8_t *msgb_tlv_put(struct msgb *msg, uint8_t tag, uint8_t len, const uint8_t *val)
{
- u_int8_t *buf = msgb_put(msg, TLV_GROSS_LEN(len));
+ uint8_t *buf = msgb_put(msg, TLV_GROSS_LEN(len));
return tlv_put(buf, tag, len, val);
}
-static inline u_int8_t *msgb_tv_put(struct msgb *msg, u_int8_t tag, u_int8_t val)
+static inline uint8_t *msgb_tv_put(struct msgb *msg, uint8_t tag, uint8_t val)
{
- u_int8_t *buf = msgb_put(msg, 2);
+ uint8_t *buf = msgb_put(msg, 2);
return tv_put(buf, tag, val);
}
-static inline u_int8_t *msgb_v_put(struct msgb *msg, u_int8_t val)
+static inline uint8_t *msgb_v_put(struct msgb *msg, uint8_t val)
{
- u_int8_t *buf = msgb_put(msg, 1);
+ uint8_t *buf = msgb_put(msg, 1);
return v_put(buf, val);
}
-static inline u_int8_t *msgb_tv16_put(struct msgb *msg, u_int8_t tag, u_int16_t val)
+static inline uint8_t *msgb_tv16_put(struct msgb *msg, uint8_t tag, u_int16_t val)
{
- u_int8_t *buf = msgb_put(msg, 3);
+ uint8_t *buf = msgb_put(msg, 3);
return tv16_put(buf, tag, val);
}
-static inline u_int8_t *msgb_tlv_push(struct msgb *msg, u_int8_t tag, u_int8_t len, const u_int8_t *val)
+static inline uint8_t *msgb_tlv_push(struct msgb *msg, uint8_t tag, uint8_t len, const uint8_t *val)
{
- u_int8_t *buf = msgb_push(msg, TLV_GROSS_LEN(len));
+ uint8_t *buf = msgb_push(msg, TLV_GROSS_LEN(len));
return tlv_put(buf, tag, len, val);
}
-static inline u_int8_t *msgb_tv_push(struct msgb *msg, u_int8_t tag, u_int8_t val)
+static inline uint8_t *msgb_tv_push(struct msgb *msg, uint8_t tag, uint8_t val)
{
- u_int8_t *buf = msgb_push(msg, 2);
+ uint8_t *buf = msgb_push(msg, 2);
return tv_put(buf, tag, val);
}
-static inline u_int8_t *msgb_tv16_push(struct msgb *msg, u_int8_t tag, u_int16_t val)
+static inline uint8_t *msgb_tv16_push(struct msgb *msg, uint8_t tag, u_int16_t val)
{
- u_int8_t *buf = msgb_push(msg, 3);
+ uint8_t *buf = msgb_push(msg, 3);
return tv16_put(buf, tag, val);
}
@@ -194,7 +194,7 @@ static inline u_int8_t *msgb_tv16_push(struct msgb *msg, u_int8_t tag, u_int16_t
struct tlv_p_entry {
u_int16_t len;
- const u_int8_t *val;
+ const uint8_t *val;
};
enum tlv_type {
@@ -208,7 +208,7 @@ enum tlv_type {
struct tlv_def {
enum tlv_type type;
- u_int8_t fixed_len;
+ uint8_t fixed_len;
};
struct tlv_definition {
@@ -221,11 +221,11 @@ struct tlv_parsed {
extern struct tlv_definition tvlv_att_def;
-int tlv_parse_one(u_int8_t *o_tag, u_int16_t *o_len, const u_int8_t **o_val,
+int tlv_parse_one(uint8_t *o_tag, u_int16_t *o_len, const uint8_t **o_val,
const struct tlv_definition *def,
- const u_int8_t *buf, int buf_len);
+ const uint8_t *buf, int buf_len);
int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def,
- const u_int8_t *buf, int buf_len, u_int8_t lv_tag, u_int8_t lv_tag2);
+ const uint8_t *buf, int buf_len, uint8_t lv_tag, uint8_t lv_tag2);
#define TLVP_PRESENT(x, y) ((x)->lv[y].val)
#define TLVP_LEN(x, y) (x)->lv[y].len