fsip

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterList

func FilterList(ips []net.IP, filter func(ip net.IP) bool) []net.IP

FilterList 对 ip 地址进行过滤

func IsIPv4only

func IsIPv4only(ip net.IP) bool

IsIPv4only 是否 ipv4

func IsIPv6only

func IsIPv6only(ip net.IP) bool

IsIPv6only reports whether addr is an IPv6 address except IPv4-mapped IPv6 address.

func IsLinkLocalUnicast

func IsLinkLocalUnicast(ip net.IP) bool

IsLinkLocalUnicast 本地单播地址

ipv4: 169.*、254.*
ipv6: fe80::/7 prefix

func IsLoopback

func IsLoopback(ip net.IP) bool

IsLoopback is Loopback ip

ipv4: 127.*

func IsPrivate

func IsPrivate(ip net.IP) bool

IsPrivate is private ip

ipv4: 10/8、172.16/12 、192.168/16 prefix
ipv6: FC00::/7 prefix

func NewIsFnsAnd

func NewIsFnsAnd(fns ...func(ip net.IP) bool) func(ip net.IP) bool

NewIsFnsAnd create new ip list filter func

func NewIsIPFnsOr

func NewIsIPFnsOr(fns ...func(ip net.IP) bool) func(ip net.IP) bool

NewIsIPFnsOr create new ip list filter func

func NotFilter

func NotFilter(fn func(ip net.IP) bool) func(ip net.IP) bool

NotFilter not filter

Types

This section is empty.

Jump to

Keyboard shortcuts

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