netutil

package
v0.0.0-...-c4fa73c Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectServer

func ConnectServer(config config.Config) net.Conn

ConnectServer connects to the server with the given address.

func ExecCmd

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

ExecuteCommand executes the given command

func GetDstKey

func GetDstKey(packet []byte) string

GetdstKey returns the destination key of the packets

func GetIPv4Dst

func GetIPv4Dst(packet []byte) net.IP

GEtIPv4Dst returns the IPv4 destination address of the packet

func GetIPv4Src

func GetIPv4Src(packet []byte) net.IP

GetIPv4Src returns the IPv4 source address of the packet

func GetIPv6Dst

func GetIPv6Dst(packet []byte) net.IP

GetIPv6Dst returns the IPv6 destination address of the packet

func GetIPv6Src

func GetIPv6Src(packet []byte) net.IP

GetIPv6Src returns the IPv6 source address of the packet

func GetInterface

func GetInterface() (name string)

GetInterfaceName returns the name of interface

func GetLocalGateway

func GetLocalGateway() string

GetLocalGateway returns the local gateway IP address

func GetSrcKey

func GetSrcKey(packet []byte) string

GetSrcKey returns the source key of the packet

func IsIPv4

func IsIPv4(packet []byte) bool

IsIPv4 returns true if the packet is IPv4s

func IsIPv6

func IsIPv6(packet []byte) bool

IsIPv6 returns true if the packet is IPv6s

func LookupIP

func LookupIP(domain string) net.IP

Lookup IP address of the given hostname

Types

This section is empty.

Jump to

Keyboard shortcuts

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