Elektra
0.8.21
|
This plugin validates IP addresses using regular expressions.
`` <h1>Mount
ipaddrplugin to cascading namespace
/examples/ipaddr` kdb mount config.dump /examples/ipaddr dump ipaddr
/examples/ipaddr/ipv4
kdb setmeta /examples/ipaddr/ipv4 check/ipaddr ipv4
kdb set /examples/ipaddr/ipv4 127.0.0.1337
kdb set /examples/ipaddr/ipv4 127.0.0.1 kdb get /examples/ipaddr/ipv4 #> 127.0.0.1
kdb setmeta /examples/ipaddr/address check/ipaddr ""
kdb set /examples/ipaddr/address 1.2.3.4 kdb set /examples/ipaddr/address ::1
kdb set /examples/ipaddr/address bad::ip
kdb set /examples/ipaddr/address 1.2.-3.4
kdb rm -r /examples/ipaddr kdb umount /examples/ipaddr ```
The plugin only checks IP addresses for validity. It is not able to resolve hostnames. If you are looking for a plugin that supports hostnames, check out the network plugin.