Harald Welte | 1e90866 | 2010-03-07 23:39:54 +0100 | [diff] [blame] | 1 | #ifndef _OSMOCORE_MNCC_H |
| 2 | #define _OSMOCORE_MNCC_H |
| 3 | |
Harald Welte | c8a0b93 | 2012-08-24 21:27:26 +0200 | [diff] [blame] | 4 | #include <osmocom/gsm/protocol/gsm_04_08.h> |
| 5 | |
Harald Welte | 1e90866 | 2010-03-07 23:39:54 +0100 | [diff] [blame] | 6 | #define GSM_MAX_FACILITY 128 |
| 7 | #define GSM_MAX_SSVERSION 128 |
| 8 | #define GSM_MAX_USERUSER 128 |
| 9 | |
| 10 | /* Expanded fields from GSM TS 04.08, Table 10.5.102 */ |
| 11 | struct gsm_mncc_bearer_cap { |
| 12 | int transfer; /* Information Transfer Capability */ |
| 13 | int mode; /* Transfer Mode */ |
| 14 | int coding; /* Coding Standard */ |
| 15 | int radio; /* Radio Channel Requirement */ |
| 16 | int speech_ctm; /* CTM text telephony indication */ |
| 17 | int speech_ver[8]; /* Speech version indication */ |
Harald Welte | c8a0b93 | 2012-08-24 21:27:26 +0200 | [diff] [blame] | 18 | struct { |
| 19 | enum gsm48_bcap_ra rate_adaption; |
| 20 | enum gsm48_bcap_sig_access sig_access; |
| 21 | int async; |
| 22 | int nr_stop_bits; |
| 23 | int nr_data_bits; |
| 24 | enum gsm48_bcap_user_rate user_rate; |
| 25 | enum gsm48_bcap_parity parity; |
| 26 | enum gsm48_bcap_interm_rate interm_rate; |
| 27 | enum gsm48_bcap_transp transp; |
| 28 | enum gsm48_bcap_modem_type modem_type; |
| 29 | } data; |
Harald Welte | 1e90866 | 2010-03-07 23:39:54 +0100 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | struct gsm_mncc_number { |
| 33 | int type; |
| 34 | int plan; |
| 35 | int present; |
| 36 | int screen; |
| 37 | char number[33]; |
| 38 | }; |
| 39 | |
| 40 | struct gsm_mncc_cause { |
| 41 | int location; |
| 42 | int coding; |
| 43 | int rec; |
| 44 | int rec_val; |
| 45 | int value; |
| 46 | int diag_len; |
| 47 | char diag[32]; |
| 48 | }; |
| 49 | |
| 50 | struct gsm_mncc_useruser { |
| 51 | int proto; |
| 52 | char info[GSM_MAX_USERUSER + 1]; /* + termination char */ |
| 53 | }; |
| 54 | |
| 55 | struct gsm_mncc_progress { |
| 56 | int coding; |
| 57 | int location; |
| 58 | int descr; |
| 59 | }; |
| 60 | |
| 61 | struct gsm_mncc_facility { |
| 62 | int len; |
| 63 | char info[GSM_MAX_FACILITY]; |
| 64 | }; |
| 65 | |
| 66 | struct gsm_mncc_ssversion { |
| 67 | int len; |
| 68 | char info[GSM_MAX_SSVERSION]; |
| 69 | }; |
| 70 | |
| 71 | struct gsm_mncc_cccap { |
| 72 | int dtmf; |
| 73 | int pcp; |
| 74 | }; |
| 75 | |
| 76 | enum { |
| 77 | GSM_MNCC_BCAP_SPEECH = 0, |
| 78 | GSM_MNCC_BCAP_UNR_DIG = 1, |
| 79 | GSM_MNCC_BCAP_AUDIO = 2, |
| 80 | GSM_MNCC_BCAP_FAX_G3 = 3, |
| 81 | GSM_MNCC_BCAP_OTHER_ITC = 5, |
| 82 | GSM_MNCC_BCAP_RESERVED = 7, |
| 83 | }; |
| 84 | |
| 85 | #endif |