Documentation
¶
Overview ¶
*
- SPDX-License-Identifier: Apache-2.0
- © Copyright 2023 Hewlett Packard Enterprise Development LP
Index ¶
- Constants
- func AlgorithmKeyDerivation(cipheringAlg uint8, kamf []byte, knasEnc *[16]uint8, integrityAlg uint8, ...) error
- func BuildAuthenticationResponse(opts *AuthenticationResponseOpts) ([]byte, error)
- func BuildConfigurationUpdateComplete() ([]byte, error)
- func BuildDeregistrationRequest(opts *DeregistrationRequestOpts) ([]byte, error)
- func BuildIMEISV(imeisv string) (*nasType.IMEISV, error)
- func BuildIdentityResponse(opts *IdentityResponseOpts) ([]byte, error)
- func BuildPduSessionEstablishmentRequest(opts *PduSessionEstablishmentRequestOpts) ([]byte, error)
- func BuildRegistrationComplete(opts *RegistrationCompleteOpts) ([]byte, error)
- func BuildRegistrationRequest(opts *RegistrationRequestOpts) ([]byte, error)
- func BuildSecurityModeComplete(opts *SecurityModeCompleteOpts) ([]byte, error)
- func BuildServiceRequest(opts *ServiceRequestOpts) ([]byte, error)
- func BuildUplinkNasTransport(opts *UplinkNasTransportOpts) ([]byte, error)
- func SelectAlgorithms(securityCapability *nasType.UESecurityCapability) (uint8, uint8, error)
- type Amf
- type AuthenticationResponseOpts
- type DeregistrationRequestOpts
- type IdentityResponseOpts
- type PDUSessionInfo
- type PduSessionEstablishmentRequestOpts
- type RegistrationCompleteOpts
- type RegistrationRequestOpts
- type SecurityModeCompleteOpts
- type ServiceRequestOpts
- type UE
- func (ue *UE) DecodeNAS(message []byte) (*nas.Message, error)
- func (ue *UE) DerivateAlgKey() error
- func (ue *UE) DerivateKamf(key []byte, snName string, SQN, AK []byte) error
- func (ue *UE) DeriveRESstarAndSetKey(authSubs models.AuthenticationSubscription, RAND []byte, snName string, ...) ([]byte, error)
- func (ue *UE) EncodeNasPduWithSecurity(pdu []byte, securityHeaderType uint8) ([]byte, error)
- func (ue *UE) EncodeSuci() (nasType.MobileIdentity5GS, error)
- func (ue *UE) Get5gGuti() *nasType.GUTI5G
- func (ue *UE) GetAmfPointer() uint8
- func (ue *UE) GetAmfSetId() uint16
- func (ue *UE) GetMccAndMncInOctets() ([]byte, error)
- func (ue *UE) GetPDUSession(pduSessionID uint8) PDUSessionInfo
- func (ue *UE) GetRoutingIndicatorInOctets() ([]byte, error)
- func (ue *UE) GetSuci() nasType.MobileIdentity5GS
- func (ue *UE) GetTMSI5G() [4]uint8
- func (ue *UE) NASEncode(msg *nas.Message, securityHeaderType uint8) ([]byte, error)
- func (ue *UE) RRCRelease()
- func (ue *UE) SendDeregistrationRequest(amfUENGAPID int64, ranUENGAPID int64) error
- func (ue *UE) SendDownlinkNAS(msg []byte, amfUENGAPID int64, ranUENGAPID int64) error
- func (ue *UE) SendPDUSessionEstablishmentRequest(amfUENGAPID int64, ranUENGAPID int64, pduSessionID uint8, dnn string, ...) error
- func (ue *UE) SendRegistrationRequest(ranUENGAPID int64, regType uint8) error
- func (ue *UE) SendServiceRequest(ranUENGAPID int64, pduSessionStatus [16]bool, serviceType uint8) error
- func (ue *UE) Set5gGuti(guti *nasType.GUTI5G)
- func (ue *UE) SetAmfMccAndMnc(mcc string, mnc string)
- func (ue *UE) SetAuthSubscription(k, opc, amf, sqn string)
- func (ue *UE) SetPDUSession(pduSession PDUSessionInfo)
- func (ue *UE) WaitForNASGMMMessage(msgType uint8, timeout time.Duration) (*nas.Message, error)
- func (ue *UE) WaitForNASGSMMessage(msgType uint8, timeout time.Duration) (*nas.Message, error)
- func (ue *UE) WaitForPDUSession(pduSessionID uint8, timeout time.Duration) (PDUSessionInfo, error)
- func (ue *UE) WaitForRRCRelease(timeout time.Duration) error
- type UEOpts
- type UESecurity
- type UplinkNasTransportOpts
Constants ¶
View Source
const ( MM5G_NULL = 0x00 MM5G_DEREGISTERED = 0x01 MM5G_REGISTERED_INITIATED = 0x02 MM5G_REGISTERED = 0x03 MM5G_SERVICE_REQ_INIT = 0x04 MM5G_DEREGISTERED_INIT = 0x05 MM5G_IDLE = 0x06 )
Variables ¶
This section is empty.
Functions ¶
func AlgorithmKeyDerivation ¶
func AlgorithmKeyDerivation(cipheringAlg uint8, kamf []byte, knasEnc *[16]uint8, integrityAlg uint8, knasInt *[16]uint8) error
Algorithm key Derivation function defined in TS 33.501 Annex A.9
func BuildAuthenticationResponse ¶
func BuildAuthenticationResponse(opts *AuthenticationResponseOpts) ([]byte, error)
func BuildDeregistrationRequest ¶
func BuildDeregistrationRequest(opts *DeregistrationRequestOpts) ([]byte, error)
func BuildIdentityResponse ¶
func BuildIdentityResponse(opts *IdentityResponseOpts) ([]byte, error)
func BuildPduSessionEstablishmentRequest ¶
func BuildPduSessionEstablishmentRequest(opts *PduSessionEstablishmentRequestOpts) ([]byte, error)
func BuildRegistrationComplete ¶
func BuildRegistrationComplete(opts *RegistrationCompleteOpts) ([]byte, error)
func BuildRegistrationRequest ¶
func BuildRegistrationRequest(opts *RegistrationRequestOpts) ([]byte, error)
func BuildSecurityModeComplete ¶
func BuildSecurityModeComplete(opts *SecurityModeCompleteOpts) ([]byte, error)
func BuildServiceRequest ¶
func BuildServiceRequest(opts *ServiceRequestOpts) ([]byte, error)
func BuildUplinkNasTransport ¶
func BuildUplinkNasTransport(opts *UplinkNasTransportOpts) ([]byte, error)
func SelectAlgorithms ¶
func SelectAlgorithms(securityCapability *nasType.UESecurityCapability) (uint8, uint8, error)
Types ¶
type DeregistrationRequestOpts ¶
type DeregistrationRequestOpts struct {
Guti *nasType.GUTI5G
Suci *nasType.MobileIdentity5GS
Ksi int32
}
type IdentityResponseOpts ¶
type IdentityResponseOpts struct {
Suci nasType.MobileIdentity5GS
}
type PDUSessionInfo ¶
type RegistrationCompleteOpts ¶
type RegistrationCompleteOpts struct {
SORTransparentContainer []uint8
}
type RegistrationRequestOpts ¶
type RegistrationRequestOpts struct {
RegistrationType uint8
RequestedNSSAI *nasType.RequestedNSSAI
UplinkDataStatus *nasType.UplinkDataStatus
IncludeCapability bool
UESecurity *UESecurity
PDUSessionStatus *[16]bool
}
type SecurityModeCompleteOpts ¶
type SecurityModeCompleteOpts struct {
UESecurity *UESecurity
IMEISV string
PDUSessionStatus *[16]bool
}
type ServiceRequestOpts ¶
type UE ¶
type UE struct {
UeSecurity *UESecurity
StateMM int
DNN string
PDUSessionID uint8
PDUSessionType uint8
Snssai models.Snssai
IMEISV string
Gnb air.UplinkSender
PDUSessions map[uint8]PDUSessionInfo
// contains filtered or unexported fields
}
func (*UE) DerivateAlgKey ¶
func (*UE) DerivateKamf ¶
func (*UE) DeriveRESstarAndSetKey ¶
func (*UE) EncodeNasPduWithSecurity ¶
func (*UE) EncodeSuci ¶
func (ue *UE) EncodeSuci() (nasType.MobileIdentity5GS, error)
func (*UE) GetAmfPointer ¶
func (*UE) GetAmfSetId ¶
func (*UE) GetMccAndMncInOctets ¶
func (*UE) GetPDUSession ¶
func (ue *UE) GetPDUSession(pduSessionID uint8) PDUSessionInfo
func (*UE) GetRoutingIndicatorInOctets ¶
TS 24.501 9.11.3.4.1 Routing Indicator shall consist of 1 to 4 digits. The coding of this field is the responsibility of home network operator but BCD coding shall be used. If a network operator decides to assign less than 4 digits to Routing Indicator, the remaining digits shall be coded as "1111" to fill the 4 digits coding of Routing Indicator (see NOTE 2). If no Routing Indicator is configured in the USIM, the UE shall code bits 1 to 4 of octet 8 of the Routing Indicator as "0000" and the remaining digits as “1111".
func (*UE) GetSuci ¶
func (ue *UE) GetSuci() nasType.MobileIdentity5GS
func (*UE) RRCRelease ¶
func (ue *UE) RRCRelease()
func (*UE) SendDeregistrationRequest ¶
func (*UE) SendDownlinkNAS ¶
func (*UE) SendPDUSessionEstablishmentRequest ¶
func (*UE) SendRegistrationRequest ¶
func (*UE) SendServiceRequest ¶
func (*UE) SetAmfMccAndMnc ¶
func (*UE) SetAuthSubscription ¶
func (*UE) SetPDUSession ¶
func (ue *UE) SetPDUSession(pduSession PDUSessionInfo)
func (*UE) WaitForNASGMMMessage ¶
func (*UE) WaitForNASGSMMessage ¶
func (*UE) WaitForPDUSession ¶
type UEOpts ¶
type UEOpts struct {
PDUSessionID uint8
PDUSessionType uint8
Msin string
UeSecurityCapability *nasType.UESecurityCapability
K string
OpC string
Amf string
Sqn string
Mcc string
Mnc string
HomeNetworkPublicKey sidf.HomeNetworkPublicKey
RoutingIndicator string
DNN string
Sst int32
Sd string
IMEISV string
Guti *nasType.GUTI5G
GnodeB air.UplinkSender
}
type UESecurity ¶
type UESecurity struct {
Supi string
Msin string
ULCount security.Count
DLCount security.Count
UeSecurityCapability *nasType.UESecurityCapability
IntegrityAlg uint8
CipheringAlg uint8
NgKsi models.NgKsi
Snn string
KnasEnc [16]uint8
KnasInt [16]uint8
Kamf []uint8
AuthenticationSubs models.AuthenticationSubscription
Suci nasType.MobileIdentity5GS
RoutingIndicator string
Guti *nasType.GUTI5G
// contains filtered or unexported fields
}
Source Files
¶
- auth.go
- build_configuration_update_command_complete.go
- build_deregistration_request.go
- build_identity_response.go
- build_pdu_session_establishment_request.go
- build_registration_complete.go
- build_registration_request.go
- build_registration_response.go
- build_security_mode_complete.go
- build_service_request.go
- build_uplink_nas_transport.go
- cause.go
- handle_authentication_reject.go
- handle_authentication_request.go
- handle_configuration_update_command.go
- handle_deregistration_request_ue_terminated.go
- handle_downlink_nas_transport.go
- handle_identity_request.go
- handle_pdu_session_establishment_accept.go
- handle_pdu_session_establishment_reject.go
- handle_registration_accept.go
- handle_registration_reject.go
- handle_security_mode_command.go
- handle_service_accept.go
- msg_name.go
- nas_decode.go
- nas_encode.go
- ue.go
Click to show internal directories.
Click to hide internal directories.