gsm0480: Implement a generic "invoke" wrapping for messages.
Implement a GSM 04.80 invoke wrapper for a component and an invoke id.
This commit is contained in:
parent
680833e2ba
commit
6a4b362ceb
|
@ -24,5 +24,6 @@ int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn,
|
|||
const struct ussd_request *request);
|
||||
|
||||
struct msgb * gsm0480_create_notifySS(const char *text);
|
||||
int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue