continue 5G SA NAS messages
This commit is contained in:
@@ -196,6 +196,23 @@ typedef enum {
|
||||
FOREACH_CAUSE_SECU(CAUSE_ENUM)
|
||||
} cause_secu_id_t;
|
||||
|
||||
//TS 24.501 sub layer states for UE
|
||||
// for network side, only 5GMMderegistered, 5GMMderegistered_initiated, 5GMMregistered, 5GMMservice_request_initiated are valid
|
||||
typedef enum {
|
||||
SGMMnull,
|
||||
SGMMderegistered,
|
||||
SGMMderegistered_initiated,
|
||||
SGMMregistered,
|
||||
SGMMregistered_initiated,
|
||||
SGMMservice_request_initiated,
|
||||
} SGMM_UE_states;
|
||||
|
||||
typedef struct {
|
||||
Extendedprotocoldiscriminator_t epd:8;
|
||||
Security_header_t sh:8;
|
||||
SGSmobilitymanagementmessages_t mt:8;
|
||||
} SGScommonHeader_t;
|
||||
|
||||
typedef struct {
|
||||
Extendedprotocoldiscriminator_t epd:8;
|
||||
Security_header_t sh:8;
|
||||
@@ -212,3 +229,19 @@ typedef struct {
|
||||
} Identityresponse_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
Extendedprotocoldiscriminator_t epd:8;
|
||||
Security_header_t sh:8;
|
||||
SGSmobilitymanagementmessages_t mt:8;
|
||||
int ngKSI:4;
|
||||
int spare:4;
|
||||
int ABBALen:8;
|
||||
} authenticationrequestHeader_t;
|
||||
|
||||
typedef struct {
|
||||
Extendedprotocoldiscriminator_t epd:8;
|
||||
Security_header_t sh:8;
|
||||
SGSmobilitymanagementmessages_t mt:8;
|
||||
} authenticationresponseHeader_t;
|
||||
|
||||
//AUTHENTICATION RESULT
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
typedef struct {
|
||||
|
||||
} nr_user_nas_t;
|
||||
@@ -0,0 +1,73 @@
|
||||
#include <openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h>
|
||||
#include <openair3/NAS/NR_UE/nr_user_def.h>
|
||||
|
||||
void SGSabortNet(void *msg, nr_user_nas_t *UE) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*Message reception
|
||||
*/
|
||||
|
||||
|
||||
|
||||
void SGSauthenticationReq(void *msg, nr_user_nas_t *UE) {
|
||||
}
|
||||
|
||||
void SGSidentityReq(void *msg, nr_user_nas_t *UE) {
|
||||
}
|
||||
|
||||
void SGSsecurityModeCommand(void *msg, nr_user_nas_t *UE) {
|
||||
}
|
||||
|
||||
|
||||
void UEprocessNAS(void *msg,nr_user_nas_t *UE) {
|
||||
SGScommonHeader_t *header=(SGScommonHeader_t *) msg;
|
||||
|
||||
if ( header->sh > 4 )
|
||||
SGSabortNet(msg, UE);
|
||||
else {
|
||||
switch (header->epd) {
|
||||
SGSmobilitymanagementmessages:
|
||||
|
||||
switch (header->mt) {
|
||||
Authenticationrequest:
|
||||
SGSauthenticationReq(msg, UE);
|
||||
break;
|
||||
Identityrequest:
|
||||
SGSidentityReq(msg, UE);
|
||||
break;
|
||||
Securitymodecommand:
|
||||
SGSsecurityModeCommand(msg, UE);
|
||||
break;
|
||||
|
||||
default:
|
||||
SGSabortNet(msg, UE);
|
||||
}
|
||||
|
||||
break;
|
||||
SGSsessionmanagementmessages:
|
||||
SGSabortNet(msg, UE);
|
||||
break;
|
||||
|
||||
default:
|
||||
SGSabortNet(msg, UE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Messages emission
|
||||
*/
|
||||
|
||||
void identityResponse(void *msg, nr_user_nas_t *UE) {
|
||||
}
|
||||
|
||||
void authenticationResponse(void *msg,nr_user_nas_t *UE) {
|
||||
}
|
||||
|
||||
void securityModeComplete(void *msg, nr_user_nas_t *UE) {
|
||||
}
|
||||
|
||||
void registrationComplete(void *msg, nr_user_nas_t *UE) {
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
#include <openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h>
|
||||
|
||||
void SGSabortUE(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*Message reception
|
||||
*/
|
||||
|
||||
void SGSregistrationReq(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void SGSderegistrationUEReq(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void SGSauthenticationResp(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void SGSidentityResp(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void SGSsecurityModeComplete(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void SGSregistrationComplete(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void processNAS(void *msg, NRUEcontext_t *UE) {
|
||||
SGScommonHeader_t *header=(SGScommonHeader_t *) msg;
|
||||
|
||||
if ( header->sh > 4 )
|
||||
SGSabortUE(msg, UE);
|
||||
else {
|
||||
switch (header->epd) {
|
||||
SGSmobilitymanagementmessages:
|
||||
|
||||
switch (header->mt) {
|
||||
Registrationrequest:
|
||||
SGSregistrationReq(msg, UE);
|
||||
break;
|
||||
DeregistrationrequestUEoriginating:
|
||||
SGSderegistrationUEReq(msg, UE);
|
||||
break;
|
||||
Authenticationresponse:
|
||||
SGSauthenticationResp(msg, UE);
|
||||
break;
|
||||
Identityresponse:
|
||||
SGSidentityResp(msg, UE);
|
||||
break;
|
||||
Securitymodecomplete:
|
||||
SGSsecurityModeComplete(msg, UE);
|
||||
break;
|
||||
Registrationcomplete:
|
||||
SGSregistrationComplete(msg, UE);
|
||||
break;
|
||||
|
||||
default:
|
||||
SGSabortUE(msg, UE);
|
||||
}
|
||||
|
||||
break;
|
||||
SGSsessionmanagementmessages:
|
||||
SGSabortUE(msg, UE);
|
||||
break;
|
||||
|
||||
default:
|
||||
SGSabortUE(msg, UE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Messages emission
|
||||
*/
|
||||
|
||||
void identityRequest(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void authenticationRequest(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
|
||||
void securityModeCommand(void *msg, NRUEcontext_t *UE) {
|
||||
}
|
||||
Reference in New Issue
Block a user