Documentation
¶
Index ¶
Constants ¶
View Source
const GTPU_PORT = 2152
View Source
const (
TUN_MTU = 1400
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DLPkt ¶
type DLPkt struct {
Ue jsonapi.ControlURI
Payload []byte
}
type HttpServerEntity ¶
type HttpServerEntity struct {
// contains filtered or unexported fields
}
func NewHttpServerEntity ¶
func NewHttpServerEntity(bindAddr netip.AddrPort, radio *Radio, ps *PduSessions) *HttpServerEntity
func (*HttpServerEntity) Start ¶
func (e *HttpServerEntity) Start() error
func (*HttpServerEntity) Stop ¶
func (e *HttpServerEntity) Stop()
type PduSessions ¶
type PduSessions struct {
PduSessionsMap sync.Map // key : UE 5G ip address; value: UE Control URI
UserAgent string
Client http.Client
Control jsonapi.ControlURI
Cp jsonapi.ControlURI
GnbGtp netip.Addr
// contains filtered or unexported fields
}
func NewPduSessions ¶
func NewPduSessions(control jsonapi.ControlURI, cp jsonapi.ControlURI, manager *PduSessionsManager, userAgent string, gnbGtp netip.Addr) *PduSessions
func (*PduSessions) EstablishmentRequest ¶
func (p *PduSessions) EstablishmentRequest(c *gin.Context)
request from UE
func (*PduSessions) N2EstablishmentRequest ¶
func (p *PduSessions) N2EstablishmentRequest(c *gin.Context)
request from CP
type PduSessionsManager ¶
type PduSessionsManager struct {
sync.Mutex
Downlink map[uint32]jsonapi.ControlURI // teid: UE control uri
Uplink map[netip.Addr]*Fteid // ue 5G ip address: uplink fteid
GtpAddr netip.Addr
// contains filtered or unexported fields
}
func NewPduSessionsManager ¶
func NewPduSessionsManager(gtpAddr netip.Addr) *PduSessionsManager
func (*PduSessionsManager) GetUECtrl ¶
func (p *PduSessionsManager) GetUECtrl(teid uint32) (jsonapi.ControlURI, error)
func (*PduSessionsManager) NewPduSession ¶
func (*PduSessionsManager) WriteUplink ¶
func (p *PduSessionsManager) WriteUplink(ctx context.Context, pkt []byte) error
type Radio ¶
type Radio struct {
Client http.Client
Control jsonapi.ControlURI
Data netip.AddrPort
UserAgent string
// contains filtered or unexported fields
}
type RadioDaemon ¶
type RadioDaemon struct {
DlQueue chan DLPkt
PduSessionsManager *PduSessionsManager
// contains filtered or unexported fields
}
func NewRadioDaemon ¶
func NewRadioDaemon(radio *Radio, psMan *PduSessionsManager, gnbRanAddr netip.AddrPort) *RadioDaemon
func (*RadioDaemon) WriteDownlink ¶
func (r *RadioDaemon) WriteDownlink(payload []byte, ue jsonapi.ControlURI) error
Click to show internal directories.
Click to hide internal directories.