libosmogsm  0.9.6-9.20170220git32ee5af8.fc30
Osmocom GSM library
gsm0480.h
1 #pragma once
2 
3 #include <osmocom/core/defs.h>
4 #include <osmocom/core/msgb.h>
5 #include <osmocom/gsm/protocol/gsm_04_08.h>
6 #include <osmocom/gsm/protocol/gsm_04_80.h>
7 
8 #define MAX_LEN_USSD_STRING 31
9 
10 /* deprecated */
11 struct ussd_request {
12  char text[MAX_LEN_USSD_STRING + 1];
13  uint8_t transaction_id;
14  uint8_t invoke_id;
15 };
16 
17 /* deprecated */
18 int gsm0480_decode_ussd_request(const struct gsm48_hdr *hdr, uint16_t len,
19  struct ussd_request *request) OSMO_DEPRECATED("Use gsm0480_decode_ss_request() instead");
20 
21 struct ss_request {
22  uint8_t opcode;
23  uint8_t ss_code;
24  uint8_t ussd_text[MAX_LEN_USSD_STRING + 1];
25  uint8_t transaction_id;
26  uint8_t invoke_id;
27 };
28 
29 int gsm0480_decode_ss_request(const struct gsm48_hdr *hdr, uint16_t len,
30  struct ss_request *request);
31 
32 struct msgb *gsm0480_create_ussd_resp(uint8_t invoke_id, uint8_t trans_id, const char *text);
33 struct msgb *gsm0480_create_unstructuredSS_Notify(int alertPattern, const char *text);
34 struct msgb *gsm0480_create_notifySS(const char *text);
35 struct msgb *gsm0480_create_ussd_notify(int level, const char *text);
36 struct msgb *gsm0480_create_ussd_release_complete(void);
37 
38 int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id);
39 int gsm0480_wrap_facility(struct msgb *msg);
40 
41 struct gsm48_hdr *gsm0480_l3hdr_push(struct msgb *msg, uint8_t proto_discr,
42  uint8_t msg_type);
Definition: gsm0480.h:21
Definition: gsm_04_08.h:598
uint8_t link_id
RSL link identifier (value)
Definition: gsm_08_58.h:445
Definition: gsm0480.h:11
uint8_t msg_type
message type (abis_rsl_msgtype)
Definition: gsm_08_58.h:442