Documentation ¶
Index ¶
- func SelectAddrFromSubnet(seed []byte, net1 *net.IPNet) (net.IP, error)
- func SelectPhantom(seed []byte, subnetsList *pb.PhantomSubnetsList, transform SubnetFilter, ...) (*net.IP, error)
- func V4Only(obj []*net.IPNet) ([]*net.IPNet, error)
- func V6Only(obj []*net.IPNet) ([]*net.IPNet, error)
- type SubnetFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectAddrFromSubnet ¶
SelectAddrFromSubnet given a seed and a CIDR block choose an address. This is done by generating a seeded random bytes up to teh length of the full address then using the net mask to zero out any bytes that are already specified by the CIDR block. Tde masked random value is then added to the cidr block base giving the final randomly selected address.
func SelectPhantom ¶
func SelectPhantom(seed []byte, subnetsList *pb.PhantomSubnetsList, transform SubnetFilter, weighted bool) (*net.IP, error)
SelectPhantom - select one phantom IP address based on shared secret
Types ¶
Click to show internal directories.
Click to hide internal directories.