Documentation ¶
Index ¶
- Constants
- func CloseONVM()
- func DialONVM(network, address string) (net.Conn, error)
- func DialXIO(network, address string) (net.Conn, error)
- func IpToID(ip string) (id int32, err error)
- func ListenONVM(network, address string) (net.Listener, error)
- func ListenXIO(network, address string) (net.Listener, error)
- func NfToIP(nf string) (ip string, err error)
- func SetLocalAddress(addr string)
- func TimeTrack(start time.Time)
- func TriggerPaging(service_id int, src_ip string, dst_ip string)
- func XIO_wait(list *C.struct_list_node) int
- type Config
- type Four_tuple_rte
- type NFip
- type OnvmAddr
- type Pkt
- type PortManager
- type UDP_Connection
- type XIO_Connection
- func (connection XIO_Connection) Close() error
- func (connection XIO_Connection) LocalAddr() net.Addr
- func (connection XIO_Connection) Read(b []byte) (int, error)
- func (connection XIO_Connection) RemoteAddr() net.Addr
- func (connection XIO_Connection) SetDeadline(t time.Time) error
- func (connection XIO_Connection) SetReadDeadline(t time.Time) error
- func (connection XIO_Connection) SetWriteDeadline(t time.Time) error
- func (connection XIO_Connection) Write(b []byte) (int, error)
- type XIO_Listener
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 SetLocalAddress ¶
func SetLocalAddress(addr string)
func TriggerPaging ¶
func XIO_wait ¶
func XIO_wait(list *C.struct_list_node) int
Types ¶
type Four_tuple_rte ¶
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
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.
type XIO_Listener ¶
type XIO_Listener struct {
// contains filtered or unexported fields
}
func (XIO_Listener) Addr ¶
func (xl XIO_Listener) Addr() net.Addr
func (XIO_Listener) Close ¶
func (xl XIO_Listener) Close() error
Click to show internal directories.
Click to hide internal directories.