libosmogsm  0.10.2.279.178b
Osmocom GSM library
gsm0480.h File Reference

Go to the source code of this file.

Data Structures

struct  ussd_request
 
struct  ss_request
 This structure represents some meaningful parts of a decoded and/or to be encoded GSM 04.80 message. More...
 

Macros

#define GSM0480_USSD_OCTET_STRING_LEN   160
 According to the GSM 04.80 (version 5.0.0) specification Annex A "Expanded ASN.1 Module "SS-Protocol", the maximum size of a USSD OCTET STRING field is 160 bytes. More...
 
#define GSM0480_USSD_7BIT_STRING_LEN   182
 Thus according to ETSI TS 123 038 (version 10.0.0) specification 6.1.2.3 "USSD packing of 7 bit characters", in 160 octets, it's possible to pack (160 * 8) / 7 = 182.8, that is 182 characters. More...
 
#define MAX_LEN_USSD_STRING   31
 DEPRECATED: this definition doesn't follow any specification, so we only keep it for compatibility reasons. More...
 

Functions

int gsm0480_decode_ussd_request (const struct gsm48_hdr *hdr, uint16_t len, struct ussd_request *request) OSMO_DEPRECATED("Use gsm0480_decode_ss_request() instead")
 
int gsm0480_decode_ss_request (const struct gsm48_hdr *hdr, uint16_t len, struct ss_request *request)
 
struct msgbgsm0480_create_ussd_resp (uint8_t invoke_id, uint8_t trans_id, const char *text)
 
struct msgbgsm0480_create_unstructuredSS_Notify (int alertPattern, const char *text)
 
struct msgbgsm0480_create_notifySS (const char *text)
 
struct msgbgsm0480_create_ussd_notify (int level, const char *text)
 
struct msgbgsm0480_create_ussd_release_complete (void)
 
int gsm0480_wrap_invoke (struct msgb *msg, int op, int link_id)
 
int gsm0480_wrap_facility (struct msgb *msg)
 
struct gsm48_hdrgsm0480_l3hdr_push (struct msgb *msg, uint8_t proto_discr, uint8_t msg_type)
 

Macro Definition Documentation

◆ GSM0480_USSD_7BIT_STRING_LEN

#define GSM0480_USSD_7BIT_STRING_LEN   182

Thus according to ETSI TS 123 038 (version 10.0.0) specification 6.1.2.3 "USSD packing of 7 bit characters", in 160 octets, it's possible to pack (160 * 8) / 7 = 182.8, that is 182 characters.

The remaining 6 bits are set to zero.

◆ GSM0480_USSD_OCTET_STRING_LEN

#define GSM0480_USSD_OCTET_STRING_LEN   160

According to the GSM 04.80 (version 5.0.0) specification Annex A "Expanded ASN.1 Module "SS-Protocol", the maximum size of a USSD OCTET STRING field is 160 bytes.

Referenced by parse_process_uss_data(), and parse_process_uss_req().

◆ MAX_LEN_USSD_STRING

#define MAX_LEN_USSD_STRING   31

DEPRECATED: this definition doesn't follow any specification, so we only keep it for compatibility reasons.

It's strongly recommended to use correct definitions above.

Function Documentation

◆ gsm0480_create_notifySS()

◆ gsm0480_create_unstructuredSS_Notify()

struct msgb* gsm0480_create_unstructuredSS_Notify ( int  alertPattern,
const char *  text 
)

◆ gsm0480_create_ussd_notify()

◆ gsm0480_create_ussd_release_complete()

struct msgb* gsm0480_create_ussd_release_complete ( void  )

◆ gsm0480_create_ussd_resp()

◆ gsm0480_decode_ss_request()

int gsm0480_decode_ss_request ( const struct gsm48_hdr hdr,
uint16_t  len,
struct ss_request request 
)

Check Protocol Discriminator see TS GSM 04.07 and GSM 04.80

References gsm48_hdr_pdisc(), GSM48_PDISC_NC_SS, LOGL_ERROR, LOGP, parse_ss(), pdisc, gsm48_hdr::proto_discr, and ss_request::transaction_id.

◆ gsm0480_decode_ussd_request()

◆ gsm0480_l3hdr_push()

struct gsm48_hdr* gsm0480_l3hdr_push ( struct msgb msg,
uint8_t  proto_discr,
uint8_t  msg_type 
)

◆ gsm0480_wrap_facility()

int gsm0480_wrap_facility ( struct msgb msg)

◆ gsm0480_wrap_invoke()

int gsm0480_wrap_invoke ( struct msgb msg,
int  op,
int  link_id 
)