nasConvert

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmfIdToModels

func AmfIdToModels(amfRegionId uint8, amfSetId uint16, amfPointer uint8) (amfId string)

func AmfIdToNas

func AmfIdToNas(amfId string) (amfRegionId uint8, amfSetId uint16, amfPointer uint8)

func DaylightSavingTimeToNas

func DaylightSavingTimeToNas(timezone string) (nasDaylightSavingTimeToNas nasType.NetworkDaylightSavingTime)

func FullNetworkNameToNas

func FullNetworkNameToNas(name string) (fullNetworkName nasType.FullNameForNetwork)

TS 24.501 9.11.3.35, TS 24.008 10.5.3.5a

func GPRSTimer2ToNas

func GPRSTimer2ToNas(timerValue int) (timerValueNas uint8)

TS 24.008 10.5.7.4, TS 24.501 9.11.2.4 the unit of timerValue is second

func GPRSTimer3ToNas

func GPRSTimer3ToNas(timerValue int) (timerValueNas uint8)

TS 24.008 10.5.7.4a

func GetTypeOfIdentity

func GetTypeOfIdentity(buf byte) uint8

func GutiToNas

func GutiToNas(guti string) nasType.GUTI5G

func GutiToString

func GutiToString(buf []byte) (guami models.Guami, guti string)

nasType: TS 24.501 9.11.3.4

func LadnToModels

func LadnToModels(buf []uint8) (dnnValues []string)

func LadnToNas

func LadnToNas(dnn string, taiLists []models.Tai) (ladnNas []uint8)

func LocalTimeZoneToNas

func LocalTimeZoneToNas(timezone string) (nasTimezone nasType.LocalTimeZone)

func ModelsToPDUSessionType

func ModelsToPDUSessionType(pduSessType models.PduSessionType) (nasPduSessType uint8)

func ModelsToSessionAMBR

func ModelsToSessionAMBR(ambr *models.Ambr) (sessAmbr nasType.SessionAMBR)

func NaiToString

func NaiToString(buf []byte) (nai string)

func PDUSessionReactivationResultErrorCauseToBuf

func PDUSessionReactivationResultErrorCauseToBuf(errPduSessionId, errCause []uint8) (buf []uint8)

func PDUSessionTypeToModels

func PDUSessionTypeToModels(nasPduSessType uint8) (pduSessType models.PduSessionType)

func PSIToBooleanArray

func PSIToBooleanArray(buf []uint8) (array [16]bool)

func PSIToBuf

func PSIToBuf(array [16]bool) []uint8

func PartialServiceAreaListToNas

func PartialServiceAreaListToNas(plmnID models.PlmnId, serviceAreaRestriction models.ServiceAreaRestriction) []byte

TS 24.501 9.11.3.49

func PeiToString

func PeiToString(buf []byte) string

PEI: ^(imei-[0-9]{15}|imeisv-[0-9]{16}|.+)$

func PlmnIDToNas

func PlmnIDToNas(plmnID models.PlmnId) []uint8

func PlmnIDToString

func PlmnIDToString(nasBuf []byte) string

func RejectedNssaiToNas

func RejectedNssaiToNas(rejectedNssaiInPlmn []models.Snssai, rejectedNssaiInTa []models.Snssai) nasType.RejectedNSSAI

func RejectedSnssaiToNas

func RejectedSnssaiToNas(snssai models.Snssai, rejectCause uint8) []uint8

func RequestedNssaiToModels

func RequestedNssaiToModels(nasNssai *nasType.RequestedNSSAI) ([]models.MappingOfSnssai, error)

TS 24.501 9.11.3.37

func ShortNetworkNameToNas

func ShortNetworkNameToNas(name string) (shortNetworkName nasType.ShortNameForNetwork)

func SnssaiToModels

func SnssaiToModels(nasSnssai *nasType.SNSSAI) (snssai models.Snssai)

func SnssaiToNas

