diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-26 03:41:11 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-26 03:55:57 +0800 |
commit | 6a4b362ceb7dd1742de2d1ffebadf1846634a3af (patch) | |
tree | 5842a7e0b18cf88f0d5b24bb1e48888ae65f844e /openbsc/src/gsm_04_80.c | |
parent | 680833e2ba26b4e996046cee6de3cbb37d350083 (diff) |
gsm0480: Implement a generic "invoke" wrapping for messages.
Implement a GSM 04.80 invoke wrapper for a component and an
invoke id.
Diffstat (limited to 'openbsc/src/gsm_04_80.c')
-rw-r--r-- | openbsc/src/gsm_04_80.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/openbsc/src/gsm_04_80.c b/openbsc/src/gsm_04_80.c index f2a0728f2..71fb40577 100644 --- a/openbsc/src/gsm_04_80.c +++ b/openbsc/src/gsm_04_80.c @@ -360,6 +360,27 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn, return gsm0808_submit_dtap(conn, msg, 0); } +/* wrap an invoke around it... the other way around + * + * 1.) Invoke Component tag + * 2.) Invoke ID Tag + * 3.) Operation + * 4.) Data + */ +int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id) +{ + /* 3. operation */ + msgb_push_TLV1(msg, GSM0480_OPERATION_CODE, op); + + /* 2. invoke id tag */ + msgb_push_TLV1(msg, GSM0480_COMPIDTAG_INVOKE_ID, link_id); + + /* 1. component tag */ + msgb_wrap_with_TL(msg, GSM0480_CTYPE_INVOKE); + + return 0; +} + int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, const struct ussd_request *req) |