merge

package
v0.64.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package merge provides helper functions for merging a list of IP addresses and subnets into the smallest possible list of CIDRs. Original Implementation: https://github.com/cilium/cilium

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddressRange

func GetAddressRange(ipNet net.IPNet) (net.IP, net.IP)

GetAddressRange returns the first and last addresses in the given CIDR range.

func GetPreviousIP

func GetPreviousIP(ip net.IP) net.IP

GetPreviousIP returns the previous IP from the given IP address.

func RangeToCIDRs

func RangeToCIDRs(firstIP, lastIP net.IP) []*net.IPNet

RangeToCIDRs converts the range of IPs covered by firstIP and lastIP to a list of CIDRs that contains all of the IPs covered by the range.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL