ipUtils

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

*

  • @Author houlijx
  • @Description //TODO $
  • @Date 2021/8/7 下午1:50 *

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIpV4

func CheckIpV4(ipV4 string) bool

CheckIpV4 检查ipv4是否合法

func FetchMac

func FetchMac(content string) []string

func IP2Long

func IP2Long(ipstr string) uint32

IP2Long ip转long

func IpMaskToInt

func IpMaskToInt(netmask string) int

IpMaskToInt 将ip格式的掩码转换为整型数字 如 255.255.255.0 对应的整型数字为 24

func IsMac

func IsMac(content string) bool

func IsMacV1

func IsMacV1(content string) bool

func IsRange

func IsRange(ip, cidr string) bool

IsRange 判断是否在同一网段

func Long2Ip

func Long2Ip(ipLong uint32) string

Long2Ip longIP转string ip

Types

This section is empty.

Jump to

Keyboard shortcuts

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