func SnssaiToNas(snssai models.Snssai) []uint8

func SpareHalfOctetAndNgksiToModels

func SpareHalfOctetAndNgksiToModels(ngKsiNas nasType.SpareHalfOctetAndNgksi) (ngKsiModels models.NgKsi)

func SpareHalfOctetAndNgksiToNas

func SpareHalfOctetAndNgksiToNas(ngKsiModels models.NgKsi) (ngKsiNas nasType.SpareHalfOctetAndNgksi)

func SuciToString

func SuciToString(buf []byte) (suci string, plmnId string)

TS 24.501 9.11.3.4 suci(imsi) = "suci-0-${mcc}-${mnc}-${routingIndentifier}-${protectionScheme}-${homeNetworkPublicKeyIdentifier}-${schemeOutput}" suci(nai) = "nai-${naiString}"

func TaiListToNas

func TaiListToNas(taiList []models.Tai) []uint8

TS 24.501 9.11.3.9

func UESecurityCapabilityToByteArray

func UESecurityCapabilityToByteArray(buf []uint8) (nea, nia, eea, eia [2]byte)

func UpuAckToModels

func UpuAckToModels(buf []uint8) (string, error)

func UpuInfoToNas

func UpuInfoToNas(upuInfo models.UpuInfo) []uint8

subclause 9.11.3.53A in 3GPP TS 24.501.

Types

type PCOReadingState

type PCOReadingState int
const (
	ReadingID PCOReadingState = iota
	ReadingLength
	ReadingContent
)

type ProtocolConfigurationOptions

type ProtocolConfigurationOptions struct {
	ProtocolOrContainerList []*ProtocolOrContainerUnit
}

func NewProtocolConfigurationOptions

func NewProtocolConfigurationOptions() (pco *ProtocolConfigurationOptions)

func (*ProtocolConfigurationOptions) AddDNSServerIPv4Address

func (protocolConfigurationOptions *ProtocolConfigurationOptions) AddDNSServerIPv4Address(dnsIP net.IP) (err error)

func (*ProtocolConfigurationOptions) AddDNSServerIPv4AddressRequest

func (protocolConfigurationOptions *ProtocolConfigurationOptions) AddDNSServerIPv4AddressRequest()

func (*ProtocolConfigurationOptions) AddDNSServerIPv6Address

func (protocolConfigurationOptions *ProtocolConfigurationOptions) AddDNSServerIPv6Address(dnsIP net.IP) (err error)

func (*ProtocolConfigurationOptions) AddDNSServerIPv6AddressRequest

func (protocolConfigurationOptions *ProtocolConfigurationOptions) AddDNSServerIPv6AddressRequest()

func (*ProtocolConfigurationOptions) AddIPAddressAllocationViaNASSignallingUL

func (protocolConfigurationOptions *ProtocolConfigurationOptions) AddIPAddressAllocationViaNASSignallingUL()

func (*ProtocolConfigurationOptions) AddIPv4LinkMTU

func (protocolConfigurationOptions *ProtocolConfigurationOptions) AddIPv4LinkMTU(mtu uint16) (err error)

func (*ProtocolConfigurationOptions) AddPCSCFIPv4Address

func (protocolConfigurationOptions *ProtocolConfigurationOptions) AddPCSCFIPv4Address(pcscfIP net.IP) (err error)

func (*ProtocolConfigurationOptions) Marshal

func (protocolConfigurationOptions *ProtocolConfigurationOptions) Marshal() []byte

func (*ProtocolConfigurationOptions) UnMarshal

func (protocolConfigurationOptions *ProtocolConfigurationOptions) UnMarshal(data []byte) error

type ProtocolOrContainerUnit

type ProtocolOrContainerUnit struct {
	ProtocolOrContainerID uint16
	LengthOfContents      uint8
	Contents              []byte
}

func NewProtocolOrContainerUnit

func NewProtocolOrContainerUnit() (pcu *ProtocolOrContainerUnit)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL