Documentation ¶
Index ¶
- func GetDefaultPhantomSubnets() *pb.PhantomSubnetsList
- func GetUnweightedSubnetList(subnetsList *pb.PhantomSubnetsList) ([]*net.IPNet, error)
- func SelectAddrFromSubnetOffset(net1 *net.IPNet, offset *big.Int) (net.IP, error)
- func SelectPhantom(seed []byte, subnetsList *pb.PhantomSubnetsList, transform SubnetFilter, ...) (*net.IP, error)
- func SelectPhantomUnweighted(seed []byte, subnets *pb.PhantomSubnetsList, transform SubnetFilter) (*net.IP, error)
- func SelectPhantomWeighted(seed []byte, subnets *pb.PhantomSubnetsList, transform SubnetFilter) (*net.IP, error)
- func V4Only(obj []*net.IPNet) ([]*net.IPNet, error)
- func V6Only(obj []*net.IPNet) ([]*net.IPNet, error)
- type Choice
- type SubnetFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultPhantomSubnets ¶
func GetDefaultPhantomSubnets() *pb.PhantomSubnetsList
GetDefaultPhantomSubnets implements the
func GetUnweightedSubnetList ¶
func GetUnweightedSubnetList(subnetsList *pb.PhantomSubnetsList) ([]*net.IPNet, error)
Just returns the list of subnets provided by the protobuf. Convenience function to not have to export getSubnets() or parseSubnets()
func SelectAddrFromSubnetOffset ¶
SelectAddrFromSubnetOffset given a CIDR block and offset, return the net.IP
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
func SelectPhantomUnweighted ¶
func SelectPhantomUnweighted(seed []byte, subnets *pb.PhantomSubnetsList, transform SubnetFilter) (*net.IP, error)
SelectPhantomUnweighted - select one phantom IP address based on shared secret
func SelectPhantomWeighted ¶
func SelectPhantomWeighted(seed []byte, subnets *pb.PhantomSubnetsList, transform SubnetFilter) (*net.IP, error)
SelectPhantomWeighted - select one phantom IP address based on shared secret
Types ¶
Click to show internal directories.
Click to hide internal directories.