cidr
July 9, 2025 ยท View on GitHub
Installation
make install
Comparison with Built-In inet_merge
| Function | inet_merge(inet, inet) | cidr(inet, inet) |
|---|---|---|
| Return Type | cidr | TABLE (cidr cidr) |
| Description | the smallest network which includes both of the given networks | the smallest set of network(s) which includes both of the given addresses |
| Example | inet_merge('8.8.8.8', '8.255.255.255') | cidr('8.8.8.8', '8.255.255.255') |
| Result | 8.0.0.0/8 | 8.8.8.8/298.8.8.16/288.8.8.32/278.8.8.64/268.8.8.128/258.8.9.0/248.8.10.0/238.8.12.0/228.8.16.0/208.8.32.0/198.8.64.0/188.8.128.0/178.9.0.0/168.10.0.0/158.12.0.0/148.16.0.0/128.32.0.0/118.64.0.0/108.128.0.0/9 |