\hypertarget{classXrl}{
\section{Xrl Class Reference}
\label{classXrl}\index{Xrl@{Xrl}}
}


XORP IPC request.  




{\ttfamily \#include $<$xrl.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrl_a8c63b10f9fc4427572f604eef5674e97}{
\hyperlink{classXrl_a8c63b10f9fc4427572f604eef5674e97}{Xrl} (const string \&protocol, const string \&protocol\_\-target, const string \&command, const \hyperlink{classXrlArgs}{XrlArgs} \&args)}
\label{classXrl_a8c63b10f9fc4427572f604eef5674e97}

\begin{DoxyCompactList}\small\item\em Construct an \hyperlink{classXrl}{Xrl}. \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_a122fdcd51f038819842f586b38cac55d}{
\hyperlink{classXrl_a122fdcd51f038819842f586b38cac55d}{Xrl} (const string \&target, const string \&command, const \hyperlink{classXrlArgs}{XrlArgs} \&args)}
\label{classXrl_a122fdcd51f038819842f586b38cac55d}

\begin{DoxyCompactList}\small\item\em Construct an \hyperlink{classXrl}{Xrl} (with implicit finder protocol). \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_a3a05508982b40b324e6a0a30aec7417e}{
\hyperlink{classXrl_a3a05508982b40b324e6a0a30aec7417e}{Xrl} (const string \&protocol, const string \&protocol\_\-target, const string \&command)}
\label{classXrl_a3a05508982b40b324e6a0a30aec7417e}

\begin{DoxyCompactList}\small\item\em Construct an \hyperlink{classXrl}{Xrl} that does not have an argument list. \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_ae1db8ef2bd247d5bf902ced6c601ddae}{
\hyperlink{classXrl_ae1db8ef2bd247d5bf902ced6c601ddae}{Xrl} (const string \&target, const string \&command)}
\label{classXrl_ae1db8ef2bd247d5bf902ced6c601ddae}

\begin{DoxyCompactList}\small\item\em Construct an \hyperlink{classXrl}{Xrl} that does not have an argument list. \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_afb2a3e58c456b4d5400b0ec4a8532ac8}{
\hyperlink{classXrl_afb2a3e58c456b4d5400b0ec4a8532ac8}{Xrl} (const char $\ast$target, const char $\ast$command)}
\label{classXrl_afb2a3e58c456b4d5400b0ec4a8532ac8}

\begin{DoxyCompactList}\small\item\em Construct an \hyperlink{classXrl}{Xrl} that does not have an argument list. \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_afe2db4820bf4cea2f1123af022eb6bae}{
\hyperlink{classXrl_afe2db4820bf4cea2f1123af022eb6bae}{Xrl} (const char $\ast$xrl\_\-c\_\-str)  throw (InvalidString)}
\label{classXrl_afe2db4820bf4cea2f1123af022eb6bae}

\begin{DoxyCompactList}\small\item\em Construct an \hyperlink{classXrl}{Xrl} object from \hyperlink{protocolthe-p}{the} string representation of \hyperlink{classXrl}{Xrl}. \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_a1f2ce9ccc2b94e2e8d77986cb410bf1d}{
{\bfseries Xrl} (const \hyperlink{classXrl}{Xrl} \&xrl)}
\label{classXrl_a1f2ce9ccc2b94e2e8d77986cb410bf1d}

\item 
\hypertarget{classXrl_a02a3816b2ba6472095258416b79bfa54}{
\hyperlink{classXrl}{Xrl} \& {\bfseries operator=} (const \hyperlink{classXrl}{Xrl} \&rhs)}
\label{classXrl_a02a3816b2ba6472095258416b79bfa54}

\item 
\hypertarget{classXrl_ab0e380cfa5ec8f4d7c51ebaca862ae90}{
string \hyperlink{classXrl_ab0e380cfa5ec8f4d7c51ebaca862ae90}{str} () const }
\label{classXrl_ab0e380cfa5ec8f4d7c51ebaca862ae90}

\begin{DoxyCompactList}\small\item\em Render \hyperlink{classXrl}{Xrl} as a string. \item\end{DoxyCompactList}\item 
const string \& \hyperlink{classXrl_a55e839424dd27f1149747ef30c36a5d7}{protocol} () const 
\item 
const string \& \hyperlink{classXrl_aa03daffd71473194f857cd8bf8538e0f}{target} () const 
\item 
const string \& \hyperlink{classXrl_a97ff514547934e63deb7bb3b5a28c026}{string\_\-no\_\-args} () const 
\item 
const string \& \hyperlink{classXrl_ab8508cc6d4106dbd24e8a5aa1640cffa}{command} () const 
\item 
\hypertarget{classXrl_abf682f2de2c3c6ce57d2f00ed6087465}{
\hyperlink{classXrlArgs}{XrlArgs} \& \hyperlink{classXrl_abf682f2de2c3c6ce57d2f00ed6087465}{args} ()}
\label{classXrl_abf682f2de2c3c6ce57d2f00ed6087465}

