srsue/rrctl: add Security Mode messages for EEA/EIA
This commit is contained in:
parent
510bd4ee02
commit
796a6df0df
|
@ -40,6 +40,7 @@ namespace proto {
|
|||
RRCTL_CONN_RELEASE,
|
||||
RRCTL_PAGING,
|
||||
RRCTL_PARAM,
|
||||
RRCTL_SEC_MODE,
|
||||
|
||||
/* RRCTL protocol extensions (0b11xxxx, up to 15 groups) follow */
|
||||
|
||||
|
@ -114,10 +115,40 @@ namespace proto {
|
|||
} u;
|
||||
} __attribute__((packed));
|
||||
|
||||
enum msg_eea_type {
|
||||
RRCTL_EEA0 = 0x00,
|
||||
RRCTL_EEA1 = 0x01,
|
||||
RRCTL_EEA2 = 0x02,
|
||||
RRCTL_EEA3 = 0x03,
|
||||
};
|
||||
|
||||
enum msg_eia_type {
|
||||
RRCTL_EIA0 = 0x00,
|
||||
RRCTL_EIA1 = 0x01,
|
||||
RRCTL_EIA2 = 0x02,
|
||||
RRCTL_EIA3 = 0x03,
|
||||
};
|
||||
|
||||
#define SEC_MODE_F_RESET_RX_CTR (1 << 0)
|
||||
#define SEC_MODE_F_RESET_TX_CTR (1 << 1)
|
||||
|
||||
struct msg_sec_mode_req {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
uint8_t flags:2, eia:3, eea:3;
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
uint8_t eea:3, eia:3, flags:2;
|
||||
#else
|
||||
#error "Please fix <asm/byteorder.h>"
|
||||
#endif
|
||||
uint8_t spare[3];
|
||||
uint8_t k_asme[0]; // optional (32 octets)
|
||||
} __attribute__((packed));
|
||||
|
||||
struct msg {
|
||||
struct msg_hdr hdr;
|
||||
union {
|
||||
struct msg_data data;
|
||||
struct msg_sec_mode_req;
|
||||
struct msg_param_req param_req;
|
||||
struct msg_paging_ind paging_ind;
|
||||
struct msg_plmn_search_res plmn_search_res;
|
||||
|
|
|
@ -83,6 +83,7 @@ void nas_ext::init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interf
|
|||
case rrctl::proto::RRCTL_PARAM:
|
||||
handle_rrctl_param(disc, payload, length);
|
||||
break;
|
||||
case rrctl::proto::RRCTL_SEC_MODE:
|
||||
case rrctl::proto::RRCTL_EXT_USIM:
|
||||
case rrctl::proto::RRCTL_CONN_RELEASE:
|
||||
default:
|
||||
|
|
|
@ -59,6 +59,9 @@ std::string msg_hdr_desc(proto::msg_type type, proto::msg_disc disc, uint16_t le
|
|||
case RRCTL_PARAM:
|
||||
desc += "Parameter";
|
||||
break;
|
||||
case RRCTL_SEC_MODE:
|
||||
desc += "Security Mode";
|
||||
break;
|
||||
case RRCTL_EXT_USIM:
|
||||
desc += "(U)SIM Specific";
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue