pfcpUdp

package
v3.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PFCP_PORT        = 8805
	PFCP_MAX_UDP_LEN = 2048
)

Variables

This section is empty.

Functions

func ReceivePfcpMessage

func ReceivePfcpMessage(msg *pfcp.Message, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr) error

Receive a PFCP message and close UDP connection

func SendPfcpMessage

func SendPfcpMessage(msg pfcp.Message, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr) error

Send a PFCP message and close UDP connection

Types

type Message

type Message struct {
	RemoteAddr  *net.UDPAddr
	PfcpMessage *pfcp.Message
}

func NewMessage

func NewMessage(remoteAddr *net.UDPAddr, pfcpMessage *pfcp.Message) (msg Message)

type PfcpServer

type PfcpServer struct {
	Addr string
	Conn *net.UDPConn
}

func NewPfcpServer

func NewPfcpServer(addr string) (PfcpServer, error)

func (*PfcpServer) Close

func (p *PfcpServer) Close() error

func (*PfcpServer) Listen

func (p *PfcpServer) Listen() error

func (*PfcpServer) ReadFrom

func (p *PfcpServer) ReadFrom(msg *pfcp.Message) (*net.UDPAddr, error)

func (*PfcpServer) WriteTo

func (p *PfcpServer) WriteTo(msg pfcp.Message, addr *net.UDPAddr) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL