summaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-02 11:26:34 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-04 07:20:43 +0200
commit8f9a3ee67bf25b62936ffbcd88936936916ad0e9 (patch)
tree26665a88ef2717a1af30868d2e76d18247fafb67 /openbsc/include
parent30bc19a5c6b171142569a00739a52db008eb8ba6 (diff)
[gprs] Use stdint.h types (uintXX_t instead of u_intXX_t)
libosmocore already uses them, it's time (at least for new code) in openbsc to do the same.
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gprs_bssgp.h16
-rw-r--r--openbsc/include/openbsc/gprs_ns.h16
2 files changed, 18 insertions, 14 deletions
diff --git a/openbsc/include/openbsc/gprs_bssgp.h b/openbsc/include/openbsc/gprs_bssgp.h
index a00481e4..c70868af 100644
--- a/openbsc/include/openbsc/gprs_bssgp.h
+++ b/openbsc/include/openbsc/gprs_bssgp.h
@@ -1,6 +1,8 @@
#ifndef _GPRS_BSSGP_H
#define _GPRS_BSSGP_H
+#include <stdint.h>
+
/* Section 11.3.26 / Table 11.27 */
enum bssgp_pdu_type {
/* PDUs between RL and BSSGP SAPs */
@@ -49,15 +51,15 @@ enum bssgp_pdu_type {
/* Section 10.2.1 and 10.2.2 */
struct bssgp_ud_hdr {
- u_int8_t pdu_type;
- u_int32_t tlli;
- u_int8_t qos_profile[3];
- u_int8_t data[0]; /* TLV's */
+ uint8_t pdu_type;
+ uint32_t tlli;
+ uint8_t qos_profile[3];
+ uint8_t data[0]; /* TLV's */
} __attribute__((packed));
struct bssgp_normal_hdr {
- u_int8_t pdu_type;
- u_int8_t data[0]; /* TLV's */
+ uint8_t pdu_type;
+ uint8_t data[0]; /* TLV's */
};
enum bssgp_iei_type {
@@ -140,7 +142,7 @@ enum gprs_bssgp_cause {
extern int gprs_bssgp_rcvmsg(struct msgb *msg);
/* Wrapper around TLV parser to parse BSSGP IEs */
-static inline int bssgp_tlv_parse(struct tlv_parsed *tp, u_int8_t *buf, int len)
+static inline int bssgp_tlv_parse(struct tlv_parsed *tp, uint8_t *buf, int len)
{
return tlv_parse(tp, &tvlv_att_def, buf, len, 0, 0);
}
diff --git a/openbsc/include/openbsc/gprs_ns.h b/openbsc/include/openbsc/gprs_ns.h
index ca02c4b5..573536d1 100644
--- a/openbsc/include/openbsc/gprs_ns.h
+++ b/openbsc/include/openbsc/gprs_ns.h
@@ -1,13 +1,15 @@
#ifndef _GPRS_NS_H
#define _GPRS_NS_H
+#include <stdint.h>
+
/* GPRS Networks Service (NS) messages on the Gb interface
* 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05)
* 3GPP TS 48.016 version 6.5.0 Release 6 / ETSI TS 148 016 V6.5.0 (2005-11) */
struct gprs_ns_hdr {
- u_int8_t pdu_type;
- u_int8_t data[0];
+ uint8_t pdu_type;
+ uint8_t data[0];
} __attribute__((packed));
/* TS 08.16, Section 10.3.7, Table 14 */
@@ -95,7 +97,7 @@ enum gprs_ns_evt {
struct gprs_nsvc;
typedef int gprs_ns_cb_t(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,
- struct msgb *msg, u_int16_t bvci);
+ struct msgb *msg, uint16_t bvci);
/* An instance of the NS protocol stack */
struct gprs_ns_inst {
@@ -120,11 +122,11 @@ struct gprs_nsvc {
struct llist_head list;
struct gprs_ns_inst *nsi;
- u_int16_t nsei; /* end-to-end significance */
- u_int16_t nsvci; /* uniquely identifies NS-VC at SGSN */
+ uint16_t nsei; /* end-to-end significance */
+ uint16_t nsvci; /* uniquely identifies NS-VC at SGSN */
- u_int32_t state;
- u_int32_t remote_state;
+ uint32_t state;
+ uint32_t remote_state;
struct timer_list alive_timer;
int timer_is_tns_alive;