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