Documentation ¶
Index ¶
- Constants
- Variables
- type RawUDPConn
- func (c *RawUDPConn) Close() error
- func (c *RawUDPConn) FilterEBpf(ins asm.Instructions) error
- func (c *RawUDPConn) LocalAddr() net.Addr
- func (c *RawUDPConn) ReadFrom(buf []byte) (n int, addr net.Addr, err error)
- func (c *RawUDPConn) SetDeadline(t time.Time) error
- func (c *RawUDPConn) SetReadDeadline(t time.Time) error
- func (c *RawUDPConn) SetWriteDeadline(t time.Time) error
- func (c *RawUDPConn) WriteTo(buf []byte, rAddr net.Addr) (n int, err error)
Constants ¶
View Source
const ( // Socket option to attach a classic BPF program to the socket for // use as a filter of incoming packets. SoAttachFilter int = 26 // Socket option to attach an extended BPF program to the socket for // use as a filter of incoming packets. SoAttachBPF int = 50 )
Variables ¶
View Source
var IPv4Unspecified = net.IPv4(0, 0, 0, 0)
Functions ¶
This section is empty.
Types ¶
type RawUDPConn ¶
type RawUDPConn struct {
// contains filtered or unexported fields
}
func ListenRawUDP ¶
func ListenRawUDP(network string, addr *net.UDPAddr) (c *RawUDPConn, err error)
func (*RawUDPConn) Close ¶
func (c *RawUDPConn) Close() error
func (*RawUDPConn) FilterEBpf ¶
func (c *RawUDPConn) FilterEBpf(ins asm.Instructions) error
FilterEBpf attaches an BPF filter program to the connection.
func (*RawUDPConn) LocalAddr ¶
func (c *RawUDPConn) LocalAddr() net.Addr
func (*RawUDPConn) SetDeadline ¶
func (c *RawUDPConn) SetDeadline(t time.Time) error
func (*RawUDPConn) SetReadDeadline ¶
func (c *RawUDPConn) SetReadDeadline(t time.Time) error
func (*RawUDPConn) SetWriteDeadline ¶
func (c *RawUDPConn) SetWriteDeadline(t time.Time) error
Click to show internal directories.
Click to hide internal directories.