Versions in this module Expand all Collapse all v0 v0.0.2 Sep 5, 2023 v0.0.1 Sep 5, 2023 Changes in this version + var ErrCountIPNum = errors.New("Start IP is greater than end IP") + var ErrNotIP = errors.New("Not IPv4") + var ErrNotIPv4 = errors.New("Not IPv4 package") + var ErrNotIPv6 = errors.New("Not IPv6 package") + var ErrNullIP = errors.New("IP is null") + func AdjustIPv4(pkg []byte, v4 string, start int, end int) error + func AdjustIPv4Dst(pkg []byte, v4 string) error + func AdjustIPv4Src(pkg []byte, v4 string) error + func CountHostWithIPNet(ipNet *net.IPNet) uint32 + func CountIPNum(startIP, endIP net.IP) (uint32, error) + func CountIPNumWithIPNet(ipNet *net.IPNet) uint32 + func CountIPNumWithMask(mask *net.IPMask) uint32 + func DiffIP(s, e net.IP) (uint32, error) + func IPToUint32(ip net.IP) uint32 + func ObtainRangeSubnet(ipNet *net.IPNet) (startIP, endIP net.IP) + func ParseIPv4(pkg []byte, start int, end int) (net.IP, error) + func ParseIPv4Dst(pkg []byte) (net.IP, error) + func ParseIPv4Src(pkg []byte) (net.IP, error) + func SumIP(ip net.IP, offset int) net.IP + func Uint32toIP(uint32Value uint32) net.IP + func Version(pkg []byte) int + type Nat struct + Cidr string + DeviceName string + func CreateNat(cidr string, deviceName string) (*Nat, error) + func (nat *Nat) Close() error