cidr

July 9, 2025 ยท View on GitHub

build

Installation

make install

Comparison with Built-In inet_merge

Functioninet_merge(inet, inet)cidr(inet, inet)
Return TypecidrTABLE (cidr cidr)
Descriptionthe smallest network which includes both of the given networksthe smallest set of network(s) which includes both of the given addresses
Exampleinet_merge('8.8.8.8', '8.255.255.255')cidr('8.8.8.8', '8.255.255.255')
Result8.0.0.0/88.8.8.8/29
8.8.8.16/28
8.8.8.32/27
8.8.8.64/26
8.8.8.128/25
8.8.9.0/24
8.8.10.0/23
8.8.12.0/22
8.8.16.0/20
8.8.32.0/19
8.8.64.0/18
8.8.128.0/17
8.9.0.0/16
8.10.0.0/15
8.12.0.0/14
8.16.0.0/12
8.32.0.0/11
8.64.0.0/10
8.128.0.0/9