\begin{DoxyCompactList}\small\item\em Retrieve list of arguments associated with \hyperlink{protocolthe-p}{the} XRL. \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_ae9af6f68f1b8b349605c507ff2e9ccb7}{
const \hyperlink{classXrlArgs}{XrlArgs} \& \hyperlink{classXrl_ae9af6f68f1b8b349605c507ff2e9ccb7}{args} () const }
\label{classXrl_ae9af6f68f1b8b349605c507ff2e9ccb7}

\begin{DoxyCompactList}\small\item\em Retrieve list of arguments associated with \hyperlink{protocolthe-p}{the} XRL. \item\end{DoxyCompactList}\item 
bool \hyperlink{classXrl_a94056f64126718a568a5cdf9639aadcf}{operator==} (const \hyperlink{classXrl}{Xrl} \&x) const 
\begin{DoxyCompactList}\small\item\em Test \hyperlink{protocolthe-p}{the} equivalence of two XRL's. \item\end{DoxyCompactList}\item 
bool \hyperlink{classXrl_a52600a01da627f149f846eb1dc0177ff}{is\_\-resolved} () const 
\item 
\hypertarget{classXrl_a5ce3257bd79c275ace2f96f054f1f0d9}{
size\_\-t \hyperlink{classXrl_a5ce3257bd79c275ace2f96f054f1f0d9}{packed\_\-bytes} () const }
\label{classXrl_a5ce3257bd79c275ace2f96f054f1f0d9}

\begin{DoxyCompactList}\small\item\em Get number of bytes needed to pack XRL into a serialized byte form. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{classXrl_ae9e1002be3c7d7e9d05d32973d4cc2e1}{pack} (uint8\_\-t $\ast$buffer, size\_\-t buffer\_\-bytes) const 
\begin{DoxyCompactList}\small\item\em Pack XRL into a byte array. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{classXrl_ab47f4f904d1cfaa7fb1a007b66f07acd}{unpack} (const uint8\_\-t $\ast$buffer, size\_\-t buffer\_\-bytes)
\begin{DoxyCompactList}\small\item\em Unpack XRL from serialized byte array. \item\end{DoxyCompactList}\item 
\hypertarget{classXrl_a40a12722047bba76373add2400fc1b07}{
void {\bfseries set\_\-args} (const \hyperlink{classXrl}{Xrl} \&x) const }
\label{classXrl_a40a12722047bba76373add2400fc1b07}

\item 
\hypertarget{classXrl_aad4dec4a3ca1bf6bff31eb87b25152af}{
size\_\-t {\bfseries fill} (const uint8\_\-t $\ast$buffer, size\_\-t buffer\_\-bytes)}
\label{classXrl_aad4dec4a3ca1bf6bff31eb87b25152af}

\item 
\hypertarget{classXrl_ac3c555a90837b7734a173d70aa5b0bca}{
bool {\bfseries to\_\-finder} () const }
\label{classXrl_ac3c555a90837b7734a173d70aa5b0bca}

\item 
\hypertarget{classXrl_ac85b66d4dc4a639d9f7b1f0526868f31}{
bool {\bfseries resolved} () const }
\label{classXrl_ac85b66d4dc4a639d9f7b1f0526868f31}

\item 
\hypertarget{classXrl_a56fcca92e3f2e8692f2ebef35869b220}{
void {\bfseries set\_\-resolved} (bool r) const }
\label{classXrl_a56fcca92e3f2e8692f2ebef35869b220}

\item 
\hypertarget{classXrl_a4d7383d59e349bc82ec69d804f7a69d8}{
\hyperlink{classref__ptr}{ref\_\-ptr}$<$ \hyperlink{classXrlPFSender}{XrlPFSender} $>$ {\bfseries resolved\_\-sender} () const }
\label{classXrl_a4d7383d59e349bc82ec69d804f7a69d8}

\item 
\hypertarget{classXrl_a0bef04eb184b61388b279dcfb87c3a99}{
void {\bfseries set\_\-resolved\_\-sender} (\hyperlink{classref__ptr}{ref\_\-ptr}$<$ \hyperlink{classXrlPFSender}{XrlPFSender} $>$ \&s) const }
\label{classXrl_a0bef04eb184b61388b279dcfb87c3a99}

\item 
\hypertarget{classXrl_a5126d4f7835805d6c0de8d7911c44c7b}{
void {\bfseries set\_\-target} (const char $\ast$target)}
\label{classXrl_a5126d4f7835805d6c0de8d7911c44c7b}

