Skip to content

building pdrs and fars in CreateSession #7

Answered by louisroyer
ranomine asked this question in Q&A
Discussion options

You must be logged in to vote

To create a FarMap, you have to first create an array of CreateFar IEs, and then you can call NewFARMap(fars []*ie.IE) (farmap *FARMap, err error, cause uint8, offendingIE uint16)

	import "github.com/wmnsk/go-pfcp/ie"
	createFar := ie.NewCreateFAR(
		ie.NewFARID(1), // FAR ID is 1
		ie.NewApplyAction(0x01), // set the DROP flag
	),
	f := make([]*ie.IE, 0)
	f = append(f, createFar)
	farMap, _, _,_ := NewFARMap(f)
	
	// same (but not detailed here) for pdrMap
	// …
	a.CreateSession(pdrMap, farMap)

This is the same thing for PDRs with NewPDRMap(pdrs []*ie.IE) (pdrmap *PDRMap, err error, cause uint8, offendingIE uint16), and CreatePDR IE (containing at least a PDR ID, a Precedence, a PDI and…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by louisroyer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
PFCP Related to the PFCP-networking library
2 participants
Converted from issue

This discussion was converted from issue #6 on September 18, 2024 10:36.