Skip to content

Commit

Permalink
Add new IE definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
wmnsk committed Apr 25, 2021
1 parent 9389c03 commit 09c907c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,22 @@ IEs are (basically) implemented in conformance with TS29.244 V16.3.1(2020-04).
| 254 | Ethernet Context Information | Yes |
| 255 | Redundant Transmission Parameters | Yes |
| 256 | Updated PDR | Yes |
| 257 to 32767 | _(For future use)_ | - |
| 257 | S-NSSAI | |
| 258 | IP version | |
| 259 | PFCPASReq-Flags | |
| 260 | Data Status | |
| 261 | Provide RDS configuration information | |
| 262 | RDS configuration information | |
| 263 | Query Packet Rate Status IE within PFCP Session Modification Request | |
| 264 | Packet Rate Status Report IE within PFCP Session Modification Response | |
| 265 | MPTCP Applicable Indication | |
| 266 | Bridge Management Information Container | |
| 267 | UE IP Address Usage Information | |
| 268 | Number of UE IP Addresses | |
| 269 | Validity Timer | |
| 270 | Redundant Transmission Forwarding Parameters | |
| 271 | Transport Delay Reporting | |
| 272 to 32767 | _(For future use)_ | - |
| 32768 to 65535 | Reserved for vendor specific IEs | - |

## Author(s)
Expand Down
21 changes: 19 additions & 2 deletions ie/ie.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,21 @@ const (
EthernetContextInformation uint16 = 254
RedundantTransmissionParameters uint16 = 255
UpdatedPDR uint16 = 256
SNSSAI uint16 = 257
IPVersion uint16 = 258
PFCPASReqFlags uint16 = 259
DataStatus uint16 = 260
ProvideRDSConfigurationInformation uint16 = 261
RDSConfigurationInformation uint16 = 262
QueryPacketRateStatusIEWithinPFCPSessionModificationRequest uint16 = 263
PacketRateStatusReportIEWithinPFCPSessionModificationResponse uint16 = 264
MPTCPApplicableIndication uint16 = 265
BridgeManagementInformationContainer uint16 = 266
UEIPAddressUsageInformation uint16 = 267
NumberOfUEIPAddresses uint16 = 268
ValidityTimer uint16 = 269
RedundantTransmissionForwardingParameters uint16 = 270
TransportDelayReporting uint16 = 271
)

// IE represents an Information Element of PFCP messages.
Expand Down Expand Up @@ -334,16 +349,18 @@ func (i *IE) UnmarshalBinary(b []byte) error {
i.Length = binary.BigEndian.Uint16(b[2:4])

offset := 4
end := int(i.Length)
if i.IsVendorSpecific() && l >= 6 {
i.EnterpriseID = binary.BigEndian.Uint16(b[4:6])
offset += 2
end -= 2
}

if l <= offset {
return nil
}

i.Payload = b[offset : offset+int(i.Length)]
i.Payload = b[offset : offset+end]

if i.IsGrouped() {
var err error
Expand Down Expand Up @@ -391,7 +408,7 @@ func (i *IE) MarshalTo(b []byte) error {
return nil
}

copy(b[4:i.MarshalLen()], i.Payload)
copy(b[offset:i.MarshalLen()], i.Payload)
return nil
}

Expand Down

0 comments on commit 09c907c

Please sign in to comment.