net

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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) ReadFrom

func (c *RawUDPConn) ReadFrom(buf []byte) (n int, addr net.Addr, err error)

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

func (*RawUDPConn) WriteTo

func (c *RawUDPConn) WriteTo(buf []byte, rAddr net.Addr) (n int, err error)

Jump to

Keyboard shortcuts

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