BSFL
0.1.0
Bash Shell Function Library
|
Functions | |
cidr2mask (netmask) | |
Converts CIDR notation into IPv4 decimal netmask. More... | |
get_ipv4_broadcast (address, netmask) | |
Computes the broadcast address of an IPv4 subnet. More... | |
get_ipv4_network (address, netmask) | |
Computes the network address of an IPv4 subnet. More... | |
is_fqdn (fqdn) | |
Tests a FQDN. More... | |
is_ipv4 (address) | |
Tests an IPv4 address. More... | |
is_ipv4_cidr (netmask) | |
Tests an IPv4 CIDR netmask. More... | |
is_ipv4_netmask (netmask) | |
Tests if an IPv4 decimal netmask is valid. More... | |
is_ipv4_subnet (subnet) | |
Tests an IPv4 subnet. More... | |
mask2cidr (netmask) | |
Converts IPv4 decimal netmask notation into CIDR. More... | |
cidr2mask | ( | netmask | ) |
Converts CIDR notation into IPv4 decimal netmask.
netmask | CIDR to convert. |
0 | if the input parameters are valid. |
1 | in others cases. |
get_ipv4_broadcast | ( | address | , |
netmask | |||
) |
Computes the broadcast address of an IPv4 subnet.
address | IPv4 address. |
netmask | IPv4 netmask. |
0 | if the input parameters are valid. |
1 | in others cases. |
get_ipv4_network | ( | address | , |
netmask | |||
) |
Computes the network address of an IPv4 subnet.
address | IPv4 address. |
netmask | IPv4 netmask. |
0 | if the input parameters are valid. |
1 | in others cases. |
is_fqdn | ( | fqdn | ) |
Tests a FQDN.
fqdn | FQDN to test. |
0 | if the FQDN is valid. |
1 | in others cases. |
is_ipv4 | ( | address | ) |
Tests an IPv4 address.
address | Address to test. |
0 | if the address is an IPv4. |
1 | in others cases. |
is_ipv4_cidr | ( | netmask | ) |
Tests an IPv4 CIDR netmask.
netmask | CIDR netmask to test. |
0 | if the IPv4 CIDR netmask is valid. |
1 | in others cases. |
is_ipv4_netmask | ( | netmask | ) |
Tests if an IPv4 decimal netmask is valid.
netmask | IPv4 decimal netmask to test. |
0 | if the IPv4 decimal netmask is valid. |
1 | in others cases. |
is_ipv4_subnet | ( | subnet | ) |
Tests an IPv4 subnet.
subnet | Subnet to test with /CIDR. |
0 | if the IPv4 subnet is valid. |
1 | in others cases. |
mask2cidr | ( | netmask | ) |
Converts IPv4 decimal netmask notation into CIDR.
netmask | Decimal netmask to convert. |
0 | if the input parameters are valid. |
1 | in others cases. |