diff options
Diffstat (limited to 'lib/ipv4.nix')
| -rw-r--r-- | lib/ipv4.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ipv4.nix b/lib/ipv4.nix index c843cb6..537525f 100644 --- a/lib/ipv4.nix +++ b/lib/ipv4.nix @@ -1,6 +1,7 @@ -lib: -with builtins; -with lib; rec { +lib: let + inherit (lib) int2bits toInt splitString flatten bits2int sublist genList zipListsWith; + inherit (lib.ipv4) ip2bits bits2ip netmaskBits int2ip ip2int prefix2ip; +in { # Converts string representation of IPv4 address to 32 bits ip2bits = ip: let perBits = map (x: int2bits 8 (toInt x)) (splitString "." ip); |
