Documentation ¶
Index ¶
- Constants
- type Capture
- type CaptureConfig
- type CaptureStats
- type FiveTuple
- type NetNS
- func (netns *NetNS) AddAddress(linkName string, address *net.IPNet) error
- func (netns *NetNS) AddCleanup(toCall func())
- func (netns *NetNS) AddRoute(dst *net.IPNet, gw net.IP) error
- func (netns *NetNS) Close() error
- func (netns *NetNS) DelNetem(linkName string) (bool, error)
- func (netns *NetNS) DialContext(ctx context.Context, network, address string) (net.Conn, error)
- func (netns *NetNS) DialUDP(ctx context.Context, laddr, raddr *net.UDPAddr) (*net.UDPConn, error)
- func (netns *NetNS) Do(toCall func() error) error
- func (netns *NetNS) Handle() nns.NsHandle
- func (netns *NetNS) ListenTCP(ctx context.Context, address string) (net.Listener, error)
- func (netns *NetNS) ListenUDP(ctx context.Context, laddr *net.UDPAddr) (*net.UDPConn, error)
- func (netns *NetNS) SetIPv6()
- func (netns *NetNS) SetLinkUp(linkName string) error
- func (netns *NetNS) SetNetem(linkName string, attrs NetemAttrs) error
- type NetemAttrs
Constants ¶
View Source
const (
FinalIdleDuraton = 3 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capture ¶
type Capture struct { sync.Mutex Stats CaptureStats // contains filtered or unexported fields }
func NewCapture ¶
func NewCapture(cfg CaptureConfig) *Capture
func (*Capture) GetL4TrafficCount ¶
func (*Capture) GetTrafficCount ¶
type CaptureConfig ¶
type CaptureConfig struct { Iface string PCAPPath string Snaplen int TargetNS *NetNS LayerType string }
func (*CaptureConfig) SetDefaults ¶
func (cfg *CaptureConfig) SetDefaults()
type CaptureStats ¶
type NetNS ¶
func (*NetNS) AddAddress ¶
func (*NetNS) AddCleanup ¶
func (netns *NetNS) AddCleanup(toCall func())
func (*NetNS) DialContext ¶
type NetemAttrs ¶
type NetemAttrs netlink.NetemQdiscAttrs
Click to show internal directories.
Click to hide internal directories.