@@ -16,9 +16,9 @@ import (
1616 "google.golang.org/grpc"
1717
1818 "github.com/wmnsk/go-gtp/examples/gw-tester/s1mme"
19- v2 "github.com/wmnsk/go-gtp/v2 "
20- "github.com/wmnsk/go-gtp/v2/ies "
21- "github.com/wmnsk/go-gtp/v2/messages "
19+ v2 "github.com/wmnsk/go-gtp/gtpv2 "
20+ "github.com/wmnsk/go-gtp/gtpv2/ie "
21+ "github.com/wmnsk/go-gtp/gtpv2/message "
2222)
2323
2424// Session represents a subscriber.
@@ -129,9 +129,9 @@ func (m *mme) run(ctx context.Context) error {
129129 log .Printf ("Started serving S11 on: %s" , m .s11Addr )
130130
131131 m .s11Conn .AddHandlers (map [uint8 ]v2.HandlerFunc {
132- messages .MsgTypeCreateSessionResponse : m .handleCreateSessionResponse ,
133- messages .MsgTypeModifyBearerResponse : m .handleModifyBearerResponse ,
134- messages .MsgTypeDeleteSessionResponse : m .handleDeleteSessionResponse ,
132+ message .MsgTypeCreateSessionResponse : m .handleCreateSessionResponse ,
133+ message .MsgTypeModifyBearerResponse : m .handleModifyBearerResponse ,
134+ message .MsgTypeDeleteSessionResponse : m .handleDeleteSessionResponse ,
135135 })
136136
137137 // start serving Prometheus, if address is given
@@ -265,30 +265,30 @@ func (m *mme) CreateSession(sess *Session) (*v2.Session, error) {
265265
266266 session , _ , err := m .s11Conn .CreateSession (
267267 raddr ,
268- ies .NewIMSI (sess .IMSI ),
269- ies .NewMSISDN (sess .MSISDN ),
270- ies .NewMobileEquipmentIdentity (sess .IMEISV ),
271- ies .NewUserLocationInformation (
268+ ie .NewIMSI (sess .IMSI ),
269+ ie .NewMSISDN (sess .MSISDN ),
270+ ie .NewMobileEquipmentIdentity (sess .IMEISV ),
271+ ie .NewUserLocationInformation (
272272 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 ,
273273 m .enb .mcc , m .enb .mnc , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 ,
274274 ),
275- ies .NewRATType (v2 .RATTypeEUTRAN ),
276- ies .NewIndicationFromOctets (0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ),
275+ ie .NewRATType (v2 .RATTypeEUTRAN ),
276+ ie .NewIndicationFromOctets (0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ),
277277 m .s11Conn .NewSenderFTEID (m .s11IP , "" ),
278- ies .NewFullyQualifiedTEID (v2 .IFTypeS5S8PGWGTPC , 0 , m .pgw .s5cIP , "" ).WithInstance (1 ),
279- ies .NewAccessPointName (m .apn ),
280- ies .NewSelectionMode (v2 .SelectionModeMSorNetworkProvidedAPNSubscribedVerified ),
281- ies .NewPDNType (v2 .PDNTypeIPv4 ),
282- ies .NewPDNAddressAllocation (sess .SrcIP ),
283- ies .NewAPNRestriction (v2 .APNRestrictionNoExistingContextsorRestriction ),
284- ies .NewAggregateMaximumBitRate (0 , 0 ),
285- ies .NewBearerContext (
286- ies .NewEPSBearerID (br .EBI ),
287- ies .NewBearerQoS (pci , br .PL , pvi , br .QCI , br .MBRUL , br .MBRDL , br .GBRUL , br .GBRDL ),
278+ ie .NewFullyQualifiedTEID (v2 .IFTypeS5S8PGWGTPC , 0 , m .pgw .s5cIP , "" ).WithInstance (1 ),
279+ ie .NewAccessPointName (m .apn ),
280+ ie .NewSelectionMode (v2 .SelectionModeMSorNetworkProvidedAPNSubscribedVerified ),
281+ ie .NewPDNType (v2 .PDNTypeIPv4 ),
282+ ie .NewPDNAddressAllocation (sess .SrcIP ),
283+ ie .NewAPNRestriction (v2 .APNRestrictionNoExistingContextsorRestriction ),
284+ ie .NewAggregateMaximumBitRate (0 , 0 ),
285+ ie .NewBearerContext (
286+ ie .NewEPSBearerID (br .EBI ),
287+ ie .NewBearerQoS (pci , br .PL , pvi , br .QCI , br .MBRUL , br .MBRDL , br .GBRUL , br .GBRDL ),
288288 ),
289- ies .NewFullyQualifiedCSID (m .s11IP , 1 ),
290- ies .NewServingNetwork (m .mcc , m .mnc ),
291- ies .NewUETimeZone (9 * time .Hour , 0 ),
289+ ie .NewFullyQualifiedCSID (m .s11IP , 1 ),
290+ ie .NewServingNetwork (m .mcc , m .mnc ),
291+ ie .NewUETimeZone (9 * time .Hour , 0 ),
292292 )
293293 if err != nil {
294294 return nil , err
@@ -306,10 +306,10 @@ func (m *mme) ModifyBearer(sess *v2.Session, sub *Session) (*v2.Bearer, error) {
306306 return nil , err
307307 }
308308
309- fteid := ies .NewFullyQualifiedTEID (v2 .IFTypeS1UeNodeBGTPU , sub .itei , m .enb .s1uIP , "" )
309+ fteid := ie .NewFullyQualifiedTEID (v2 .IFTypeS1UeNodeBGTPU , sub .itei , m .enb .s1uIP , "" )
310310 if _ , err = m .s11Conn .ModifyBearer (
311- teid , sess , ies .NewIndicationFromOctets (0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ),
312- ies .NewBearerContext (ies .NewEPSBearerID (sess .GetDefaultBearer ().EBI ), fteid , ies .NewPortNumber (2125 )),
311+ teid , sess , ie .NewIndicationFromOctets (0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ),
312+ ie .NewBearerContext (ie .NewEPSBearerID (sess .GetDefaultBearer ().EBI ), fteid , ie .NewPortNumber (2125 )),
313313 ); err != nil {
314314 return nil , err
315315 }
0 commit comments