Documentation
¶
Index ¶
- func WriteNetworkBlacklistToFile(filePath string, blacklist *NetworkBlacklist) error
- type AliasCheckState
- func (state *AliasCheckState) GenerateTestAddress()
- func (state *AliasCheckState) GetAliasedNetwork() (*net.IPNet, error)
- func (state *AliasCheckState) GetBaseAddress() *net.IP
- func (state *AliasCheckState) GetFound() bool
- func (state *AliasCheckState) GetLeft() uint8
- func (state *AliasCheckState) GetLeftTestIndex() uint8
- func (state *AliasCheckState) GetPossibleTestAddressCount() (uint64, bool)
- func (state *AliasCheckState) GetRight() uint8
- func (state *AliasCheckState) GetRightTestIndex() uint8
- func (state *AliasCheckState) GetTestAddr() *net.IP
- func (state *AliasCheckState) GetTestBitCount() uint8
- func (state *AliasCheckState) GetTestDistance() uint8
- func (state *AliasCheckState) Update(foundAddrs map[string]*internal.Empty)
- type AliasCheckStates
- func (states *AliasCheckStates) GenerateTestAddresses()
- func (states *AliasCheckStates) GetAliasedNetworks() ([]*net.IPNet, error)
- func (states *AliasCheckStates) GetAllFound() bool
- func (states *AliasCheckStates) GetChecksCount() int
- func (states *AliasCheckStates) GetFoundCount() int
- func (states *AliasCheckStates) GetTestAddresses() []*net.IP
- func (states *AliasCheckStates) PrintAliasedNetworks() error
- func (states *AliasCheckStates) PrintStates()
- func (states *AliasCheckStates) Update(foundAddrs map[string]*internal.Empty)
- type NetworkBlacklist
- func (blacklist *NetworkBlacklist) AddNetwork(toAdd *net.IPNet) bool
- func (blacklist *NetworkBlacklist) AddNetworks(toAdd []*net.IPNet) (int, int)
- func (blacklist *NetworkBlacklist) Clean(emitFreq int) int
- func (blacklist *NetworkBlacklist) CleanIPList(toClean []*net.IP, emitFreq int) []*net.IP
- func (blacklist *NetworkBlacklist) GetBlacklistingNetworkFromIP(toTest *net.IP) *net.IPNet
- func (blacklist *NetworkBlacklist) GetBlacklistingNetworkFromNetwork(toTest *net.IPNet) *net.IPNet
- func (blacklist *NetworkBlacklist) GetCount() int
- func (blacklist *NetworkBlacklist) GetMaskLengths() []int
- func (blacklist *NetworkBlacklist) GetNetworks() []*net.IPNet
- func (blacklist *NetworkBlacklist) IsIPBlacklisted(toTest *net.IP) bool
- func (blacklist *NetworkBlacklist) IsNetworkBlacklisted(toTest *net.IPNet) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteNetworkBlacklistToFile ¶
func WriteNetworkBlacklistToFile(filePath string, blacklist *NetworkBlacklist) error
Types ¶
type AliasCheckState ¶
type AliasCheckState struct {
// contains filtered or unexported fields
}
func NewAliasCheckState ¶
func (*AliasCheckState) GenerateTestAddress ¶
func (state *AliasCheckState) GenerateTestAddress()
func (*AliasCheckState) GetAliasedNetwork ¶
func (state *AliasCheckState) GetAliasedNetwork() (*net.IPNet, error)
func (*AliasCheckState) GetBaseAddress ¶
func (state *AliasCheckState) GetBaseAddress() *net.IP
Get the base IPv6 address that is being permuted against for this alias check
func (*AliasCheckState) GetFound ¶
func (state *AliasCheckState) GetFound() bool
Get whether or not the aliased network length has been found
func (*AliasCheckState) GetLeft ¶
func (state *AliasCheckState) GetLeft() uint8
Get the left-most checking index
func (*AliasCheckState) GetLeftTestIndex ¶
func (state *AliasCheckState) GetLeftTestIndex() uint8
Get the left index (inclusive) for the next test range
func (*AliasCheckState) GetPossibleTestAddressCount ¶
func (state *AliasCheckState) GetPossibleTestAddressCount() (uint64, bool)
Get the total number of potential addresses in the next test range for this alias check Note that if there are over 16 bits to test against a boolean value of true will be returned, indicating that there are at least 65535 possible addresses
func (*AliasCheckState) GetRight ¶
func (state *AliasCheckState) GetRight() uint8
Get the right-mount checking index
func (*AliasCheckState) GetRightTestIndex ¶
func (state *AliasCheckState) GetRightTestIndex() uint8
Get the right index (inclusive) for the next test range
func (*AliasCheckState) GetTestAddr ¶
func (state *AliasCheckState) GetTestAddr() *net.IP
Get the IPv6 address being used to test against for this alias check
func (*AliasCheckState) GetTestBitCount ¶
func (state *AliasCheckState) GetTestBitCount() uint8
Get the number of bits that will be tested against in the next round of alias checking
func (*AliasCheckState) GetTestDistance ¶
func (state *AliasCheckState) GetTestDistance() uint8
Get the distance between the left and right positions
type AliasCheckStates ¶
type AliasCheckStates struct {
// contains filtered or unexported fields
}
func NewAliasCheckStates ¶
func (*AliasCheckStates) GenerateTestAddresses ¶
func (states *AliasCheckStates) GenerateTestAddresses()
func (*AliasCheckStates) GetAliasedNetworks ¶
func (states *AliasCheckStates) GetAliasedNetworks() ([]*net.IPNet, error)
func (*AliasCheckStates) GetAllFound ¶
func (states *AliasCheckStates) GetAllFound() bool
func (*AliasCheckStates) GetChecksCount ¶
func (states *AliasCheckStates) GetChecksCount() int
func (*AliasCheckStates) GetFoundCount ¶
func (states *AliasCheckStates) GetFoundCount() int
func (*AliasCheckStates) GetTestAddresses ¶
func (states *AliasCheckStates) GetTestAddresses() []*net.IP
TODO unit test
func (*AliasCheckStates) PrintAliasedNetworks ¶
func (states *AliasCheckStates) PrintAliasedNetworks() error
func (*AliasCheckStates) PrintStates ¶
func (states *AliasCheckStates) PrintStates()
type NetworkBlacklist ¶
type NetworkBlacklist struct {
// contains filtered or unexported fields
}
func NewNetworkBlacklist ¶
func NewNetworkBlacklist(nets []*net.IPNet) *NetworkBlacklist
func ReadNetworkBlacklistFromFile ¶
func ReadNetworkBlacklistFromFile(filePath string) (*NetworkBlacklist, error)
func (*NetworkBlacklist) AddNetwork ¶
func (blacklist *NetworkBlacklist) AddNetwork(toAdd *net.IPNet) bool
func (*NetworkBlacklist) AddNetworks ¶
func (blacklist *NetworkBlacklist) AddNetworks(toAdd []*net.IPNet) (int, int)
func (*NetworkBlacklist) Clean ¶
func (blacklist *NetworkBlacklist) Clean(emitFreq int) int
func (*NetworkBlacklist) CleanIPList ¶
func (*NetworkBlacklist) GetBlacklistingNetworkFromIP ¶
func (blacklist *NetworkBlacklist) GetBlacklistingNetworkFromIP(toTest *net.IP) *net.IPNet
func (*NetworkBlacklist) GetBlacklistingNetworkFromNetwork ¶
func (blacklist *NetworkBlacklist) GetBlacklistingNetworkFromNetwork(toTest *net.IPNet) *net.IPNet
func (*NetworkBlacklist) GetCount ¶
func (blacklist *NetworkBlacklist) GetCount() int
func (*NetworkBlacklist) GetMaskLengths ¶
func (blacklist *NetworkBlacklist) GetMaskLengths() []int
func (*NetworkBlacklist) GetNetworks ¶
func (blacklist *NetworkBlacklist) GetNetworks() []*net.IPNet
func (*NetworkBlacklist) IsIPBlacklisted ¶
func (blacklist *NetworkBlacklist) IsIPBlacklisted(toTest *net.IP) bool
func (*NetworkBlacklist) IsNetworkBlacklisted ¶
func (blacklist *NetworkBlacklist) IsNetworkBlacklisted(toTest *net.IPNet) bool