diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 19:39:27 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 19:39:27 +0800 |
commit | 2c0f16699e80ab492e3b7f8ad3de181ca90e5ef1 (patch) | |
tree | 39db270faf2221618758c9564bb01b7f8c7d0aef /openbsc/src/gsm_04_08_utils.c | |
parent | 580cb83ae38882a5106de1a9c1bd35bf25bf9bda (diff) |
gsm48: Separate CM Service Reject sending and creation.
Split out the msg generation from the sending, this will
be used by the nat to send a refusal message.
Diffstat (limited to 'openbsc/src/gsm_04_08_utils.c')
-rw-r--r-- | openbsc/src/gsm_04_08_utils.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c index 5a8ded784..eb8c03413 100644 --- a/openbsc/src/gsm_04_08_utils.c +++ b/openbsc/src/gsm_04_08_utils.c @@ -564,3 +564,20 @@ int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg) return 0; } + +struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value) +{ + struct msgb *msg; + struct gsm48_hdr *gh; + + msg = gsm48_msgb_alloc(); + if (!msg) + return NULL; + + gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 1); + gh->proto_discr = GSM48_PDISC_MM; + gh->msg_type = GSM48_MT_MM_CM_SERV_REJ; + gh->data[0] = value; + + return msg; +} |