ip

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hostname

func Hostname() string

Hostname returns system hostname

func IP2Int

func IP2Int(ip net.IP) uint32

IP2Int converts ip to int number

func IPIntToString

func IPIntToString(ipInt int) string

IPIntToString IPIntToString

func Int2IP

func Int2IP(nn uint32) net.IP

Int2IP converts a given number to ip

func IsPrivateIPv4

func IsPrivateIPv4(ip net.IP) bool

IsPrivateIPv4 returns if an ip address is in IPv4 and is private ip

func LocalIP

func LocalIP(optionalIName ...string) string

LocalIP get public loc ip of network. get env BINDHOSTIP first using net interface name first if provided. or it will using env INAME using eth0 as default.

func Lower16BitPrivateIP

func Lower16BitPrivateIP() (uint16, error)

func PrivateIP2Int

func PrivateIP2Int() uint32

PrivateIP2Int PrivateIP2Int

func PrivateIPv4

func PrivateIPv4() (net.IP, error)

PrivateIPv4 returns private IP in IPv4

func StringIpToInt

func StringIpToInt(ipstring string) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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