Documentation
¶
Index ¶
- Variables
- func DialContext(ctx context.Context, network, address string) (net.Conn, error)
- func DialContextWithOptions(ctx context.Context, network, address string, opts *Options) (net.Conn, error)
- func ListenPacket(network, address string) (net.PacketConn, error)
- func ListenPacketWithOptions(network, address string, opts *Options) (net.PacketConn, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DialContextWithOptions ¶
func ListenPacket ¶
func ListenPacket(network, address string) (net.PacketConn, error)
func ListenPacketWithOptions ¶
func ListenPacketWithOptions(network, address string, opts *Options) (net.PacketConn, error)
Types ¶
type Options ¶
type Options struct {
// InterfaceName is the name of interface/device to bind.
// If a socket is bound to an interface, only packets received
// from that particular interface are processed by the socket.
InterfaceName string
// InterfaceIndex is the index of interface/device to bind.
// It is almost the same as InterfaceName except it uses the
// index of the interface instead of the name.
InterfaceIndex int
// RoutingMark is the mark for each packet sent through this
// socket. Changing the mark can be used for mark-based routing
// without netfilter or for packet filtering.
RoutingMark int
}
Click to show internal directories.
Click to hide internal directories.