ezNetwork4

package
v0.0.0-...-77ac295 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DelimiterDash   = "-"
	DelimiterColon  = ":"
	DelimiterSubnet = "/"
)

Variables

View Source
var (
	IPv4Private = []string{
		"10.0.0.0/8",
		"172.16.0.0/12",
		"192.168.0.0/16",
	}
)

Functions

func CalcCidrHostCount

func CalcCidrHostCount(maskint int) uint

func IPv4CalcNetwork

func IPv4CalcNetwork(ip string, netmaskNumeric int64) string

func IpIntToStr

func IpIntToStr(ipInt uint64) (ip string)

func IpToInt

func IpToInt(ip string) (ipInt uint64)

func IsIPv4

func IsIPv4(ip string) bool

func IsIPv4Private

func IsIPv4Private(ip string) bool

func MacSplit

func MacSplit(mac string, deli string) string

func NetmaskDigit2String

func NetmaskDigit2String(digit int) string

func NetmaskString2Digit

func NetmaskString2Digit(netmask string) int

func ReverseIPv4

func ReverseIPv4(ip string) string

func ReverseIPv4Int

func ReverseIPv4Int(ipInt int64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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