Documentation ¶
Index ¶
- Constants
- func DelAccessAndMobilitySubscriptionDataFromMongoDB(ueId string, servingPlmnId string)
- func DelAmPolicyDataFromMongoDB(ueId string)
- func DelAuthSubscriptionToMongoDB(ueId string)
- func DelSessionManagementSubscriptionDataFromMongoDB(ueId string, servingPlmnId string)
- func DelSmPolicyDataFromMongoDB(ueId string)
- func DelSmfSelectionSubscriptionDataFromMongoDB(ueId string, servingPlmnId string)
- func EncodeNasPduWithSecurity(ue *RanUeContext, pdu []byte) ([]byte, error)
- func GetAccessAndMobilitySubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.AccessAndMobilitySubscriptionData)
- func GetAmPolicyDataFromMongoDB(ueId string) (amPolicyData *models.AmPolicyData)
- func GetAuthSubscriptionFromMongoDB(ueId string) (authSubs *models.AuthenticationSubscription)
- func GetHandoverNotify(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetHandoverRequestAcknowledge(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetHandoverRequired(amfUeNgapID int64, ranUeNgapID int64, targetGNBID []byte, targetCellID []byte) ([]byte, error)
- func GetInitialContextSetupResponse(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetInitialContextSetupResponseForServiceRequest(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)
- func GetInitialUEMessage(ranUeNgapID int64, nasPdu []byte, fiveGSTmsi string) ([]byte, error)
- func GetNGSetupRequest(gnbId []byte, bitlength uint64, name string) ([]byte, error)
- func GetNasPdu(msg *ngapType.DownlinkNASTransport) (m *nas.Message)
- func GetPDUSessionResourceReleaseResponse(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetPDUSessionResourceSetupResponse(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)
- func GetPDUSessionResourceSetupResponseForPaging(amfUeNgapID int64, ranUeNgapID int64, ipv4 string) ([]byte, error)
- func GetPathSwitchRequest(amfUeNgapID int64, ranUeNgapID int64) ([]byte, error)
- func GetSessionManagementDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.SessionManagementSubscriptionData)
- func GetSmPolicyDataFromMongoDB(ueId string) (smPolicyData *models.SmPolicyData)
- func GetSmfSelectionSubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (smfSelData *models.SmfSelectionSubscriptionData)
- func GetUEContextReleaseComplete(amfUeNgapID int64, ranUeNgapID int64, pduSessionIDList []int64) ([]byte, error)
- func GetUEContextReleaseRequest(amfUeNgapID int64, ranUeNgapID int64, pduSessionIDList []int64) ([]byte, error)
- func GetUplinkNASTransport(amfUeNgapID, ranUeNgapID int64, nasPdu []byte) ([]byte, error)
- func InsertAccessAndMobilitySubscriptionDataToMongoDB(ueId string, amData models.AccessAndMobilitySubscriptionData, ...)
- func InsertAmPolicyDataToMongoDB(ueId string, amPolicyData models.AmPolicyData)
- func InsertAuthSubscriptionToMongoDB(ueId string, authSubs models.AuthenticationSubscription)
- func InsertSessionManagementSubscriptionDataToMongoDB(ueId string, servingPlmnId string, ...)
- func InsertSmPolicyDataToMongoDB(ueId string, smPolicyData models.SmPolicyData)
- func InsertSmfSelectionSubscriptionDataToMongoDB(ueId string, smfSelData models.SmfSelectionSubscriptionData, ...)
- func NASDecode(ue *RanUeContext, securityHeaderType uint8, payload []byte) (msg *nas.Message, err error)
- func NASEncode(ue *RanUeContext, msg *nas.Message) (payload []byte, err error)
- func NasEncrypt(AlgoID uint8, KnasEnc []byte, Count []byte, Bearer uint8, Direction uint8, ...) error
- func NasMacCalculate(AlgoID uint8, KnasInt []byte, Count []byte, Bearer uint8, Direction uint8, ...) ([]byte, error)
- type RanUeContext
- func (ue *RanUeContext) DerivateAlgKey()
- func (ue *RanUeContext) DerivateKamf(key []byte, snName string, SQN, AK []byte)
- func (ue *RanUeContext) DeriveRESstarAndSetKey(authSubs models.AuthenticationSubscription, RAND []byte, snNmae string) []byte
- func (ue *RanUeContext) GetSecurityDLCount() []byte
- func (ue *RanUeContext) GetSecurityULCount() []byte
Constants ¶
View Source
const ( N_NAS_ENC_ALG uint8 = 0x01 N_NAS_INT_ALG uint8 = 0x02 N_RRC_ENC_ALG uint8 = 0x03 N_RRC_INT_ALG uint8 = 0x04 N_UP_ENC_alg uint8 = 0x05 N_UP_INT_alg uint8 = 0x06 )
TS 33501 Annex A.8 Algorithm distinguisher For Knas_int Knas_enc
View Source
const ( ALG_INTEGRITY_128_NIA0 uint8 = 0x00 // NULL ALG_INTEGRITY_128_NIA1 uint8 = 0x01 // 128-Snow3G ALG_INTEGRITY_128_NIA2 uint8 = 0x02 // 128-AES ALG_INTEGRITY_128_NIA3 uint8 = 0x03 // 128-ZUC )
TS 33501 Annex D Algorithm identifier values For Knas_int
View Source
const ( ALG_CIPHERING_128_NEA0 uint8 = 0x00 // NULL ALG_CIPHERING_128_NEA1 uint8 = 0x01 // 128-Snow3G ALG_CIPHERING_128_NEA2 uint8 = 0x02 // 128-AES ALG_CIPHERING_128_NEA3 uint8 = 0x03 // 128-ZUC )
TS 33501 Annex D Algorithm identifier values For Knas_enc
View Source
const ( SECURITY_DIRECTION_UPLINK uint8 = 0x00 SECURITY_DIRECTION_DOWNLINK uint8 = 0x01 )
1bit
View Source
const ( SECURITY_ONLY_ONE_BEARER uint8 = 0x00 SECURITY_BEARER_3GPP uint8 = 0x01 SECURITY_BEARER_NON_3GPP uint8 = 0x02 )
5bits
View Source
const ( ACCESS_TYPE_3GPP uint8 = 0x01 ACCESS_TYPE_NON_3GPP uint8 = 0x02 )
TS 33501 Annex A.0 Access type distinguisher For Kgnb Kn3iwf
Variables ¶
This section is empty.
Functions ¶
func DelAmPolicyDataFromMongoDB ¶
func DelAmPolicyDataFromMongoDB(ueId string)
func DelAuthSubscriptionToMongoDB ¶
func DelAuthSubscriptionToMongoDB(ueId string)
func DelSmPolicyDataFromMongoDB ¶
func DelSmPolicyDataFromMongoDB(ueId string)
func EncodeNasPduWithSecurity ¶
func EncodeNasPduWithSecurity(ue *RanUeContext, pdu []byte) ([]byte, error)
func GetAccessAndMobilitySubscriptionDataFromMongoDB ¶
func GetAccessAndMobilitySubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.AccessAndMobilitySubscriptionData)
func GetAmPolicyDataFromMongoDB ¶
func GetAmPolicyDataFromMongoDB(ueId string) (amPolicyData *models.AmPolicyData)
func GetAuthSubscriptionFromMongoDB ¶
func GetAuthSubscriptionFromMongoDB(ueId string) (authSubs *models.AuthenticationSubscription)
func GetHandoverNotify ¶
func GetHandoverRequired ¶
func GetInitialUEMessage ¶
func GetNGSetupRequest ¶
func GetPathSwitchRequest ¶
func GetSessionManagementDataFromMongoDB ¶
func GetSessionManagementDataFromMongoDB(ueId string, servingPlmnId string) (amData *models.SessionManagementSubscriptionData)
func GetSmPolicyDataFromMongoDB ¶
func GetSmPolicyDataFromMongoDB(ueId string) (smPolicyData *models.SmPolicyData)
func GetSmfSelectionSubscriptionDataFromMongoDB ¶
func GetSmfSelectionSubscriptionDataFromMongoDB(ueId string, servingPlmnId string) (smfSelData *models.SmfSelectionSubscriptionData)
func GetUplinkNASTransport ¶
func InsertAccessAndMobilitySubscriptionDataToMongoDB ¶
func InsertAccessAndMobilitySubscriptionDataToMongoDB(ueId string, amData models.AccessAndMobilitySubscriptionData, servingPlmnId string)
func InsertAmPolicyDataToMongoDB ¶
func InsertAmPolicyDataToMongoDB(ueId string, amPolicyData models.AmPolicyData)
func InsertAuthSubscriptionToMongoDB ¶
func InsertAuthSubscriptionToMongoDB(ueId string, authSubs models.AuthenticationSubscription)
func InsertSessionManagementSubscriptionDataToMongoDB ¶
func InsertSessionManagementSubscriptionDataToMongoDB(ueId string, servingPlmnId string, smData models.SessionManagementSubscriptionData)
func InsertSmPolicyDataToMongoDB ¶
func InsertSmPolicyDataToMongoDB(ueId string, smPolicyData models.SmPolicyData)
func InsertSmfSelectionSubscriptionDataToMongoDB ¶
func InsertSmfSelectionSubscriptionDataToMongoDB(ueId string, smfSelData models.SmfSelectionSubscriptionData, servingPlmnId string)
func NasEncrypt ¶
Types ¶
type RanUeContext ¶
type RanUeContext struct { Supi string RanUeNgapId int64 AmfUeNgapId int64 ULCount uint32 DLOverflow uint16 DLCountSQN uint8 CipheringAlg uint8 IntegrityAlg uint8 KnasEnc []uint8 KnasInt []uint8 Kamf []uint8 AuthenticationSubs models.AuthenticationSubscription }
func NewRanUeContext ¶
func NewRanUeContext(supi string, ranUeNgapId int64, cipheringAlg, integrityAlg uint8) *RanUeContext
func (*RanUeContext) DerivateAlgKey ¶
func (ue *RanUeContext) DerivateAlgKey()
Algorithm key Derivation function defined in TS 33.501 Annex A.9
func (*RanUeContext) DerivateKamf ¶
func (ue *RanUeContext) DerivateKamf(key []byte, snName string, SQN, AK []byte)
func (*RanUeContext) DeriveRESstarAndSetKey ¶
func (ue *RanUeContext) DeriveRESstarAndSetKey(authSubs models.AuthenticationSubscription, RAND []byte, snNmae string) []byte
func (*RanUeContext) GetSecurityDLCount ¶
func (ue *RanUeContext) GetSecurityDLCount() []byte
func (*RanUeContext) GetSecurityULCount ¶
func (ue *RanUeContext) GetSecurityULCount() []byte
Click to show internal directories.
Click to hide internal directories.