building pdrs and fars in CreateSession #7
-
Hi @louisroyer, Thanks a lot for your nice code. Many thanks Roch. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To create a 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 If your question was about what they should contain exactly, everything is detailed on TS 129.244. |
Beta Was this translation helpful? Give feedback.
-
Perfect! Merci beaucoup :) |
Beta Was this translation helpful? Give feedback.
To create a
FarMap
, you have to first create an array ofCreateFar
IEs, and then you can callNewFARMap(fars []*ie.IE) (farmap *FARMap, err error, cause uint8, offendingIE uint16)
This is the same thing for PDRs with
NewPDRMap(pdrs []*ie.IE) (pdrmap *PDRMap, err error, cause uint8, offendingIE uint16)
, andCreatePDR
IE (containing at least a PDR ID, a Precedence, a PDI and…