ipnet

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrEqual

func AddrEqual(a, b net.Addr) bool

AddrEqual asserts that two net.Addrs are equal Currently only supprots UDP but will be extended in the future to support others

func AddrIPPort

func AddrIPPort(a net.Addr) (net.IP, int, error)

AddrIPPort extracts the IP and Port from a net.Addr

Types

type ControlMessage

type ControlMessage struct {
	Dst net.IP // destination address, receiving only
}

A ControlMessage represents per packet basis IP-level socket options.

type PacketConn

type PacketConn interface {
	net.PacketConn

	ReadFromCM(b []byte) (n int, cm *ControlMessage, src net.Addr, err error)
}

A PacketConn represents a packet network endpoint that uses the IPvX transport.

func NewPacketConn

func NewPacketConn(network string, c net.PacketConn) (PacketConn, error)

NewPacketConn returns a new PacketConn using c as its underlying transport.

Jump to

Keyboard shortcuts

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