Exemplo n.º 1
0
func intRangeLine(network ipaddr.Prefix, orig []string) []string {
	startInt := new(big.Int)
	startInt.SetBytes(network.Addr())

	endInt := new(big.Int)
	endInt.SetBytes(network.LastAddr())

	return append(
		[]string{startInt.String(), endInt.String()},
		orig...,
	)
}
Exemplo n.º 2
0
func intRangeLine(network *ipaddr.Prefix, orig []string) []string {
	startInt := new(big.Int)

	startInt.SetBytes(canonicalizeIP(network.IP))

	endInt := new(big.Int)
	endInt.SetBytes(canonicalizeIP(network.Last()))

	return append(
		[]string{startInt.String(), endInt.String()},
		orig...,
	)
}
Exemplo n.º 3
0
func rangeLine(network ipaddr.Prefix, orig []string) []string {
	return append(
		[]string{network.Addr().String(), network.LastAddr().String()},
		orig...,
	)
}
Exemplo n.º 4
0
func cidrLine(network ipaddr.Prefix, orig []string) []string {
	return append([]string{network.String()}, orig...)
}