Created
July 12, 2012 16:21
-
-
Save ottomata/3099134 to your computer and use it in GitHub Desktop.
cidr_includes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./cidr_includes 192.168.0.1/24 192.168.0.10 | |
Does 192.168.0.1/24 contain 192.168.0.10/32? yes | |
$ ./cidr_includes 192.168.0.1/24 192.168.5.10 | |
Does 192.168.0.1/24 contain 192.168.5.10/32? no | |
$ ./cidr_includes 2620:0:860:2::/64 2620:0:860:2:0:0:0:0005 | |
Does 2620:0:860:2::/64 contain 2620:0:860:2::5/128? yes | |
$ ./cidr_includes 2620:0:860:2::/64 2620:0:860:3:0:0:0:0005 | |
Does 2620:0:860:2::/64 contain 2620:0:860:3::5/128? no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment