Back to godoc.org

Package nettest

v0.0.0-...-4dfa261
Latest Go to latest

The latest major version is .

Published: Sep 26, 2018 | License: BSD-3-Clause | Module: golang.org/x/net

Overview

Package nettest provides utilities for network testing.

Index

func IsMulticastCapable

func IsMulticastCapable(network string, ifi *net.Interface) (net.IP, bool)

IsMulticastCapable reports whether ifi is an IP multicast-capable network interface. Network must be "ip", "ip4" or "ip6".

func MaxOpenFiles

func MaxOpenFiles() int

MaxOpenFiles returns the maximum number of open files for the caller's process.

func NewLocalListener

func NewLocalListener(network string) (net.Listener, error)

NewLocalListener returns a listener which listens to a loopback IP address or local file system path. Network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket".

func NewLocalPacketListener

func NewLocalPacketListener(network string) (net.PacketConn, error)

NewLocalPacketListener returns a packet listener which listens to a loopback IP address or local file system path. Network must be "udp", "udp4", "udp6" or "unixgram".

func ProtocolNotSupported

func ProtocolNotSupported(err error) bool

ProtocolNotSupported reports whether err is a protocol not supported error.

func RoutedInterface

func RoutedInterface(network string, flags net.Flags) *net.Interface

RoutedInterface returns a network interface that can route IP traffic and satisfies flags. It returns nil when an appropriate network interface is not found. Network must be "ip", "ip4" or "ip6".

func SupportsIPv4

func SupportsIPv4() bool

SupportsIPv4 reports whether the platform supports IPv4 networking functionality.

func SupportsIPv6

func SupportsIPv6() bool

SupportsIPv6 reports whether the platform supports IPv6 networking functionality.

func SupportsIPv6MulticastDeliveryOnLoopback

func SupportsIPv6MulticastDeliveryOnLoopback() bool

SupportsIPv6MulticastDeliveryOnLoopback reports whether the platform supports IPv6 multicast packet delivery on software loopback interface.

func SupportsRawIPSocket

func SupportsRawIPSocket() (string, bool)

SupportsRawIPSocket reports whether the platform supports raw IP sockets.

func TestableNetwork

func TestableNetwork(network string) bool

TestableNetwork reports whether network is testable on the current platform configuration.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier