Documentation ¶
Index ¶
- Constants
- Variables
- func ReceivePfcpMessage(msg *pfcp.Message, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr) error
- func SendPfcpMessage(msg pfcp.Message, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr) error
- type ConsumerTable
- func (t *ConsumerTable) Delete(consumerAddr string)
- func (t *ConsumerTable) Load(consumerAddr string) (*pfcp.TxTable, bool)
- func (t *ConsumerTable) LoadOrStore(consumerAddr string, storeTable *pfcp.TxTable) (*pfcp.TxTable, bool)
- func (t *ConsumerTable) Store(consumerAddr string, txTable *pfcp.TxTable)
- type Message
- type PfcpServer
- func (pfcpServer *PfcpServer) Close() error
- func (pfcpServer *PfcpServer) FindTransaction(msg *pfcp.Message, addr *net.UDPAddr) (*pfcp.Transaction, error)
- func (pfcpServer *PfcpServer) Listen() error
- func (pfcpServer *PfcpServer) PutTransaction(tx *pfcp.Transaction) (err error)
- func (pfcpServer *PfcpServer) ReadFrom() (*Message, error)
- func (pfcpServer *PfcpServer) RemoveTransaction(tx *pfcp.Transaction) (err error)
- func (pfcpServer *PfcpServer) StartReqTxLifeCycle(tx *pfcp.Transaction) (resMsg *Message, err error)
- func (pfcpServer *PfcpServer) StartResTxLifeCycle(tx *pfcp.Transaction)
- func (pfcpServer *PfcpServer) WriteRequestTo(reqMsg *pfcp.Message, addr *net.UDPAddr) (resMsg *Message, err error)
- func (pfcpServer *PfcpServer) WriteResponseTo(resMsg *pfcp.Message, addr *net.UDPAddr)
Constants ¶
View Source
const ( PFCP_PORT = 8805 PFCP_MAX_UDP_LEN = 2048 )
Variables ¶
View Source
var ErrReceivedResentRequest = errors.New("received a request that is re-sent")
Functions ¶
func ReceivePfcpMessage ¶
Receive a PFCP message and close UDP connection
Types ¶
type ConsumerTable ¶
type ConsumerTable struct {
// contains filtered or unexported fields
}
func (*ConsumerTable) Delete ¶
func (t *ConsumerTable) Delete(consumerAddr string)
func (*ConsumerTable) Load ¶
func (t *ConsumerTable) Load(consumerAddr string) (*pfcp.TxTable, bool)
func (*ConsumerTable) LoadOrStore ¶ added in v1.0.5
type Message ¶
func NewMessage ¶
func (*Message) MessageType ¶ added in v1.0.4
func (m *Message) MessageType() pfcp.MessageType
type PfcpServer ¶
type PfcpServer struct { Addr string Conn *net.UDPConn // Consumer Table // Map Consumer IP to its tx table ConsumerTable ConsumerTable }
func NewPfcpServer ¶
func NewPfcpServer(addr string) *PfcpServer
func (*PfcpServer) Close ¶
func (pfcpServer *PfcpServer) Close() error
func (*PfcpServer) FindTransaction ¶
func (pfcpServer *PfcpServer) FindTransaction(msg *pfcp.Message, addr *net.UDPAddr) (*pfcp.Transaction, error)
func (*PfcpServer) Listen ¶
func (pfcpServer *PfcpServer) Listen() error
func (*PfcpServer) PutTransaction ¶
func (pfcpServer *PfcpServer) PutTransaction(tx *pfcp.Transaction) (err error)
func (*PfcpServer) ReadFrom ¶
func (pfcpServer *PfcpServer) ReadFrom() (*Message, error)
func (*PfcpServer) RemoveTransaction ¶
func (pfcpServer *PfcpServer) RemoveTransaction(tx *pfcp.Transaction) (err error)
func (*PfcpServer) StartReqTxLifeCycle ¶ added in v1.0.4
func (pfcpServer *PfcpServer) StartReqTxLifeCycle(tx *pfcp.Transaction) (resMsg *Message, err error)
func (*PfcpServer) StartResTxLifeCycle ¶ added in v1.0.4
func (pfcpServer *PfcpServer) StartResTxLifeCycle(tx *pfcp.Transaction)
StartResTxLifeCycle does not return an error because if an error occurs, a resend request will be sent
func (*PfcpServer) WriteRequestTo ¶ added in v1.0.4
func (*PfcpServer) WriteResponseTo ¶ added in v1.0.4
func (pfcpServer *PfcpServer) WriteResponseTo(resMsg *pfcp.Message, addr *net.UDPAddr)
Click to show internal directories.
Click to hide internal directories.