
\begin{DoxyItemize}
\item infos = Information about the ipaddr plugin is in keys below
\item infos/author = Thomas Waser \href{mailto:thomas.waser@libelektra.org}{\tt thomas.\+waser@libelektra.\+org}
\item infos/licence = B\+SD
\item infos/needs =
\item infos/provides = check
\item infos/recommends =
\item infos/placements = presetstorage
\item infos/status = maintained unittest nodep
\item infos/metadata = check/ipaddr
\item infos/description = Validation for IP addresses
\end{DoxyItemize}\hypertarget{md_src_plugins_ipaddr_README_src_plugins_ipaddr_README_md}{}\section{I\+P Address Validation}\label{md_src_plugins_ipaddr_README_src_plugins_ipaddr_README_md}
\subsection*{Introduction}

This plugin validates IP addresses using regular expressions.

\subsection*{Usage}

``{\ttfamily  $<$h1$>$Mount}ipaddr{\ttfamily plugin to cascading namespace}/tests/ipaddr` kdb mount config.\+dump /tests/ipaddr dump ipaddr

\section*{Check the validity of the IP stored in {\ttfamily /tests/ipaddr/ipv4}}

kdb setmeta /tests/ipaddr/ipv4 check/ipaddr ipv4

\section*{Try to set an incorrect IP address}

kdb set /tests/ipaddr/ipv4 127.\+0.\+0.\+1337 \section*{S\+T\+D\+E\+RR\+: .$\ast$\+Validation Semantic.$\ast$}

\section*{E\+R\+R\+OR\+: C03200}

\section*{R\+ET\+: 5}

\section*{Set a correct I\+Pv4 address}

kdb set /tests/ipaddr/ipv4 127.\+0.\+0.\+1 kdb get /tests/ipaddr/ipv4 \#$>$ 127.\+0.\+0.\+1

\section*{By default the plugin allows both I\+Pv4 and I\+Pv6 addresses}

kdb setmeta /tests/ipaddr/address check/ipaddr \char`\"{}\char`\"{}

\section*{Set correct IP addresses}

kdb set /tests/ipaddr/address 1.\+2.\+3.\+4 kdb set /tests/ipaddr/address \+:\+:1

\section*{Try to set incorrect addresses}

kdb set /tests/ipaddr/address bad\+::ip \section*{R\+ET\+: 5}

kdb set /tests/ipaddr/address 1.\+2.-\/3.\+4 \section*{R\+ET\+: 5}

\section*{Undo modifications to the database}

kdb rm -\/r /tests/ipaddr kdb umount /tests/ipaddr ```

\subsection*{Limitations}

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 \hyperlink{md_src_plugins_network_README_src_plugins_network_README_md}{network plugin}. 