Documentation ¶
Index ¶
- Constants
- Variables
- func CIDRAlign(cidr *net.IPNet, bits int) *net.IPNet
- func CIDRBits(cidr *net.IPNet) int
- func CIDRClone(cidr *net.IPNet) *net.IPNet
- func CIDREqual(a, b *net.IPNet) bool
- func CIDRExtend(cidr *net.IPNet) *net.IPNet
- func CIDRFirstIP(cidr *net.IPNet) net.IP
- func CIDRHostMaskSize(cidr *net.IPNet) int
- func CIDRLastIP(cidr *net.IPNet) net.IP
- func CIDRNet(cidr *net.IPNet) *net.IPNet
- func CIDRNetMaskSize(cidr *net.IPNet) int
- func CIDRSplit(cidr *net.IPNet) (lower, upper *net.IPNet)
- func CIDRSubIP(cidr *net.IPNet, n int64) net.IP
- func CIDRSubIPInt(cidr *net.IPNet, n Int) net.IP
- func CIDRto16(cidr *net.IPNet) *net.IPNet
- func CIDRto4(cidr *net.IPNet) *net.IPNet
- func IPAdd(ip net.IP, n int64) net.IP
- func IPAddInt(ip net.IP, n Int) net.IP
- func IPClone(ip net.IP) net.IP
- func IPCmp(a, b net.IP) int
- func IPMaskClone(mask net.IPMask) net.IPMask
- func IPtoCIDR(ip net.IP) *net.IPNet
- func MustParseCIDR(s string) *net.IPNet
- func ParseCIDR(s string) (*net.IPNet, error)
- func ParseIP(s string) net.IP
- type Bitmap
- type Block
- type CIDRList
- func (this *CIDRList) Add(cidrs ...*net.IPNet)
- func (this CIDRList) Contains(ip net.IP) bool
- func (this CIDRList) Copy() CIDRList
- func (this CIDRList) IsEmpty() bool
- func (p CIDRList) Len() int
- func (p CIDRList) Less(i, j int) bool
- func (this *CIDRList) String() string
- func (p CIDRList) Swap(i, j int)
- type IPAM
- func (this *IPAM) Alloc(reqsize int) *net.IPNet
- func (this *IPAM) Bits() int
- func (this *IPAM) Busy(cidr *net.IPNet) bool
- func (this *IPAM) Free(cidr *net.IPNet) bool
- func (this *IPAM) IsRoundRobin() bool
- func (this *IPAM) Ranges() CIDRList
- func (this *IPAM) SetRoundRobin(b bool)
- func (this *IPAM) SetState(blocks []string, next []net.IP) error
- func (this *IPAM) State() ([]string, []net.IP)
- func (this *IPAM) String() string
- type IPRange
- type IPRanges
- type Int
- func (this Int) Add(a Int) Int
- func (this Int) And(a Int) Int
- func (this Int) Cmp(a Int) int
- func (this Int) Div(a Int) Int
- func (this Int) DivMod(a Int) (Int, Int)
- func (this Int) Int64() int64
- func (this Int) IsInt64() bool
- func (this Int) IsUint64() bool
- func (this Int) LShift(n uint) Int
- func (this Int) Mod(a Int) Int
- func (this Int) Mul(a Int) Int
- func (this Int) Or(a Int) Int
- func (this Int) RShift(n uint) Int
- func (this Int) Sgn() int
- func (this Int) String() string
- func (this Int) Sub(a Int) Int
- func (this Int) Uint64() uint64
- type RequestSpec
- type RequestSpecList
Constants ¶
View Source
const BITMAP_BUSY = ^Bitmap(0)
View Source
const MAX_BITMAP_HOST_MASK = (1 << MAX_BITMAP_NET) - 1
View Source
const MAX_BITMAP_NET = 6
View Source
const MAX_BITMAP_SIZE = 1 << MAX_BITMAP_NET
Variables ¶
View Source
var IntOne = Int64(1)
View Source
var IntTwoFiveFive = Int64(255)
View Source
var IntZero = Int64(0)
Functions ¶
func CIDRHostMaskSize ¶
func CIDRNetMaskSize ¶
func MustParseCIDR ¶
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func ParseBlock ¶ added in v0.0.7
type IPAM ¶
type IPAM struct {
// contains filtered or unexported fields
}
func NewIPAMForRanges ¶
func (*IPAM) IsRoundRobin ¶
func (*IPAM) SetRoundRobin ¶
type IPRanges ¶
type IPRanges []*IPRange
IPRanges attaches the methods of Interface to []string, sorting in increasing order.
func MustParseIPRanges ¶
func NormalizeIPRanges ¶
func ParseIPRanges ¶
type Int ¶
func CIDRHostSize ¶
type RequestSpec ¶ added in v0.0.7
type RequestSpec interface { IsCIDR() bool Bits() int Alloc(ipam *IPAM) (*net.IPNet, error) String() string }
RequestSpec represents a dedicate allocation type for a cidr from an IPAM.
func ParseRequestSpec ¶ added in v0.0.7
func ParseRequestSpec(s string) (RequestSpec, error)
type RequestSpecList ¶ added in v0.0.7
type RequestSpecList []RequestSpec
func (RequestSpecList) String ¶ added in v0.0.7
func (r RequestSpecList) String() string
Click to show internal directories.
Click to hide internal directories.