Documentation
¶
Overview ¶
Package raw enables reading and writing data at the device driver level for a network interface.
Index ¶
- Variables
- type Addr
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) ReadFrom(b []byte) (int, net.Addr, error)
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) WriteTo(b []byte, addr net.Addr) (int, error)
- type Protocol
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotImplemented is returned when certain functionality is not yet // implemented for the host operating system. ErrNotImplemented = errors.New("not implemented") )
Functions ¶
This section is empty.
Types ¶
type Addr ¶
type Addr struct {
HardwareAddr net.HardwareAddr
}
Addr is a network address which can be used to contact other machines, using their hardware addresses.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is an implementation of the net.PacketConn interface which ca send and receive data at the network interface device driver lvel
func ListenPacket ¶
ListenPacket creates a net.PacketConn which can be used to send and receive data at the network interface device driver level.
ifi specifies the network interface which will be used to send and receive data. socket specifies the socket type to be used, such as syscall.SOCK_RAW or syscall.SOCK_DGRAM. proto specifies the protocol which should be captured and transimitted. proto is automattically converted to network byte order (big endian), akin to the htons() function in C.
func (*Conn) SetReadDeadline ¶
SetReadDeadline method
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline method
