module

Krikri::IpAddrCore

Constants

FAMILY_FILTERS = Set {"ipaddr", "ipv4", "ipv6", "ipsubnet", "ipmath", "next_nth_usable", "previous_nth_usable", "network_in_network", "network_in_usable", "ip4_hex", "nthhost"}

Instance methods

format_cidr(net : Net) : String
Source
format_ip(version : Int32, ip : UInt128) : String
Source
format_net(net : Net) : String
Source
format_v4(ip : UInt128) : String
Source
format_v6(ip : UInt128) : String
Source
ip4_hex(value : JSON::Any, delimiter : String = "") : JSON::Any
Source
ipaddr(value : JSON::Any, query : String = "", version : Int32 | Nil = nil, alias_name : String = "ipaddr") : JSON::Any
Source
ipmath(value : JSON::Any, amount : Int64) : JSON::Any
Source
ipsubnet(value : JSON::Any, query : String, index : String | Nil = nil) : JSON::Any
Source
json_int(n : UInt128) : JSON::Any
Source
network_in_network(value : JSON::Any, test : JSON::Any) : JSON::Any
Source
network_in_usable(value : JSON::Any, test : JSON::Any) : JSON::Any
Source
next_nth_usable(value : JSON::Any, offset : Int64) : JSON::Any
Source
nthhost(value : JSON::Any, query : String) : JSON::Any

nthhost indexes the FULL range (network..broadcast), unlike next/previous_nth_usable which skip network/broadcast - nth 0 is the network address, -1 the broadcast address. The query is a string in the plugin's argspec: empty or non-integer returns FALSE, and a positive index past the range size returns FALSE too (all live-verified on 2.19.11 + ansible.utils). Only a negative index beyond -size is fatal; real ansible surfaces that as "The filter plugin 'ansible.utils.nthhost' failed: index out range for address range size!", so the full wrapped text is raised here - the engine adds no prefix of its own.

Source
parse_v4(s : String) : UInt128 | Nil
Source
parse_v6(s : String) : UInt128 | Nil
Source
parse_value(str : String) : Net | Nil
Source
previous_nth_usable(value : JSON::Any, offset : Int64) : JSON::Any
Source

Nested types