diff options
author | Harald Welte <laforge@gnumonks.org> | 2008-12-27 01:55:51 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2008-12-27 01:55:51 +0000 |
commit | 4b634544e6ac1d09efeae804269ed8cb808bd98e (patch) | |
tree | 70cdf31bfa1aa66094bb150ed9339b961f3fc8a2 /include/openbsc | |
parent | faaa49ca5136bc805b26240e783a09115b8ce075 (diff) |
now we get up to the SETUP of MO calls
Diffstat (limited to 'include/openbsc')
-rw-r--r-- | include/openbsc/abis_rsl.h | 16 | ||||
-rw-r--r-- | include/openbsc/gsm_04_08.h | 21 | ||||
-rw-r--r-- | include/openbsc/tlv.h | 22 |
3 files changed, 57 insertions, 2 deletions
diff --git a/include/openbsc/abis_rsl.h b/include/openbsc/abis_rsl.h index 219fdd3db..769672824 100644 --- a/include/openbsc/abis_rsl.h +++ b/include/openbsc/abis_rsl.h @@ -244,6 +244,22 @@ struct rsl_ie_chan_ident { #endif } __attribute__ ((packed)); +/* Chapter 9.3.22 */ +#define RLL_CAUSE_T200_EXPIRED 0x01 +#define RLL_CAUSE_REEST_REQ 0x02 +#define RLL_CAUSE_UNSOL_UA_RESP 0x03 +#define RLL_CAUSE_UNSOL_DM_RESP 0x04 +#define RLL_CAUSE_UNSOL_DM_RESP_MF 0x05 +#define RLL_CAUSE_UNSOL_SPRV_RESP 0x06 +#define RLL_CAUSE_SEQ_ERR 0x07 +#define RLL_CAUSE_UFRM_INC_PARAM 0x08 +#define RLL_CAUSE_SFRM_INC_PARAM 0x09 +#define RLL_CAUSE_IFRM_INC_MBITS 0x0a +#define RLL_CAUSE_IFRM_INC_LEN 0x0b +#define RLL_CAUSE_FRM_UNIMPL 0x0c +#define RLL_CAUSE_SABM_MF 0x0d +#define RLL_CAUSE_SABM_INFO_NOTALL 0x0e + /* Chapter 9.3.26 */ #define RSL_ERRCLS_NORMAL 0x00 #define RSL_ERRCLS_RESOURCE_UNAVAIL 0x20 diff --git a/include/openbsc/gsm_04_08.h b/include/openbsc/gsm_04_08.h index dc5eba9ae..389daf596 100644 --- a/include/openbsc/gsm_04_08.h +++ b/include/openbsc/gsm_04_08.h @@ -46,6 +46,7 @@ struct gsm48_imm_ass { u_int8_t mob_alloc[0]; }; +/* Chapter 10.5.1.3 */ struct gsm48_loc_area_id { u_int8_t digits[3]; /* BCD! */ u_int16_t lac; @@ -57,7 +58,6 @@ struct gsm48_loc_upd_req { key_seq:4; struct gsm48_loc_area_id lai; u_int8_t classmark1; - u_int8_t ie_mi; u_int8_t mi_len; u_int8_t mi[0]; } __attribute__ ((packed)); @@ -70,7 +70,7 @@ struct gsm48_hdr { } __attribute__ ((packed)); /* Section 10.2 */ -#define GSM48_PDISC_CC 0x02 +#define GSM48_PDISC_CC 0x03 #define GSM48_PDISC_MM 0x05 #define GSM48_PDISC_RR 0x06 #define GSM48_PDISC_MM_GPRS 0x08 @@ -235,6 +235,23 @@ struct gsm48_hdr { #define GSM_MI_TYPE_TMSI 0x04 #define GSM_MI_ODD 0x08 +#define GSM48_IE_MOBILE_ID 0x17 + +/* Section 10.5.4.11 / Table 10.5.122 */ +#define GSM48_CAUSE_CS_GSM 0x60 + +enum gsm48_cause_loc { + GSM48_CAUSE_LOC_USER = 0x00, + GSM48_CAUSE_LOC_PRN_S_LU = 0x01, + GSM48_CAUSE_LOC_PUN_S_LU = 0x02, + GSM48_CAUSE_LOC_TRANS_NET = 0x03, + GSM48_CAUSE_LOC_PUN_S_RU = 0x04, + GSM48_CAUSE_LOC_PRN_S_RU = 0x05, + /* not defined */ + GSM48_CAUSE_LOC_INN_NET = 0x07, + GSM48_CAUSE_LOC_NET_BEYOND = 0x0a, +}; + struct msgb; struct gsm_bts; diff --git a/include/openbsc/tlv.h b/include/openbsc/tlv.h index 38ca81150..70d0319e8 100644 --- a/include/openbsc/tlv.h +++ b/include/openbsc/tlv.h @@ -57,6 +57,15 @@ static inline u_int8_t *tv_put(u_int8_t *buf, u_int8_t tag, return buf; } +static inline u_int8_t *tv16_put(u_int8_t *buf, u_int8_t tag, + u_int16_t val) +{ + *buf++ = tag; + *buf++ = val >> 8; + *buf++ = val & 0xff; + return buf; +} + static inline u_int8_t *msgb_tlv_put(struct msgb *msg, u_int8_t tag, u_int8_t len, const u_int8_t *val) { u_int8_t *buf = msgb_put(msg, TLV_GROSS_LEN(len)); @@ -69,6 +78,12 @@ static inline u_int8_t *msgb_tv_put(struct msgb *msg, u_int8_t tag, u_int8_t val return tv_put(buf, tag, val); } +static inline u_int8_t *msgb_tv16_put(struct msgb *msg, u_int8_t tag, u_int16_t val) +{ + u_int8_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) { u_int8_t *buf = msgb_push(msg, TLV_GROSS_LEN(len)); @@ -81,4 +96,11 @@ static inline u_int8_t *msgb_tv_push(struct msgb *msg, u_int8_t tag, u_int8_t va 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) +{ + u_int8_t *buf = msgb_push(msg, 3); + return tv16_put(buf, tag, val); +} + + #endif /* _TLV_H */ |