module Ip4

Extended Modules

Defined in:

ip4_addr.cr

Constant Summary

C_LENS = {24 => 1, 23 => 2, 22 => 4, 21 => 8, 20 => 16, 19 => 32, 18 => 64, 17 => 128, 16 => 256, 15 => 512, 16 => 1024, 15 => 2048, 14 => 4096, 13 => 8192, 12 => 16384, 11 => 32768, 10 => 65536, 9 => 131072, 8 => 262144}
CIDR_LEN = {32 => 1, 31 => 2, 30 => 4, 29 => 8, 28 => 16, 27 => 32, 26 => 64, 25 => 128, 24 => 255}

Instance Method Summary

Instance Method Detail

def is_valid(addr : String) : Bool #

[View source]
def subnet_to_hosts(range : String) : Array(String) #

[View source]