Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply gofmt to some files and add GO report card #40

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ Copyright 2021-present Open Networking Foundation
SPDX-License-Identifier: Apache-2.0

-->
[![Go Report Card](https://goreportcard.com/badge/github.com/omec-project/nas)](https://goreportcard.com/report/github.com/omec-project/nas)

# nas

1. Implementation of 3gpp specification 24.501 release 15 specification.

2. Supports NAS encoding/decoding of messages.
2. Supports NAS encoding/decoding of messages.

3. This module supports integrity & Ciphering algorithms

Expand Down
1 change: 1 addition & 0 deletions nas.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func NewGsmMessage() *GsmMessage {

// GmmHeader Octet1 protocolDiscriminator securityHeaderType
// Octet2 MessageType

type GmmHeader struct {
Octet [3]uint8
}
Expand Down
2 changes: 1 addition & 1 deletion nasMessage/NAS_CommInfoIE.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const (
SessionAMBRUnit256Pbps uint8 = 0x19
)

//TS 24.008 10.5.6.3
// TS 24.008 10.5.6.3
const (
PCSCFIPv6AddressRequestUL uint16 = 0x0001
IMCNSubsystemSignalingFlagUL uint16 = 0x0002
Expand Down
2 changes: 1 addition & 1 deletion nasMessage/NAS_DLNASTransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"bytes"
"encoding/binary"
"fmt"
"net"
"github.com/omec-project/nas/nasType"
"net"
)

type DLNASTransport struct {
Expand Down
2 changes: 1 addition & 1 deletion nasType/NAS_AllowedSSCMode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestNasTypeNewAllowedSSCMode(t *testing.T) {
assert.NotNil(t, a)
}

//var nasTypePDUSessionEstablishmentRejectAllowedSSCModeOut = (nasMessage.PDUSessionEstablishmentRejectAllowedSSCModeType & 15) << 4
// var nasTypePDUSessionEstablishmentRejectAllowedSSCModeOut = (nasMessage.PDUSessionEstablishmentRejectAllowedSSCModeType & 15) << 4
var nasTypePDUSessionEstablishmentRejectAllowedSSCModeTable = []NasTypeIeiData{
{pDUSessionEstablishmentRejectAllowedSSCModeIeiInput, pDUSessionEstablishmentRejectAllowedSSCModeIeiInput},
}
Expand Down
8 changes: 4 additions & 4 deletions nasType/NAS_PDUSessionStatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ type testPDUSessionStatusDataTemplate struct {
}

/*
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.

REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
*/
var PDUSessionStatusTestData = []nasType.PDUSessionStatus{
{nasMessage.ServiceRequestPDUSessionStatusType, 2, []uint8{}},
Expand Down
8 changes: 4 additions & 4 deletions nasType/NAS_UplinkDataStatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ type testUplinkDataStatusDataTemplate struct {
}

/*
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.

REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
*/
var UplinkDataStatusTestData = []nasType.UplinkDataStatus{
{nasMessage.ServiceRequestUplinkDataStatusType, 2, []uint8{}},
Expand Down