Documentation ¶
Index ¶
- func GetIPFromRequest(req *http.Request) (ip string, err error)
- func IsInBlocks(ip string, blocks []string) (isInBlocks bool, err error)
- func IsLinkLocal(ip string) (isLinkLocal bool, err error)
- func IsLoopback(ip string) (isLoopback bool, err error)
- func IsPrivate(ip string) (isPrivate bool, err error)
- func IsPublic(ip string) (isPublic bool, err error)
- type Flag
- type NetInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInBlocks ¶
IsInBlocks IP是否包含在地址快中
func IsLinkLocal ¶
IsLinkLocal IP是否为链路本地地址
Types ¶
type NetInterface ¶
type NetInterface struct { Name string `json:"name"` Ipv4 []string `json:"ipv4"` Ipv6 []string `json:"ipv6"` Flag Flag `json:"flag"` Mac string `json:"mac"` }
NetInterface 网络接口
func GetNetInterfaces ¶
func GetNetInterfaces() (netInterface []NetInterface, err error)
Click to show internal directories.
Click to hide internal directories.