onvmpoller

package module
v0.0.0-...-64ddd37 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// For four_tuple
	SRC_IP_ADDR_IDX = 0
	SRC_PORT_IDX    = 1
	DST_IP_ADDR_IDX = 2
	DST_PORT_IDX    = 3
	// Distinguish packet type
	HTTP_FRAME     = 0
	ESTABLISH_CONN = 1
	CLOSE_CONN     = 2
	REPLY_CONN     = 3
	BIG_FRAME      = 4
	// Port manager setting
	PM_CHANNEL_SIZE = 1024
	// Logger level
	LOG_LEVEL = logrus.WarnLevel
	// Error code
	END_OF_PKT = 87
	// Protocol Number
	UDP_PROTO_NUM = 0x11
	TCP_PROTO_NUM = 0x06
)

Variables

This section is empty.

Functions

func CloseONVM

func CloseONVM()

func DialONVM

func DialONVM(network, address string) (net.Conn, error)

func DialXIO

func DialXIO(network, address string) (net.Conn, error)

func IpToID

func IpToID(ip string) (id int32, err error)

func ListenONVM

func ListenONVM(network, address string) (net.Listener, error)

func ListenXIO

func ListenXIO(network, address string) (net.Listener, error)

func NfToIP

func NfToIP(nf string) (ip string, err error)

func SetLocalAddress

func SetLocalAddress(addr string)

func TimeTrack

func TimeTrack(start time.Time)

func TriggerPaging

func TriggerPaging(service_id int, src_ip string, dst_ip string)

func XIO_wait

func XIO_wait(list *C.struct_list_node) int

Types

type Config

type Config struct {
	// Map the IP address to Service ID
	IPIDMap map[string]int32 `yaml:"IPIDMap,omitempty"`
}

type Four_tuple_rte

type Four_tuple_rte struct {
	Src_ip   uint32
	Src_port uint16
	Dst_ip   uint32
	Dst_port uint16
}

type NFip

type NFip struct {
	// Map the NF to IP address
	Map map[string]string `yaml:"NFIPMap,omitempty"`
}

type OnvmAddr

type OnvmAddr struct {
	// contains filtered or unexported fields
}

func (OnvmAddr) Network

func (oa OnvmAddr) Network() string

func (OnvmAddr) String

func (oa OnvmAddr) String() string

type Pkt

type Pkt struct {
	Payload_len  int
	Start_offset int // How many bytes has been read
	PacketList   *C.struct_mbuf_list
	// contains filtered or unexported fields
}

type PortManager

type PortManager struct {
	// contains filtered or unexported fields
}

func (*PortManager) DistributePort

func (pm *PortManager) DistributePort()

func (*PortManager) GetPort

func (pm *PortManager) GetPort() uint16

func (*PortManager) RecyclePort

func (pm *PortManager) RecyclePort()

func (*PortManager) ReleasePort

func (pm *PortManager) ReleasePort(port uint16)

func (*PortManager) Run

func (pm *PortManager) Run()

type UDP_Connection

type UDP_Connection struct {
	// contains filtered or unexported fields
}

XIO UDP Connection

func ListenXIO_UDP

func ListenXIO_UDP(network string, address *net.UDPAddr) (*UDP_Connection, error)

func (*UDP_Connection) Close

func (udp_conn *UDP_Connection) Close() error

func (*UDP_Connection) LocalAddr

func (udp_conn *UDP_Connection) LocalAddr() *net.UDPAddr

func (*UDP_Connection) ReadFrom

func (udp_conn *UDP_Connection) ReadFrom(b []byte) (int, *net.UDPAddr, error)

func (*UDP_Connection) WriteTo

func (udp_conn *UDP_Connection) WriteTo(b []byte, addr *net.UDPAddr) (int, error)

type XIO_Connection

type XIO_Connection struct {
	// contains filtered or unexported fields
}

XIO TCP Connection

func (XIO_Connection) Close

func (connection XIO_Connection) Close() error

Close implements the net.Conn Close method.

func (XIO_Connection) LocalAddr

func (connection XIO_Connection) LocalAddr() net.Addr

LocalAddr implements the net.Conn LocalAddr method.

func (XIO_Connection) Read

func (connection XIO_Connection) Read(b []byte) (int, error)

Read implements the net.Conn Read method.

func (XIO_Connection) RemoteAddr

func (connection XIO_Connection) RemoteAddr() net.Addr

RemoteAddr implements the net.Conn RemoteAddr method.

func (XIO_Connection) SetDeadline

func (connection XIO_Connection) SetDeadline(t time.Time) error

SetDeadline implements the net.Conn SetDeadline method.

func (XIO_Connection) SetReadDeadline

func (connection XIO_Connection) SetReadDeadline(t time.Time) error

SetReadDeadline implements the net.Conn SetReadDeadline method.

func (XIO_Connection) SetWriteDeadline

func (connection XIO_Connection) SetWriteDeadline(t time.Time) error

SetWriteDeadline implements the net.Conn SetWriteDeadline method.

func (XIO_Connection) Write

func (connection XIO_Connection) Write(b []byte) (int, error)

Write implements the net.Conn Write method.

type XIO_Listener

type XIO_Listener struct {
	// contains filtered or unexported fields
}

func (XIO_Listener) Accept

func (xl XIO_Listener) Accept() (net.Conn, error)

func (XIO_Listener) Addr

func (xl XIO_Listener) Addr() net.Addr

func (XIO_Listener) Close

func (xl XIO_Listener) Close() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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