\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrl_aecde36a3c583024797822bb157730c54}{
static size\_\-t {\bfseries unpack\_\-command} (string \&cmd, const uint8\_\-t $\ast$in, size\_\-t len)}
\label{classXrl_aecde36a3c583024797822bb157730c54}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrl_aa46b4cecf6da45188194937a56457e9e}{
const char $\ast$ {\bfseries parse\_\-xrl\_\-path} (const char $\ast$xrl\_\-path)}
\label{classXrl_aa46b4cecf6da45188194937a56457e9e}

\item 
\hypertarget{classXrl_a3e55df4b9a57c945ccbe3e6b5b681c75}{
void {\bfseries clear\_\-cache} ()}
\label{classXrl_a3e55df4b9a57c945ccbe3e6b5b681c75}

\item 
\hypertarget{classXrl_a1f40302593acd45279e7cc5e57af450f}{
void {\bfseries copy} (const \hyperlink{classXrl}{Xrl} \&xrl)}
\label{classXrl_a1f40302593acd45279e7cc5e57af450f}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrl_aba8c181d152e10aa0c04e3f96934dff2}{
string {\bfseries \_\-protocol}}
\label{classXrl_aba8c181d152e10aa0c04e3f96934dff2}

\item 
\hypertarget{classXrl_a993525875f52cd3bafc60733759a5aa7}{
string {\bfseries \_\-target}}
\label{classXrl_a993525875f52cd3bafc60733759a5aa7}

\item 
\hypertarget{classXrl_a4a8ae3e9f24761cf975fec8f7d787f89}{
string {\bfseries \_\-command}}
\label{classXrl_a4a8ae3e9f24761cf975fec8f7d787f89}

\item 
\hypertarget{classXrl_ada09f24ac7a421d40d251207f0d518a1}{
\hyperlink{classXrlArgs}{XrlArgs} {\bfseries \_\-args}}
\label{classXrl_ada09f24ac7a421d40d251207f0d518a1}

\item 
\hypertarget{classXrl_ab2874582576d5ddd16cf31fec7c47191}{
string {\bfseries \_\-string\_\-no\_\-args}}
\label{classXrl_ab2874582576d5ddd16cf31fec7c47191}

\item 
\hypertarget{classXrl_a94412552b51a129e7061683aefe92b2b}{
\hyperlink{classXrlAtom}{XrlAtom} $\ast$ {\bfseries \_\-sna\_\-atom}}
\label{classXrl_a94412552b51a129e7061683aefe92b2b}

\item 
\hypertarget{classXrl_a6a97aebe85064bd5af18c126fc5906f4}{
size\_\-t {\bfseries \_\-packed\_\-bytes}}
\label{classXrl_a6a97aebe85064bd5af18c126fc5906f4}

\item 
\hypertarget{classXrl_a72c5fe1a91d81f5a8a1b8aff68349f46}{
\hyperlink{classXrlArgs}{XrlArgs} $\ast$ {\bfseries \_\-argp}}
\label{classXrl_a72c5fe1a91d81f5a8a1b8aff68349f46}

\item 
\hypertarget{classXrl_ac330c1e44841b7c67bd6275776b6d991}{
int {\bfseries \_\-to\_\-finder}}
\label{classXrl_ac330c1e44841b7c67bd6275776b6d991}

\item 
\hypertarget{classXrl_a793d3fae0338185ab69e31226e914ba3}{
bool {\bfseries \_\-resolved}}
\label{classXrl_a793d3fae0338185ab69e31226e914ba3}

\item 
\hypertarget{classXrl_a3c134cb5d23036b388b6708f0325d413}{
\hyperlink{classref__ptr}{ref\_\-ptr}$<$ \hyperlink{classXrlPFSender}{XrlPFSender} $>$ {\bfseries \_\-resolved\_\-sender}}
\label{classXrl_a3c134cb5d23036b388b6708f0325d413}

\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrl_ae37f7e156e249305ca568d90e2535fd1}{
static const string {\bfseries \_\-finder\_\-protocol} = \char`\"{}finder\char`\"{}}
\label{classXrl_ae37f7e156e249305ca568d90e2535fd1}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
XORP IPC request. 

\subsection{Member Function Documentation}
\hypertarget{classXrl_ab8508cc6d4106dbd24e8a5aa1640cffa}{
\index{Xrl@{Xrl}!command@{command}}
\index{command@{command}!Xrl@{Xrl}}
\subsubsection[{command}]{\setlength{\rightskip}{0pt plus 5cm}const string\& Xrl::command (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXrl_ab8508cc6d4106dbd24e8a5aa1640cffa}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} command 
\end{DoxyReturn}
\hypertarget{classXrl_a52600a01da627f149f846eb1dc0177ff}{
\index{Xrl@{Xrl}!is\_\-resolved@{is\_\-resolved}}
\index{is\_\-resolved@{is\_\-resolved}!Xrl@{Xrl}}
\subsubsection[{is\_\-resolved}]{\setlength{\rightskip}{0pt plus 5cm}bool Xrl::is\_\-resolved (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classXrl_a52600a01da627f149f846eb1dc0177ff}
\begin{DoxyReturn}{Returns}
true if \hyperlink{classXrl}{Xrl} is resolved, ie protocol == finder. 
\end{DoxyReturn}
\hypertarget{classXrl_a94056f64126718a568a5cdf9639aadcf}{
\index{Xrl@{Xrl}!operator==@{operator==}}
\index{operator==@{operator==}!Xrl@{Xrl}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}bool Xrl::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf Xrl} \&}]{x}
\end{DoxyParamCaption}
) const}}
\label{classXrl_a94056f64126718a568a5cdf9639aadcf}


