Skip to content

Add xxxFields for GroupIE in Release 17#140

Open
kepinsu wants to merge 7 commits intowmnsk:mainfrom
kepinsu:main
Open

Add xxxFields for GroupIE in Release 17#140
kepinsu wants to merge 7 commits intowmnsk:mainfrom
kepinsu:main

Conversation

@kepinsu
Copy link

@kepinsu kepinsu commented Dec 16, 2025

Add xxxFields Features (it's very painful)

It's a pull request for #124

Group IE

Here is the list of IEs defined in Table 7.x instead of Clause 8.x in TS 29.244 (horewer, i don't implement any method to pass xxxFields to ie.IE object)

  • 1 Create PDR
  • 2 PDI
  • 3 Create FAR
  • 4 Forwarding Parameters
  • 5 Duplicating Parameters
  • 6 Create URR
  • 7 Create QER
  • 8 Created PDR
  • 9 Update PDR
  • 10 Update FAR
  • 11 Update Forwarding Parameters
  • 12 Update BAR (PFCP Session Report Response)
  • 13 Update URR
  • 14 Update QER
  • 15 Remove PDR
  • 16 Remove FAR
  • 17 Remove URR
  • 18 Remove QER
  • 51 Load Control Information
  • 54 Overload Control Information
  • 58 Application ID's PFDs
  • 59 PFD context
  • 68 Application Detection Information
  • 77 Query URR
  • 78 Usage Report (Session Modification Response)
  • 79 Usage Report (Session Deletion Response)
  • 80 Usage Report (Session Report Request)
  • 83 Downlink Data Report
  • 85 Create BAR
  • 86 Update BAR (Session Modification Request)
  • 87 Remove BAR
  • 99 Error Indication Report
  • 102 User Plane Path Failure Report
  • 105 Update Duplicating Parameters
  • 118 Aggregated URRs
  • 127 Create Traffic Endpoint
  • 128 Created Traffic Endpoint
  • 129 Update Traffic Endpoint
  • 130 Remove Traffic Endpoint
  • 132 Ethernet Packet Filter
  • 143 Ethernet Traffic Information
  • 147 Additional Monitoring Time
  • 165 Create MAR
  • 166 3GPP Access Forwarding Action Information
  • 167 Non-3GPP Access Forwarding Action Information
  • 168 Remove MAR
  • 169 Update MAR
  • 175 Update 3GPP Access Forwarding Action Information
  • 176 Update Non 3GPP Access Forwarding Action Information
  • 183 PFCP Session Retention Information (within PFCP Association Setup Request)
  • 187 User Plane Path Recovery Report
  • 189 Join IP Multicast Information IE within Usage Report
  • 190 Leave IP Multicast Information IE within Usage Report
  • 195 Created Bridge Info for TSC
  • 199 TSC Management Information IE within PFCP Session Modification Request
  • 200 TSC Management Information IE within PFCP Session Modification Response
  • 201 TSC Management Information IE within PFCP Session Report Request
  • 203 Clock Drift Control Information
  • 205 Clock Drift Report
  • 211 Remove SR
  • 212 Create SR
  • 213 Update SR
  • 214 Session Report
  • 216 Access Availability Control Information
  • 218 Access Availability Report
  • 220 Provide ATSSS Control Information
  • 221 ATSSS Control Parameters
  • 225 MPTCP Parameters
  • 226 ATSSS-LL Parameters
  • 227 PMF Parameters
  • 233 UE IP address Pool Information
  • 238 GTP-U Path QoS Control Information
  • 239 GTP-U Path QoS Report (PFCP Node Report Request)
  • 240 QoS Information in GTP-U Path QoS Report
  • 242 QoS Monitoring per QoS flow Control Information
  • 247 QoS Monitoring Report
  • 252 Packet Rate Status Report
  • 254 Ethernet Context Information
  • 255 Redundant Transmission Parameters
  • 256 Updated PDR
  • 261 Provide 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
  • 267 UE IP Address Usage Information
  • 270 Redundant Transmission Forwarding Parameters
  • 271 Transport Delay Reporting
  • 272 Partial Failure Information
  • 276 L2TP Tunnel Information
  • 277 L2TP Session Information
  • 279 Created L2TP Session
  • 290 PFCP Session Change Info
  • 295 Direct Reporting Information
  • 300 MBS Session N4mb Control Information
  • 301 MBS Multicast Parameters
  • 302 Add MBS Unicast Parameters
  • 303 MBS Session N4mb Information
  • 304 Remove MBS Unicast Parameters
  • 310 MBS Session N4 Control Information
  • 311 MBS Session N4 Information
  • 315 Peer UP Restart Report IE
  • 316 DSCP to PPI Control Information

Simple IE

  • AreaSessionID
  • CalledNumber
  • CallingNumber
  • ConfiguredTimeDomain
  • DNSServerAddress
  • DSCPToPPIMappingInformation
  • EventNotificationURI
  • GroupID
  • L2TPSessionIndications
  • LNSAddress
  • MaximumReceiveUnit
  • MBSN4RespFlags
  • MBSN4mbReqFlags
  • MBSUnicastParametersID
  • NBNSServerAddress
  • OffendingIEInformation
  • PMFAddressInformation
  • PredefinedRulesName
  • QERIndications
  • RATType
  • ReportingFlags
  • SteeringModeIndicator
  • Thresholds
  • TunnelPassword
  • TunnelPreference

Unfinished IE

  • L2TPUserAuthentication

@wmnsk
Copy link
Owner

wmnsk commented Jan 4, 2026

@kepinsu ready for review or do you still have anything to update?

@kepinsu
Copy link
Author

kepinsu commented Jan 4, 2026

Yes, it's ready for review

@kepinsu
Copy link
Author

kepinsu commented Jan 9, 2026

@wmnsk i put 2 commits, the first to update (it's my fault i forgot it...) the list of supported IEs in the readme.MD. The last, i changed (more exactly optimize) the way to retrieve the list of IEs contained (for createFARFields)

Copy link
Owner

@wmnsk wmnsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, but I think we need to discuss before actually implementing this:

The problem of defining the fields with built-in types is nil checking - we will no longer be able to differentiate if it is absent in the packet or it does but with empty value ("", 0, false, etc.), which wasn't discussed in the original ticket.
One way of avoiding this is to define all the fields as ie.IE and let users call the function with the same name (like what we do in the message structure.

Currently, we can get values like this. It's simple enough, but under the water, we iterate over the IEs at each line, so the more fields a user needs to access, the more expensive it gets.

// s = SessionEstablishmentRequest
s.CreateFAR.FARID()
s.CreateFAR.BARID()

// or like this;
createFAR := s.CreateFAR.CreateFAR()
createFAR.FARID()
createFAR.BARID()

Your implementation makes it more efficient, but as mentioned above, we can't tell the absence and initial value.

createFAR := s.CreateFAR.CreateFAR()

// both can be 0 if absent or it is actually 0
createFAR.FARID
createFAR.BARID

The suggested way (define every field as ie.IE type would make it look like this (not very much more useful/efficient than current implementation though);

createFAR := s.CreateFAR.CreateFAR()
createFAR.FARID.FARID()
createFAR.BARID.BARID()

// they can be nil-checked
if createFAR.FARID != nil { ... }

IMO, I'm inclined to keep the current implementation or defining with ie.IE. Users can still make it efficiently by defining an iterator over IEs that only retrieves the IEs that they need instead of using functions we provide (or they can choose to be inefficient but convenient).

Please check how you actually make use of the library-provided functions in your app, and let me know your thoughts.

Comment on lines +49 to +50

// Parse all IES heres
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Parse all IES heres

typo, but in the first place I don't think we need this comment, as it's obvious

if i.Type != AccessAvailabilityReport {
return nil, &InvalidTypeError{Type: i.Type}
}
// Check if the ie.Parse have called or not
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which kind of situation it is already parsed and it is not? Clarifying that in the comment would definitely help devs in the future.

RequestedAccessAvailabilityInformation uint8
}

func ParseAccessAvailabilityControlInformationFields(b []byte) (*AccessAvailabilityControlInformationFields, error) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing godoc comment

return c, nil
}

// ParseIEs will iterator over all childs IE to avoid to use Parse or ParseMultiIEs any time we iterate in IE
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// ParseIEs will iterator over all childs IE to avoid to use Parse or ParseMultiIEs any time we iterate in IE
// ParseIEs will iterate over all childs IE to avoid to use Parse or ParseMultiIEs any time we iterate in IE

typo, but is it necessary for this function to be exported?

Comment on lines +22 to +23
if len(ies.ActivatePredefinedRules) > 0 {
return ies.ActivatePredefinedRules, nil
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We return "" by default, so this check doesn't really do nothing. See the top-level comment for nil vs empty value handling

a := &AccessAvailabilityControlInformationFields{}
for _, ie := range ies {
if ie == nil {
continue
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, each XxxFields structure should have IEs or ExtraIEs that contains all the IEs that did not match the predefined types. This helps users access the IEs that we don't explicitly support (e.g., those added in the next spec update won't necessarily be added in structure in real-time).

@kepinsu
Copy link
Author

kepinsu commented Jan 28, 2026

Thank you for your feedback. You're right, I had written it for tracing but had overlooked the fact that users don't necessarily need all the fields (I was focused on my specific need at that moment).

I'll instead do it as you suggested.

type xxxFields{
 xxx *ie.IE
}

// Validate can be used to check if all mandatory fields is present or not
func (x *xxxFields) Validate() error{}

And I'll create it in a separate library that fits my needs (since I now also need to iterate over the fields without having all of them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants