netutil

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectServer added in v1.4.1

func ConnectServer(config config.Config) net.Conn

ConnectServer connects to the server with the given address.

func DiscoverGateway added in v1.6.6

func DiscoverGateway(ipv4 bool) string

DiscoverGateway returns the local gateway IP address

func ExecCmd added in v1.5.6

func ExecCmd(c string, args ...string) string

ExecuteCommand executes the given command

func GetDefaultHttpResponse added in v1.6.7

func GetDefaultHttpResponse() []byte

GetDefaultHttpResponse returns the default http response

func GetDstKey added in v1.5.7

func GetDstKey(packet []byte) string

GetdstKey returns the destination key of the packets

func GetIPv4Dst added in v1.5.7

func GetIPv4Dst(packet []byte) net.IP

GEtIPv4Dst returns the IPv4 destination address of the packet

func GetIPv4Src added in v1.5.7

func GetIPv4Src(packet []byte) net.IP

GetIPv4Src returns the IPv4 source address of the packet

func GetIPv6Dst added in v1.5.7

func GetIPv6Dst(packet []byte) net.IP

GetIPv6Dst returns the IPv6 destination address of the packet

func GetIPv6Src added in v1.5.7

func GetIPv6Src(packet []byte) net.IP

GetIPv6Src returns the IPv6 source address of the packet

func GetInterface added in v1.5.7

func GetInterface() (name string)

GetInterfaceName returns the name of interface

func GetSrcKey added in v1.5.7

func GetSrcKey(packet []byte) string

GetSrcKey returns the source key of the packet

func IsIPv4 added in v1.5.1

func IsIPv4(packet []byte) bool

IsIPv4 returns true if the packet is IPv4s

func IsIPv6 added in v1.5.1

func IsIPv6(packet []byte) bool

IsIPv6 returns true if the packet is IPv6s

func LookupIP added in v1.4.2

func LookupIP(domain string) net.IP

Lookup IP address of the given hostname

func LookupServerAddrIP added in v1.6.6

func LookupServerAddrIP(serverAddr string) net.IP

LookupServerAddrIP returns the IP of server address

func PrintErr added in v1.6.7

func PrintErr(err error, enableVerbose bool)

PrintErr returns the error log

func PrintStats added in v1.6.7

func PrintStats(enableVerbose bool, serverMode bool)

PrintStats returns the stats info

Types

This section is empty.

Jump to

Keyboard shortcuts

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