Test \hyperlink{protocolthe-p}{the} equivalence of two XRL's. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} XRL's are equivalent. 
\end{DoxyReturn}
\hypertarget{classXrl_ae9e1002be3c7d7e9d05d32973d4cc2e1}{
\index{Xrl@{Xrl}!pack@{pack}}
\index{pack@{pack}!Xrl@{Xrl}}
\subsubsection[{pack}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t Xrl::pack (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{buffer, }
\item[{size\_\-t}]{buffer\_\-bytes}
\end{DoxyParamCaption}
) const}}
\label{classXrl_ae9e1002be3c7d7e9d05d32973d4cc2e1}


Pack XRL into a byte array. 

The size of \hyperlink{protocolthe-p}{the} byte array should be larger or equal to \hyperlink{protocolthe-p}{the} value returned by \hyperlink{classXrl_a5ce3257bd79c275ace2f96f054f1f0d9}{packed\_\-bytes()}.


\begin{DoxyParams}{Parameters}
{\em buffer} & buffer to receive data. \\
\hline
{\em buffer\_\-bytes} & size of buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
size of packed data on success, 0 on failure. 
\end{DoxyReturn}
\hypertarget{classXrl_a55e839424dd27f1149747ef30c36a5d7}{
\index{Xrl@{Xrl}!protocol@{protocol}}
\index{protocol@{protocol}!Xrl@{Xrl}}
\subsubsection[{protocol}]{\setlength{\rightskip}{0pt plus 5cm}const string\& Xrl::protocol (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXrl_a55e839424dd27f1149747ef30c36a5d7}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} protocol associated with XRL. 
\end{DoxyReturn}
\hypertarget{classXrl_a97ff514547934e63deb7bb3b5a28c026}{
\index{Xrl@{Xrl}!string\_\-no\_\-args@{string\_\-no\_\-args}}
\index{string\_\-no\_\-args@{string\_\-no\_\-args}!Xrl@{Xrl}}
\subsubsection[{string\_\-no\_\-args}]{\setlength{\rightskip}{0pt plus 5cm}const string \& Xrl::string\_\-no\_\-args (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXrl_a97ff514547934e63deb7bb3b5a28c026}
\begin{DoxyReturn}{Returns}
string representation of \hyperlink{classXrl}{Xrl} without arguments. 
\end{DoxyReturn}
\hypertarget{classXrl_aa03daffd71473194f857cd8bf8538e0f}{
\index{Xrl@{Xrl}!target@{target}}
\index{target@{target}!Xrl@{Xrl}}
\subsubsection[{target}]{\setlength{\rightskip}{0pt plus 5cm}const string\& Xrl::target (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXrl_aa03daffd71473194f857cd8bf8538e0f}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} XRL target entity. 
\end{DoxyReturn}
\hypertarget{classXrl_ab47f4f904d1cfaa7fb1a007b66f07acd}{
\index{Xrl@{Xrl}!unpack@{unpack}}
\index{unpack@{unpack}!Xrl@{Xrl}}
\subsubsection[{unpack}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t Xrl::unpack (
\begin{DoxyParamCaption}
\item[{const uint8\_\-t $\ast$}]{buffer, }
\item[{size\_\-t}]{buffer\_\-bytes}
\end{DoxyParamCaption}
)}}
\label{classXrl_ab47f4f904d1cfaa7fb1a007b66f07acd}


Unpack XRL from serialized byte array. 


\begin{DoxyParams}{Parameters}
{\em buffer} & to read data from. \\
\hline
{\em buffer\_\-bytes} & size of buffer. The size should exactly match number of bytes of packed data, ie \hyperlink{classXrl_a5ce3257bd79c275ace2f96f054f1f0d9}{packed\_\-bytes()} value used when packing. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bytes turned into atoms on success, 0 on failure. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libxipc/xrl.hh\item 
/home/greearb/git/xorp.ct.github/xorp/libxipc/xrl.cc\end{DoxyCompactItemize}
