github.com/netdata/go.d.plugin@v0.58.1/pkg/iprange/README.md (about) 1 <!-- 2 title: "iprange" 3 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/iprange/README.md" 4 sidebar_label: "iprange" 5 learn_status: "Published" 6 learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages" 7 --> 8 9 # iprange 10 11 This package helps you to work with IP ranges. 12 13 IP range is a set of IP addresses. Both IPv4 and IPv6 are supported. 14 15 IP range interface: 16 17 ``` 18 type Range interface { 19 Family() Family 20 Contains(ip net.IP) bool 21 Size() *big.Int 22 fmt.Stringer 23 } 24 ``` 25 26 ## Supported formats 27 28 - `IPv4 address` (192.0.2.1) 29 - `IPv4 range` (192.0.2.0-192.0.2.10) 30 - `IPv4 CIDR` (192.0.2.0/24) 31 - `IPv4 subnet mask` (192.0.2.0/255.255.255.0) 32 - `IPv6 address` (2001:db8::1) 33 - `IPv6 range` (2001:db8::-2001:db8::10) 34 - `IPv6 CIDR` (2001:db8::/64) 35 36 IP range doesn't contain network and broadcast IP addresses if the format is `IPv4 CIDR`, `IPv4 subnet mask` 37 or `IPv6 CIDR`.