15 } __attribute__ ((packed));
39 } __attribute__ ((packed));
74 } __attribute__ ((packed));
78 uint8_t orig_arfcn_hi:1,
80 uint8_t orig_arfcn_mid;
109 } __attribute__ ((packed));
113 uint8_t orig_arfcn_hi:1,
115 uint8_t orig_arfcn_mid;
150 } __attribute__ ((packed));
154 uint8_t orig_arfcn_hi:1,
156 uint8_t orig_arfcn_mid;
193 } __attribute__ ((packed));
197 uint8_t orig_arfcn_hi:1,
199 uint8_t orig_arfcn_mid;
202 uint8_t rrfcn8_111[13];
203 } __attribute__ ((packed));
215 } __attribute__ ((packed)) h1;
217 uint8_t arfcn_high:2,
222 } __attribute__ ((packed)) h0;
223 } __attribute__ ((packed));
224 } __attribute__ ((packed));
228 uint8_t rxlev_full:6,
234 uint8_t no_nc_n_hi:1,
240 uint8_t bsic_nc1_hi:3,
242 uint8_t rxlev_nc2_hi:5,
244 uint8_t bsic_nc2_hi:2,
247 uint8_t rxlev_nc3_hi:4,
249 uint8_t bsic_nc3_hi:1,
252 uint8_t rxlev_nc4_hi:3,
254 uint8_t bcch_f_nc4:5,
256 uint8_t rxlev_nc5_hi:2,
258 uint8_t bcch_f_nc5_hi:4,
260 uint8_t rxlev_nc6_hi:1,
263 uint8_t bcch_f_nc6_hi:3,
267 } __attribute__ ((packed));
284 } __attribute__((packed));
288 uint8_t power_level:5,
291 } __attribute__((packed));
301 } __attribute__ ((packed));
311 } __attribute__ ((packed));
319 } __attribute__ ((packed));
327 } __attribute__((packed));
337 } __attribute__ ((packed));
339 enum gsm48_chan_mode {
340 GSM48_CMODE_SIGN = 0x00,
341 GSM48_CMODE_SPEECH_V1 = 0x01,
342 GSM48_CMODE_SPEECH_EFR = 0x21,
343 GSM48_CMODE_SPEECH_AMR = 0x41,
344 GSM48_CMODE_DATA_14k5 = 0x0f,
345 GSM48_CMODE_DATA_12k0 = 0x03,
346 GSM48_CMODE_DATA_6k0 = 0x0b,
347 GSM48_CMODE_DATA_3k6 = 0x13,
354 uint8_t power_command;
356 } __attribute__((packed));
362 uint8_t mob_alloc_len;
363 uint8_t mob_alloc[0];
364 } __attribute__((packed));
372 } __attribute__((packed));
379 uint8_t power_command;
381 } __attribute__((packed));
391 uint8_t timing_advance;
392 uint8_t mob_alloc_len;
393 uint8_t mob_alloc[0];
394 } __attribute__ ((packed));
403 } __attribute__ ((packed));
409 } __attribute__ ((packed));
416 } __attribute__ ((packed));
421 } __attribute__ ((packed));
431 } __attribute__ ((packed));
438 } __attribute__ ((packed));
443 uint8_t rr_protocol_discriminator :4,
445 uint8_t system_information;
446 } __attribute__ ((packed));
450 uint8_t ms_txpwr_max_ccch:5,
452 uint8_t rxlev_acc_min:6,
455 } __attribute__ ((packed));
459 uint8_t ccch_conf :3,
463 uint8_t bs_pa_mfrms : 3,
466 } __attribute__ ((packed));
469 uint8_t radio_link_timeout:4,
473 } __attribute__ ((packed));
477 uint8_t cm_service_type : 4,
484 } __attribute__ ((packed));
489 uint8_t cell_channel_description[16];
491 uint8_t rest_octets[0];
492 } __attribute__ ((packed));
497 uint8_t bcch_frequency_list[16];
498 uint8_t ncc_permitted;
500 } __attribute__ ((packed));
505 uint8_t bcch_frequency_list[16];
507 uint8_t rest_octets[0];
508 } __attribute__ ((packed));
513 uint8_t ext_bcch_frequency_list[16];
514 uint8_t rest_octets[0];
515 } __attribute__ ((packed));
520 uint8_t rest_octets[0];
521 } __attribute__ ((packed));
526 uint16_t cell_identity;
532 uint8_t rest_octets[0];
533 } __attribute__ ((packed));
545 } __attribute__ ((packed));
549 uint8_t rr_protocol_discriminator :4,
551 uint8_t system_information;
552 uint8_t bcch_frequency_list[16];
553 } __attribute__ ((packed));
557 uint8_t rr_protocol_discriminator :4,
559 uint8_t system_information;
560 uint8_t bcch_frequency_list[16];
561 } __attribute__ ((packed));
565 uint8_t rr_protocol_discriminator :4,
567 uint8_t system_information;
568 uint8_t bcch_frequency_list[16];
569 } __attribute__ ((packed));
573 uint8_t rr_protocol_discriminator :4,
575 uint8_t system_information;
576 uint16_t cell_identity;
579 uint8_t ncc_permitted;
580 uint8_t rest_octets[0];
581 } __attribute__ ((packed));
586 uint8_t rest_octets[0];
587 } __attribute__ ((packed));
594 } __attribute__ ((packed));
601 } __attribute__((packed));
606 } __attribute__((packed));
611 } __attribute__((packed));
617 } __attribute__((packed));
622 } __attribute__((packed));
628 } __attribute__((packed));
636 } __attribute__((packed));
643 } __attribute__((packed));
653 uint8_t timing_advance1;
656 uint8_t timing_advance2;
657 uint8_t mob_alloc_len;
658 uint8_t mob_alloc[0];
659 } __attribute__ ((packed));
676 } __attribute__ ((packed));
688 } __attribute__((packed));
702 } __attribute__((packed));
721 } __attribute__((packed));
730 } __attribute__((packed));
735 } __attribute__((packed));
738 #define GSM48_PDISC_GROUP_CC 0x00
739 #define GSM48_PDISC_BCAST_CC 0x01
740 #define GSM48_PDISC_PDSS1 0x02
741 #define GSM48_PDISC_CC 0x03
742 #define GSM48_PDISC_PDSS2 0x04
743 #define GSM48_PDISC_MM 0x05
744 #define GSM48_PDISC_RR 0x06
745 #define GSM48_PDISC_MM_GPRS 0x08
746 #define GSM48_PDISC_SMS 0x09
747 #define GSM48_PDISC_SM_GPRS 0x0a
748 #define GSM48_PDISC_NC_SS 0x0b
749 #define GSM48_PDISC_LOC 0x0c
750 #define GSM48_PDISC_EXTEND 0x0e
751 #define GSM48_PDISC_MASK 0x0f
752 #define GSM48_PDISC_USSD 0x11
754 static inline uint8_t gsm48_hdr_pdisc(
const struct gsm48_hdr *hdr)
760 uint8_t pdisc = hdr->proto_discr & GSM48_PDISC_MASK;
761 if (pdisc == GSM48_PDISC_EXTEND)
762 return hdr->proto_discr;
766 static inline uint8_t gsm48_hdr_trans_id(
const struct gsm48_hdr *hdr)
772 return (hdr->proto_discr & 0xf0) >> 4;
775 static inline uint8_t gsm48_hdr_trans_id_flip_ti(
const struct gsm48_hdr *hdr)
777 return gsm48_hdr_trans_id(hdr) ^ 0x08;
780 static inline uint8_t gsm48_hdr_trans_id_no_ti(
const struct gsm48_hdr *hdr)
782 return gsm48_hdr_trans_id(hdr) & 0x07;
785 static inline uint8_t gsm48_hdr_msg_type_r98(
const struct gsm48_hdr *hdr)
792 switch (gsm48_hdr_pdisc(hdr)) {
795 case GSM48_PDISC_NC_SS:
796 case GSM48_PDISC_GROUP_CC:
797 case GSM48_PDISC_BCAST_CC:
798 case GSM48_PDISC_LOC:
799 return hdr->msg_type & 0xbf;
801 return hdr->msg_type;
805 static inline uint8_t gsm48_hdr_msg_type_r99(
const struct gsm48_hdr *hdr)
812 switch (gsm48_hdr_pdisc(hdr)) {
815 return hdr->msg_type & 0x3f;
816 case GSM48_PDISC_NC_SS:
817 case GSM48_PDISC_GROUP_CC:
818 case GSM48_PDISC_BCAST_CC:
819 case GSM48_PDISC_LOC:
820 return hdr->msg_type & 0xbf;
822 return hdr->msg_type;
826 #define gsm48_hdr_msg_type gsm48_hdr_msg_type_r99
829 #define GSM48_MT_RR_INIT_REQ 0x3c
830 #define GSM48_MT_RR_ADD_ASS 0x3b
831 #define GSM48_MT_RR_IMM_ASS 0x3f
832 #define GSM48_MT_RR_IMM_ASS_EXT 0x39
833 #define GSM48_MT_RR_IMM_ASS_REJ 0x3a
835 #define GSM48_MT_RR_CIPH_M_CMD 0x35
836 #define GSM48_MT_RR_CIPH_M_COMPL 0x32
838 #define GSM48_MT_RR_CFG_CHG_CMD 0x30
839 #define GSM48_MT_RR_CFG_CHG_ACK 0x31
840 #define GSM48_MT_RR_CFG_CHG_REJ 0x33
842 #define GSM48_MT_RR_ASS_CMD 0x2e
843 #define GSM48_MT_RR_ASS_COMPL 0x29
844 #define GSM48_MT_RR_ASS_FAIL 0x2f
845 #define GSM48_MT_RR_HANDO_CMD 0x2b
846 #define GSM48_MT_RR_HANDO_COMPL 0x2c
847 #define GSM48_MT_RR_HANDO_FAIL 0x28
848 #define GSM48_MT_RR_HANDO_INFO 0x2d
850 #define GSM48_MT_RR_CELL_CHG_ORDER 0x08
851 #define GSM48_MT_RR_PDCH_ASS_CMD 0x23
853 #define GSM48_MT_RR_CHAN_REL 0x0d
854 #define GSM48_MT_RR_PART_REL 0x0a
855 #define GSM48_MT_RR_PART_REL_COMP 0x0f
857 #define GSM48_MT_RR_PAG_REQ_1 0x21
858 #define GSM48_MT_RR_PAG_REQ_2 0x22
859 #define GSM48_MT_RR_PAG_REQ_3 0x24
860 #define GSM48_MT_RR_PAG_RESP 0x27
861 #define GSM48_MT_RR_NOTIF_NCH 0x20
862 #define GSM48_MT_RR_NOTIF_FACCH 0x25
863 #define GSM48_MT_RR_NOTIF_RESP 0x26
865 #define GSM48_MT_RR_SYSINFO_8 0x18
866 #define GSM48_MT_RR_SYSINFO_1 0x19
867 #define GSM48_MT_RR_SYSINFO_2 0x1a
868 #define GSM48_MT_RR_SYSINFO_3 0x1b
869 #define GSM48_MT_RR_SYSINFO_4 0x1c
870 #define GSM48_MT_RR_SYSINFO_5 0x1d
871 #define GSM48_MT_RR_SYSINFO_6 0x1e
872 #define GSM48_MT_RR_SYSINFO_7 0x1f
874 #define GSM48_MT_RR_SYSINFO_2bis 0x02
875 #define GSM48_MT_RR_SYSINFO_2ter 0x03
876 #define GSM48_MT_RR_SYSINFO_2quater 0x07
877 #define GSM48_MT_RR_SYSINFO_5bis 0x05
878 #define GSM48_MT_RR_SYSINFO_5ter 0x06
879 #define GSM48_MT_RR_SYSINFO_9 0x04
880 #define GSM48_MT_RR_SYSINFO_13 0x00
882 #define GSM48_MT_RR_SYSINFO_16 0x3d
883 #define GSM48_MT_RR_SYSINFO_17 0x3e
885 #define GSM48_MT_RR_CHAN_MODE_MODIF 0x10
886 #define GSM48_MT_RR_STATUS 0x12
887 #define GSM48_MT_RR_CHAN_MODE_MODIF_ACK 0x17
888 #define GSM48_MT_RR_FREQ_REDEF 0x14
889 #define GSM48_MT_RR_MEAS_REP 0x15
890 #define GSM48_MT_RR_CLSM_CHG 0x16
891 #define GSM48_MT_RR_CLSM_ENQ 0x13
892 #define GSM48_MT_RR_EXT_MEAS_REP 0x36
893 #define GSM48_MT_RR_EXT_MEAS_REP_ORD 0x37
894 #define GSM48_MT_RR_GPRS_SUSP_REQ 0x34
896 #define GSM48_MT_RR_VGCS_UPL_GRANT 0x09
897 #define GSM48_MT_RR_UPLINK_RELEASE 0x0e
898 #define GSM48_MT_RR_UPLINK_FREE 0x0c
899 #define GSM48_MT_RR_UPLINK_BUSY 0x2a
900 #define GSM48_MT_RR_TALKER_IND 0x11
902 #define GSM48_MT_RR_APP_INFO 0x38
905 #define GSM48_MT_MM_IMSI_DETACH_IND 0x01
906 #define GSM48_MT_MM_LOC_UPD_ACCEPT 0x02
907 #define GSM48_MT_MM_LOC_UPD_REJECT 0x04
908 #define GSM48_MT_MM_LOC_UPD_REQUEST 0x08
910 #define GSM48_MT_MM_AUTH_REJ 0x11
911 #define GSM48_MT_MM_AUTH_REQ 0x12
912 #define GSM48_MT_MM_AUTH_RESP 0x14
913 #define GSM48_MT_MM_ID_REQ 0x18
914 #define GSM48_MT_MM_ID_RESP 0x19
915 #define GSM48_MT_MM_TMSI_REALL_CMD 0x1a
916 #define GSM48_MT_MM_TMSI_REALL_COMPL 0x1b
918 #define GSM48_MT_MM_CM_SERV_ACC 0x21
919 #define GSM48_MT_MM_CM_SERV_REJ 0x22
920 #define GSM48_MT_MM_CM_SERV_ABORT 0x23
921 #define GSM48_MT_MM_CM_SERV_REQ 0x24
922 #define GSM48_MT_MM_CM_SERV_PROMPT 0x25
923 #define GSM48_MT_MM_CM_REEST_REQ 0x28
924 #define GSM48_MT_MM_ABORT 0x29
926 #define GSM48_MT_MM_NULL 0x30
927 #define GSM48_MT_MM_STATUS 0x31
928 #define GSM48_MT_MM_INFO 0x32
931 #define GSM48_MT_CC_ALERTING 0x01
932 #define GSM48_MT_CC_CALL_CONF 0x08
933 #define GSM48_MT_CC_CALL_PROC 0x02
934 #define GSM48_MT_CC_CONNECT 0x07
935 #define GSM48_MT_CC_CONNECT_ACK 0x0f
936 #define GSM48_MT_CC_EMERG_SETUP 0x0e
937 #define GSM48_MT_CC_PROGRESS 0x03
938 #define GSM48_MT_CC_ESTAB 0x04
939 #define GSM48_MT_CC_ESTAB_CONF 0x06
940 #define GSM48_MT_CC_RECALL 0x0b
941 #define GSM48_MT_CC_START_CC 0x09
942 #define GSM48_MT_CC_SETUP 0x05
944 #define GSM48_MT_CC_MODIFY 0x17
945 #define GSM48_MT_CC_MODIFY_COMPL 0x1f
946 #define GSM48_MT_CC_MODIFY_REJECT 0x13
947 #define GSM48_MT_CC_USER_INFO 0x10
948 #define GSM48_MT_CC_HOLD 0x18
949 #define GSM48_MT_CC_HOLD_ACK 0x19
950 #define GSM48_MT_CC_HOLD_REJ 0x1a
951 #define GSM48_MT_CC_RETR 0x1c
952 #define GSM48_MT_CC_RETR_ACK 0x1d
953 #define GSM48_MT_CC_RETR_REJ 0x1e
955 #define GSM48_MT_CC_DISCONNECT 0x25
956 #define GSM48_MT_CC_RELEASE 0x2d
957 #define GSM48_MT_CC_RELEASE_COMPL 0x2a
959 #define GSM48_MT_CC_CONG_CTRL 0x39
960 #define GSM48_MT_CC_NOTIFY 0x3e
961 #define GSM48_MT_CC_STATUS 0x3d
962 #define GSM48_MT_CC_STATUS_ENQ 0x34
963 #define GSM48_MT_CC_START_DTMF 0x35
964 #define GSM48_MT_CC_STOP_DTMF 0x31
965 #define GSM48_MT_CC_STOP_DTMF_ACK 0x32
966 #define GSM48_MT_CC_START_DTMF_ACK 0x36
967 #define GSM48_MT_CC_START_DTMF_REJ 0x37
968 #define GSM48_MT_CC_FACILITY 0x3a
973 #define GSM48_CMSERV_MO_CALL_PACKET 1
974 #define GSM48_CMSERV_EMERGENCY 2
975 #define GSM48_CMSERV_SMS 4
976 #define GSM48_CMSERV_SUP_SERV 8
977 #define GSM48_CMSERV_VGCS 9
978 #define GSM48_CMSERV_VBS 10
979 #define GSM48_CMSERV_LOC_SERV 11
982 #define GSM48_PM_MASK 0x03
983 #define GSM48_PM_NORMAL 0x00
984 #define GSM48_PM_EXTENDED 0x01
985 #define GSM48_PM_REORG 0x02
986 #define GSM48_PM_SAME 0x03
989 #define GSM48_LUPD_NORMAL 0x0
990 #define GSM48_LUPD_PERIODIC 0x1
991 #define GSM48_LUPD_IMSI_ATT 0x2
992 #define GSM48_LUPD_RESERVED 0x3
995 #define GSM_MI_TYPE_MASK 0x07
996 #define GSM_MI_TYPE_NONE 0x00
997 #define GSM_MI_TYPE_IMSI 0x01
998 #define GSM_MI_TYPE_IMEI 0x02
999 #define GSM_MI_TYPE_IMEISV 0x03
1000 #define GSM_MI_TYPE_TMSI 0x04
1001 #define GSM_MI_ODD 0x08
1003 #define GSM48_IE_MOBILE_ID 0x17
1004 #define GSM48_IE_NAME_LONG 0x43
1005 #define GSM48_IE_NAME_SHORT 0x45
1006 #define GSM48_IE_UTC 0x46
1007 #define GSM48_IE_NET_TIME_TZ 0x47
1008 #define GSM48_IE_LSA_IDENT 0x48
1009 #define GSM48_IE_NET_DST 0x49
1011 #define GSM48_IE_BEARER_CAP 0x04
1012 #define GSM48_IE_CAUSE 0x08
1013 #define GSM48_IE_CC_CAP 0x15
1014 #define GSM48_IE_ALERT 0x19
1015 #define GSM48_IE_FACILITY 0x1c
1016 #define GSM48_IE_PROGR_IND 0x1e
1017 #define GSM48_IE_AUX_STATUS 0x24
1018 #define GSM48_IE_NOTIFY 0x27
1019 #define GSM48_IE_KPD_FACILITY 0x2c
1020 #define GSM48_IE_SIGNAL 0x34
1021 #define GSM48_IE_CONN_BCD 0x4c
1022 #define GSM48_IE_CONN_SUB 0x4d
1023 #define GSM48_IE_CALLING_BCD 0x5c
1024 #define GSM48_IE_CALLING_SUB 0x5d
1025 #define GSM48_IE_CALLED_BCD 0x5e
1026 #define GSM48_IE_CALLED_SUB 0x6d
1027 #define GSM48_IE_REDIR_BCD 0x74
1028 #define GSM48_IE_REDIR_SUB 0x75
1029 #define GSM48_IE_LOWL_COMPAT 0x7c
1030 #define GSM48_IE_HIGHL_COMPAT 0x7d
1031 #define GSM48_IE_USER_USER 0x7e
1032 #define GSM48_IE_SS_VERS 0x7f
1033 #define GSM48_IE_MORE_DATA 0xa0
1034 #define GSM48_IE_CLIR_SUPP 0xa1
1035 #define GSM48_IE_CLIR_INVOC 0xa2
1036 #define GSM48_IE_REV_C_SETUP 0xa3
1037 #define GSM48_IE_REPEAT_CIR 0xd1
1038 #define GSM48_IE_REPEAT_SEQ 0xd3
1041 #define GSM48_CAUSE_CS_GSM 0x60
1045 #define GSM48_IE_VGCS_TARGET 0x01
1047 #define GSM48_IE_FRQSHORT_AFTER 0x02
1048 #define GSM48_IE_MUL_RATE_CFG 0x03
1049 #define GSM48_IE_FREQ_L_AFTER 0x05
1050 #define GSM48_IE_MSLOT_DESC 0x10
1051 #define GSM48_IE_CHANMODE_2 0x11
1052 #define GSM48_IE_FRQSHORT_BEFORE 0x12
1054 #define GSM48_IE_CHANMODE_3 0x13
1055 #define GSM48_IE_CHANMODE_4 0x14
1056 #define GSM48_IE_CHANMODE_5 0x15
1057 #define GSM48_IE_CHANMODE_6 0x16
1058 #define GSM48_IE_CHANMODE_7 0x17
1059 #define GSM48_IE_CHANMODE_8 0x18
1060 #define GSM48_IE_CHANDESC_2 0x64
1061 #define GSM48_IE_MA_AFTER 0x72
1062 #define GSM48_IE_START_TIME 0x7c
1063 #define GSM48_IE_FREQ_L_BEFORE 0x19
1065 #define GSM48_IE_CH_DESC_1_BEFORE 0x1c
1067 #define GSM48_IE_CH_DESC_2_BEFORE 0x1d
1069 #define GSM48_IE_F_CH_SEQ_BEFORE 0x1e
1071 #define GSM48_IE_CLASSMARK3 0x20
1072 #define GSM48_IE_MA_BEFORE 0x21
1073 #define GSM48_IE_RR_PACKET_UL 0x22
1074 #define GSM48_IE_RR_PACKET_DL 0x23
1075 #define GSM48_IE_CELL_CH_DESC 0x62
1076 #define GSM48_IE_CHANMODE_1 0x63
1077 #define GSM48_IE_CHDES_2_AFTER 0x64
1078 #define GSM48_IE_MODE_SEC_CH 0x66
1079 #define GSM48_IE_F_CH_SEQ_AFTER 0x69
1080 #define GSM48_IE_MA_AFTER 0x72
1081 #define GSM48_IE_BA_RANGE 0x73
1082 #define GSM48_IE_GROUP_CHDES 0x74
1083 #define GSM48_IE_BA_LIST_PREF 0x75
1084 #define GSM48_IE_MOB_OVSERV_DIF 0x77
1085 #define GSM48_IE_REALTIME_DIFF 0x7b
1086 #define GSM48_IE_START_TIME 0x7c
1087 #define GSM48_IE_TIMING_ADVANCE 0x7d
1088 #define GSM48_IE_GROUP_CIP_SEQ 0x80
1089 #define GSM48_IE_CIP_MODE_SET 0x90
1090 #define GSM48_IE_GPRS_RESUMPT 0xc0
1091 #define GSM48_IE_SYNC_IND 0xd0
1093 #define GSM48_IE_CBCH_CHAN_DESC 0x64
1094 #define GSM48_IE_CBCH_MOB_AL 0x72
1097 #define GSM48_IE_LOCATION_AREA 0x13
1098 #define GSM48_IE_PRIORITY_LEV 0x80
1099 #define GSM48_IE_FOLLOW_ON_PROC 0xa1
1100 #define GSM48_IE_CTS_PERMISSION 0xa2
1103 enum gsm48_signal_val {
1104 GSM48_SIGNAL_DIALTONE = 0x00,
1105 GSM48_SIGNAL_RINGBACK = 0x01,
1106 GSM48_SIGNAL_INTERCEPT = 0x02,
1107 GSM48_SIGNAL_NET_CONG = 0x03,
1108 GSM48_SIGNAL_BUSY = 0x04,
1109 GSM48_SIGNAL_CONFIRM = 0x05,
1110 GSM48_SIGNAL_ANSWER = 0x06,
1111 GSM48_SIGNAL_CALL_WAIT = 0x07,
1112 GSM48_SIGNAL_OFF_HOOK = 0x08,
1113 GSM48_SIGNAL_OFF = 0x3f,
1114 GSM48_SIGNAL_ALERT_OFF = 0x4f,
1117 enum gsm48_cause_loc {
1118 GSM48_CAUSE_LOC_USER = 0x00,
1119 GSM48_CAUSE_LOC_PRN_S_LU = 0x01,
1120 GSM48_CAUSE_LOC_PUN_S_LU = 0x02,
1121 GSM48_CAUSE_LOC_TRANS_NET = 0x03,
1122 GSM48_CAUSE_LOC_PUN_S_RU = 0x04,
1123 GSM48_CAUSE_LOC_PRN_S_RU = 0x05,
1125 GSM48_CAUSE_LOC_INN_NET = 0x07,
1126 GSM48_CAUSE_LOC_NET_BEYOND = 0x0a,
1130 enum gsm48_rr_cause {
1131 GSM48_RR_CAUSE_NORMAL = 0x00,
1132 GSM48_RR_CAUSE_ABNORMAL_UNSPEC = 0x01,
1133 GSM48_RR_CAUSE_ABNORMAL_UNACCT = 0x02,
1134 GSM48_RR_CAUSE_ABNORMAL_TIMER = 0x03,
1135 GSM48_RR_CAUSE_ABNORMAL_NOACT = 0x04,
1136 GSM48_RR_CAUSE_PREMPTIVE_REL = 0x05,
1137 GSM48_RR_CAUSE_HNDOVER_IMP = 0x08,
1138 GSM48_RR_CAUSE_CHAN_MODE_UNACCT = 0x09,
1139 GSM48_RR_CAUSE_FREQ_NOT_IMPL = 0x0a,
1140 GSM48_RR_CAUSE_CALL_CLEARED = 0x41,
1141 GSM48_RR_CAUSE_SEMANT_INCORR = 0x5f,
1142 GSM48_RR_CAUSE_INVALID_MAND_INF = 0x60,
1143 GSM48_RR_CAUSE_MSG_TYPE_N = 0x61,
1144 GSM48_RR_CAUSE_MSG_TYPE_N_COMPAT= 0x62,
1145 GSM48_RR_CAUSE_COND_IE_ERROR = 0x64,
1146 GSM48_RR_CAUSE_NO_CELL_ALLOC_A = 0x65,
1147 GSM48_RR_CAUSE_PROT_ERROR_UNSPC = 0x6f,
1151 enum gsm48_cc_cause {
1152 GSM48_CC_CAUSE_UNASSIGNED_NR = 1,
1153 GSM48_CC_CAUSE_NO_ROUTE = 3,
1154 GSM48_CC_CAUSE_CHAN_UNACCEPT = 6,
1155 GSM48_CC_CAUSE_OP_DET_BARRING = 8,
1156 GSM48_CC_CAUSE_NORM_CALL_CLEAR = 16,
1157 GSM48_CC_CAUSE_USER_BUSY = 17,
1158 GSM48_CC_CAUSE_USER_NOTRESPOND = 18,
1159 GSM48_CC_CAUSE_USER_ALERTING_NA = 19,
1160 GSM48_CC_CAUSE_CALL_REJECTED = 21,
1161 GSM48_CC_CAUSE_NUMBER_CHANGED = 22,
1162 GSM48_CC_CAUSE_PRE_EMPTION = 25,
1163 GSM48_CC_CAUSE_NONSE_USER_CLR = 26,
1164 GSM48_CC_CAUSE_DEST_OOO = 27,
1165 GSM48_CC_CAUSE_INV_NR_FORMAT = 28,
1166 GSM48_CC_CAUSE_FACILITY_REJ = 29,
1167 GSM48_CC_CAUSE_RESP_STATUS_INQ = 30,
1168 GSM48_CC_CAUSE_NORMAL_UNSPEC = 31,
1169 GSM48_CC_CAUSE_NO_CIRCUIT_CHAN = 34,
1170 GSM48_CC_CAUSE_NETWORK_OOO = 38,
1171 GSM48_CC_CAUSE_TEMP_FAILURE = 41,
1172 GSM48_CC_CAUSE_SWITCH_CONG = 42,
1173 GSM48_CC_CAUSE_ACC_INF_DISCARD = 43,
1174 GSM48_CC_CAUSE_REQ_CHAN_UNAVAIL = 44,
1175 GSM48_CC_CAUSE_RESOURCE_UNAVAIL = 47,
1176 GSM48_CC_CAUSE_QOS_UNAVAIL = 49,
1177 GSM48_CC_CAUSE_REQ_FAC_NOT_SUBSC= 50,
1178 GSM48_CC_CAUSE_INC_BARRED_CUG = 55,
1179 GSM48_CC_CAUSE_BEARER_CAP_UNAUTH= 57,
1180 GSM48_CC_CAUSE_BEARER_CA_UNAVAIL= 58,
1181 GSM48_CC_CAUSE_SERV_OPT_UNAVAIL = 63,
1182 GSM48_CC_CAUSE_BEARERSERV_UNIMPL= 65,
1183 GSM48_CC_CAUSE_ACM_GE_ACM_MAX = 68,
1184 GSM48_CC_CAUSE_REQ_FAC_NOTIMPL = 69,
1185 GSM48_CC_CAUSE_RESTR_BCAP_AVAIL = 70,
1186 GSM48_CC_CAUSE_SERV_OPT_UNIMPL = 79,
1187 GSM48_CC_CAUSE_INVAL_TRANS_ID = 81,
1188 GSM48_CC_CAUSE_USER_NOT_IN_CUG = 87,
1189 GSM48_CC_CAUSE_INCOMPAT_DEST = 88,
1190 GSM48_CC_CAUSE_INVAL_TRANS_NET = 91,
1191 GSM48_CC_CAUSE_SEMANTIC_INCORR = 95,
1192 GSM48_CC_CAUSE_INVAL_MAND_INF = 96,
1193 GSM48_CC_CAUSE_MSGTYPE_NOTEXIST = 97,
1194 GSM48_CC_CAUSE_MSGTYPE_INCOMPAT = 98,
1195 GSM48_CC_CAUSE_IE_NOTEXIST = 99,
1196 GSM48_CC_CAUSE_COND_IE_ERR = 100,
1197 GSM48_CC_CAUSE_MSG_INCOMP_STATE = 101,
1198 GSM48_CC_CAUSE_RECOVERY_TIMER = 102,
1199 GSM48_CC_CAUSE_PROTO_ERR = 111,
1200 GSM48_CC_CAUSE_INTERWORKING = 127,
1204 enum gsm48_reject_value {
1205 GSM48_REJECT_IMSI_UNKNOWN_IN_HLR = 2,
1206 GSM48_REJECT_ILLEGAL_MS = 3,
1207 GSM48_REJECT_IMSI_UNKNOWN_IN_VLR = 4,
1208 GSM48_REJECT_IMEI_NOT_ACCEPTED = 5,
1209 GSM48_REJECT_ILLEGAL_ME = 6,
1210 GSM48_REJECT_PLMN_NOT_ALLOWED = 11,
1211 GSM48_REJECT_LOC_NOT_ALLOWED = 12,
1212 GSM48_REJECT_ROAMING_NOT_ALLOWED = 13,
1213 GSM48_REJECT_NETWORK_FAILURE = 17,
1214 GSM48_REJECT_CONGESTION = 22,
1215 GSM48_REJECT_SRV_OPT_NOT_SUPPORTED = 32,
1216 GSM48_REJECT_RQD_SRV_OPT_NOT_SUPPORTED = 33,
1217 GSM48_REJECT_SRV_OPT_TMP_OUT_OF_ORDER = 34,
1218 GSM48_REJECT_CALL_CAN_NOT_BE_IDENTIFIED = 38,
1219 GSM48_REJECT_INCORRECT_MESSAGE = 95,
1220 GSM48_REJECT_INVALID_MANDANTORY_INF = 96,
1221 GSM48_REJECT_MSG_TYPE_NOT_IMPLEMENTED = 97,
1222 GSM48_REJECT_MSG_TYPE_NOT_COMPATIBLE = 98,
1223 GSM48_REJECT_INF_ELEME_NOT_IMPLEMENTED = 99,
1224 GSM48_REJECT_CONDTIONAL_IE_ERROR = 100,
1225 GSM48_REJECT_MSG_NOT_COMPATIBLE = 101,
1226 GSM48_REJECT_PROTOCOL_ERROR = 111,
1229 GSM48_REJECT_GPRS_NOT_ALLOWED = 7,
1230 GSM48_REJECT_SERVICES_NOT_ALLOWED = 8,
1231 GSM48_REJECT_MS_IDENTITY_NOT_DERVIVABLE = 9,
1232 GSM48_REJECT_IMPLICITLY_DETACHED = 10,
1233 GSM48_REJECT_GPRS_NOT_ALLOWED_IN_PLMN = 14,
1234 GSM48_REJECT_MSC_TMP_NOT_REACHABLE = 16,
1239 CHREQ_T_CALL_REEST_TCH_F,
1240 CHREQ_T_CALL_REEST_TCH_H,
1241 CHREQ_T_CALL_REEST_TCH_H_DBL,
1244 CHREQ_T_VOICE_CALL_TCH_H,
1245 CHREQ_T_DATA_CALL_TCH_H,
1246 CHREQ_T_LOCATION_UPD,
1247 CHREQ_T_PAG_R_ANY_NECI0,
1248 CHREQ_T_PAG_R_ANY_NECI1,
1249 CHREQ_T_PAG_R_TCH_F,
1250 CHREQ_T_PAG_R_TCH_FH,
1252 CHREQ_T_RESERVED_SDCCH,
1253 CHREQ_T_RESERVED_IGNORE,
1257 #define GSM48_T301 180, 0
1258 #define GSM48_T303 30, 0
1259 #define GSM48_T305 30, 0
1260 #define GSM48_T306 30, 0
1261 #define GSM48_T308 10, 0
1262 #define GSM48_T310 180, 0
1263 #define GSM48_T313 30, 0
1264 #define GSM48_T323 30, 0
1265 #define GSM48_T331 30, 0
1266 #define GSM48_T333 30, 0
1267 #define GSM48_T334 25, 0
1268 #define GSM48_T338 30, 0
1269 #define GSM48_T303_MS 30, 0
1270 #define GSM48_T305_MS 30, 0
1271 #define GSM48_T308_MS 30, 0
1272 #define GSM48_T310_MS 30, 0
1273 #define GSM48_T313_MS 30, 0
1274 #define GSM48_T323_MS 30, 0
1275 #define GSM48_T332_MS 30, 0
1276 #define GSM48_T335_MS 30, 0
1279 #define GSM_CSTATE_NULL 0
1280 #define GSM_CSTATE_INITIATED 1
1281 #define GSM_CSTATE_MM_CONNECTION_PEND 2
1282 #define GSM_CSTATE_MO_CALL_PROC 3
1283 #define GSM_CSTATE_CALL_DELIVERED 4
1284 #define GSM_CSTATE_CALL_PRESENT 6
1285 #define GSM_CSTATE_CALL_RECEIVED 7
1286 #define GSM_CSTATE_CONNECT_REQUEST 8
1287 #define GSM_CSTATE_MO_TERM_CALL_CONF 9
1288 #define GSM_CSTATE_ACTIVE 10
1289 #define GSM_CSTATE_DISCONNECT_REQ 12
1290 #define GSM_CSTATE_DISCONNECT_IND 12
1291 #define GSM_CSTATE_RELEASE_REQ 19
1292 #define GSM_CSTATE_MO_ORIG_MODIFY 26
1293 #define GSM_CSTATE_MO_TERM_MODIFY 27
1294 #define GSM_CSTATE_CONNECT_IND 28
1296 #define SBIT(a) (1 << a)
1297 #define ALL_STATES 0xffffffff
1300 #define GSM_LAC_RESERVED_DETACHED 0x0
1301 #define GSM_LAC_RESERVED_ALL_BTS 0xfffe
1304 enum gsm48_bcap_itcap {
1305 GSM48_BCAP_ITCAP_SPEECH = 0,
1306 GSM48_BCAP_ITCAP_UNR_DIG_INF = 1,
1307 GSM48_BCAP_ITCAP_3k1_AUDIO = 2,
1308 GSM48_BCAP_ITCAP_FAX_G3 = 3,
1309 GSM48_BCAP_ITCAP_OTHER = 5,
1310 GSM48_BCAP_ITCAP_RESERVED = 7,
1314 enum gsm48_bcap_tmod {
1315 GSM48_BCAP_TMOD_CIRCUIT = 0,
1316 GSM48_BCAP_TMOD_PACKET = 1,
1320 enum gsm48_bcap_coding {
1321 GSM48_BCAP_CODING_GSM_STD = 0,
1325 enum gsm48_bcap_rrq {
1326 GSM48_BCAP_RRQ_FR_ONLY = 1,
1327 GSM48_BCAP_RRQ_DUAL_HR = 2,
1328 GSM48_BCAP_RRQ_DUAL_FR = 3,
1332 enum gsm48_bcap_ra {
1333 GSM48_BCAP_RA_NONE = 0,
1334 GSM48_BCAP_RA_V110_X30 = 1,
1335 GSM48_BCAP_RA_X31 = 2,
1336 GSM48_BCAP_RA_OTHER = 3,
1340 enum gsm48_bcap_sig_access {
1341 GSM48_BCAP_SA_I440_I450 = 1,
1342 GSM48_BCAP_SA_X21 = 2,
1343 GSM48_BCAP_SA_X28_DP_IN = 3,
1344 GSM48_BCAP_SA_X28_DP_UN = 4,
1345 GSM48_BCAP_SA_X28_NDP = 5,
1346 GSM48_BCAP_SA_X32 = 6,
1350 enum gsm48_bcap_user_rate {
1351 GSM48_BCAP_UR_300 = 1,
1352 GSM48_BCAP_UR_1200 = 2,
1353 GSM48_BCAP_UR_2400 = 3,
1354 GSM48_BCAP_UR_4800 = 4,
1355 GSM48_BCAP_UR_9600 = 5,
1356 GSM48_BCAP_UR_12000 = 6,
1357 GSM48_BCAP_UR_1200_75 = 7,
1361 enum gsm48_bcap_parity {
1362 GSM48_BCAP_PAR_ODD = 0,
1363 GSM48_BCAP_PAR_EVEN = 2,
1364 GSM48_BCAP_PAR_NONE = 3,
1365 GSM48_BCAP_PAR_ZERO = 4,
1366 GSM48_BCAP_PAR_ONE = 5,
1370 enum gsm48_bcap_interm_rate {
1371 GSM48_BCAP_IR_8k = 2,
1372 GSM48_BCAP_IR_16k = 3,
1376 enum gsm48_bcap_transp {
1377 GSM48_BCAP_TR_TRANSP = 0,
1378 GSM48_BCAP_TR_RLP = 1,
1379 GSM48_BCAP_TR_TR_PREF = 2,
1380 GSM48_BCAP_TR_RLP_PREF = 3,
1384 enum gsm48_bcap_modem_type {
1385 GSM48_BCAP_MT_NONE = 0,
1386 GSM48_BCAP_MT_V21 = 1,
1387 GSM48_BCAP_MT_V22 = 2,
1388 GSM48_BCAP_MT_V22bis = 3,
1389 GSM48_BCAP_MT_V23 = 4,
1390 GSM48_BCAP_MT_V26ter = 5,
1391 GSM48_BCAP_MT_V32 = 6,
1392 GSM48_BCAP_MT_UNDEF = 7,
1393 GSM48_BCAP_MT_AUTO_1 = 8,
1397 enum gsm48_bcap_speech_ver {
1398 GSM48_BCAP_SV_FR = 0,
1399 GSM48_BCAP_SV_HR = 1,
1400 GSM48_BCAP_SV_EFR = 2,
1401 GSM48_BCAP_SV_AMR_F = 4,
1402 GSM48_BCAP_SV_AMR_H = 5,
1405 #define GSM48_TMSI_LEN 5
1406 #define GSM48_MID_TMSI_LEN (GSM48_TMSI_LEN + 2)
1407 #define GSM48_MI_SIZE 32
1414 } __attribute__ ((packed));
1416 #define GSM48_CELL_CHAN_DESC_SIZE 16
1418 #define GSM_MACBLOCK_LEN 23
1419 #define GSM_MACBLOCK_PADDING 0x2b
Definition: gsm_04_08.h:351
Definition: gsm_04_08.h:631
Definition: gsm_04_08.h:604
Definition: gsm_04_08.h:434
Definition: gsm_04_08.h:375
Definition: gsm_04_08.h:733
Definition: gsm_04_08.h:314
Definition: gsm_04_08.h:476
Definition: gsm_04_08.h:196
Definition: gsm_04_08.h:705
Definition: gsm_04_08.h:294
Definition: gsm_04_08.h:359
Definition: gsm_04_08.h:18
Definition: gsm_04_08.h:112
Definition: gsm_04_08.h:1410
Definition: gsm_04_08.h:449
Definition: gsm_04_08.h:679
Definition: gsm_04_08.h:620
Definition: gsm_04_08.h:625
uint8_t data[0]
actual payload data
Definition: gsm_08_58.h:824
Definition: gsm_04_08.h:384
Definition: gsm_04_08.h:305
Definition: gsm_04_08.h:227
Definition: gsm_04_08.h:424
Definition: gsm_04_08.h:77
Definition: gsm_04_08.h:406
Definition: gsm_04_08.h:9
Definition: gsm_04_08.h:691
Definition: gsm_04_08.h:614
Definition: gsm_04_08.h:287
Definition: gsm_04_08.h:609
Definition: gsm_04_08.h:42
Definition: gsm_04_08.h:597
Definition: gsm_04_08.h:412
Definition: gsm_04_08.h:458
Definition: gsm_04_08.h:419
Definition: gsm_04_08.h:153
Definition: gsm_04_08.h:322
Definition: gsm_04_08.h:397
Definition: gsm_04_08.h:334
Definition: gsm_04_08.h:724
Definition: gsm_04_08.h:270
Definition: gsm_04_08.h:590
Definition: gsm_04_08.h:646
Definition: gsm_04_08.h:468
Definition: gsm_04_08.h:367
Definition: gsm_04_08.h:206
Definition: gsm_04_08.h:639
Definition: gsm_04_08.h:662