Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type V4Gen ¶
type V4Gen struct {
// contains filtered or unexported fields
}
A V4Gen is a generator for IPv4 addresses
func NewV4Generator ¶
NewV4Generator will return an IPv4 address generator which uses the specified subnets to generate traffic. A subnet may be included in the argument slice multiple times in order to generate proportionally more addresses from that network. Specifying a subnet 0.0.0.0/0 will generate addresses from the entire IPv4 space
func RandomWeightedV4Generator ¶
RandomWeightedV4Generator builds a generator with weighted subnets intended to approximate real-world traffic. Given a count argument, the function will instantiate random subnets of the following weights: * 30% of traffic from a subnet of size /16 to /26 * 10% of traffic from between 2 and 5 subnets of size /16 to /24 * All remaining traffic from random subnets between /8 and /16 Specifying a higher count will result in a greater number in the final category.
type V6Gen ¶
type V6Gen struct {
// contains filtered or unexported fields
}
A V6Gen is a generator for IPv6 addresses
func NewV6Generator ¶
NewV6Generator will return an IPv6 address generator which uses the specified subnets to generate traffic. A subnet may be included in the argument slice multiple times in order to generate proportionally more addresses from that network. Specifying a subnet ::0/0 will generate addresses from the entire IPv6 space
func RandomWeightedV6Generator ¶
RandomWeightedV6Generator builds a generator with weighted subnets intended to approximate real-world traffic. Given a count argument, the function will instantiate random subnets of the following weights: * 30% of traffic from a subnet of size /112 to /124 * 10% of traffic from between 2 and 5 subnets of size /104 to /124 * All remaining traffic from random subnets between /64 and /124 Specifying a higher count will result in a greater number in the final category.