\hypertarget{classProtoNode}{
\section{ProtoNode$<$ V $>$ Class Template Reference}
\label{classProtoNode}\index{ProtoNode@{ProtoNode}}
}


Base class for a protocol node.  




{\ttfamily \#include $<$proto\_\-node.hh$>$}

Inheritance diagram for ProtoNode$<$ V $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=5.000000cm]{classProtoNode}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classProtoNode_ae673f73359a9d267841a16d0a89212b8}{ProtoNode} (int init\_\-family, xorp\_\-module\_\-id init\_\-module\_\-id, \hyperlink{classEventLoop}{EventLoop} \&init\_\-eventloop)
\begin{DoxyCompactList}\small\item\em Constructor for a given address family, module ID, and event loop. \item\end{DoxyCompactList}\item 
\hypertarget{classProtoNode_afae4ac8de23fbafafcb92be33d1724af}{
virtual \hyperlink{classProtoNode_afae4ac8de23fbafafcb92be33d1724af}{$\sim$ProtoNode} ()}
\label{classProtoNode_afae4ac8de23fbafafcb92be33d1724af}

\begin{DoxyCompactList}\small\item\em Destructor. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classProtoNode_aa43d3272199337b61d1612b8aab6513a}{vif\_\-name2vif\_\-index} (const string \&vif\_\-name) const 
\begin{DoxyCompactList}\small\item\em Map a vif name to a vif index. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classProtoNode_a74c78357c6b27e640772d8c34eb98415}{find\_\-unused\_\-vif\_\-index} () const 
\begin{DoxyCompactList}\small\item\em Find an unused vif index. \item\end{DoxyCompactList}\item 
V $\ast$ \hyperlink{classProtoNode_a2012bc3fe2b67f520bd9758ae5abd584}{vif\_\-find\_\-by\_\-name} (const string \&name) const 
\begin{DoxyCompactList}\small\item\em Find a virtual interface for a given name. \item\end{DoxyCompactList}\item 
V $\ast$ \hyperlink{classProtoNode_ab9dc1fe5bc40cae2e5c869a063b7c74e}{vif\_\-find\_\-by\_\-addr} (const \hyperlink{classIPvX}{IPvX} \&ipaddr\_\-test) const 
\begin{DoxyCompactList}\small\item\em Find a virtual interface for a given address. \item\end{DoxyCompactList}\item 
V $\ast$ \hyperlink{classProtoNode_af9447f77db794f8bc5343826a3f0bb1e}{vif\_\-find\_\-by\_\-pif\_\-index} (uint32\_\-t pif\_\-index) const 
\begin{DoxyCompactList}\small\item\em Find a virtual interface for a given physical interface index. \item\end{DoxyCompactList}\item 
V $\ast$ \hyperlink{classProtoNode_a7c544ff0660dd984f7d453a50353708f}{vif\_\-find\_\-by\_\-vif\_\-index} (uint32\_\-t vif\_\-index) const 
\begin{DoxyCompactList}\small\item\em Find a virtual interface for a given virtual interface index. \item\end{DoxyCompactList}\item 
V $\ast$ \hyperlink{classProtoNode_a4098d85ab0886640121e8c4ca472fb86}{vif\_\-find\_\-same\_\-subnet\_\-or\_\-p2p} (const \hyperlink{classIPvX}{IPvX} \&ipaddr\_\-test) const 
\begin{DoxyCompactList}\small\item\em Find a virtual interface that belongs to \hyperlink{protocolthe-p}{the} same subnet or point-\/to-\/point link as a given address. \item\end{DoxyCompactList}\item 
bool \hyperlink{classProtoNode_ad6a124a9a28ba06dc573e638edd5ad16}{is\_\-my\_\-addr} (const \hyperlink{classIPvX}{IPvX} \&ipaddr\_\-test) const 
\begin{DoxyCompactList}\small\item\em Test if an address belongs to one of my virtual interfaces. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_ae990292a31ed7f7e0f172c4888d9dd81}{add\_\-vif} (V $\ast$vif)
\begin{DoxyCompactList}\small\item\em Add a virtual interface. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_ac2769d979b9800a2430cf24ef5b8a330}{delete\_\-vif} (const V $\ast$vif)
\begin{DoxyCompactList}\small\item\em Delete a virtual interface. \item\end{DoxyCompactList}\item 
vector$<$ V $\ast$ $>$ \& \hyperlink{classProtoNode_ae952820e7103ed10ccb4535eaa95c563}{proto\_\-vifs} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} array of pointers to \hyperlink{protocolthe-p}{the} virtual interfaces. \item\end{DoxyCompactList}\item 
const vector$<$ V $\ast$ $>$ \& \hyperlink{classProtoNode_aee771e461363dc6f8cf8f1900307f703}{const\_\-proto\_\-vifs} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} array of pointers to \hyperlink{protocolthe-p}{the} virtual interfaces. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classProtoNode_a698b0ee7e3a806bca033231bdf844538}{maxvifs} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} maximum number of vifs. \item\end{DoxyCompactList}\item 
\hyperlink{classEventLoop}{EventLoop} \& \hyperlink{classProtoNode_aa90cacea40576e3b7dcdedec778b4933}{eventloop} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} event loop this node is added to. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classProtoNode_a4752a6a3ad1e4b79045d17681fb1a304}{proto\_\-recv} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&src\_\-address, const \hyperlink{classIPvX}{IPvX} \&dst\_\-address, uint8\_\-t ip\_\-protocol, int32\_\-t ip\_\-ttl, int32\_\-t ip\_\-tos, bool ip\_\-router\_\-alert, bool ip\_\-internet\_\-control, const vector$<$ uint8\_\-t $>$ \&payload, string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Receive a protocol packet. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classProtoNode_a71efa0229785013a79e9a5ee025d553f}{proto\_\-send} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&src\_\-address, const \hyperlink{classIPvX}{IPvX} \&dst\_\-address, uint8\_\-t ip\_\-protocol, int32\_\-t ip\_\-ttl, int32\_\-t ip\_\-tos, bool ip\_\-router\_\-alert, bool ip\_\-internet\_\-control, const uint8\_\-t $\ast$sndbuf, size\_\-t sndlen, string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} a protocol packet. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classProtoNode_a77df4775756fcc3b4ce487e38fcdea3c}{signal\_\-message\_\-recv} (const string \&src\_\-module\_\-instance\_\-name, int message\_\-type, uint32\_\-t vif\_\-index, const \hyperlink{classIPvX}{IPvX} \&src, const \hyperlink{classIPvX}{IPvX} \&dst, const uint8\_\-t $\ast$rcvbuf, size\_\-t rcvlen)=0
\begin{DoxyCompactList}\small\item\em Receive a signal message. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classProtoNode_aa54395d5f261926f403b9ff5323716b8}{signal\_\-message\_\-send} (const string \&dst\_\-module\_\-instance\_\-name, int message\_\-type, uint32\_\-t vif\_\-index, const \hyperlink{classIPvX}{IPvX} \&src, const \hyperlink{classIPvX}{IPvX} \&dst, const uint8\_\-t $\ast$sndbuf, size\_\-t sndlen)=0
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} a signal message. \item\end{DoxyCompactList}\item 
bool \hyperlink{classProtoNode_a6715b07b9360b3a6747ac1d34d1af7f1}{is\_\-done} () const 
\begin{DoxyCompactList}\small\item\em Test if \hyperlink{protocolthe-p}{the} node processing is done. \item\end{DoxyCompactList}\item 
ProcessStatus \hyperlink{classProtoNode_af2fb9691fa7c1a99f5d693ac8c144810}{node\_\-status} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} node status (see ProcessStatus). \item\end{DoxyCompactList}\item 
void \hyperlink{classProtoNode_a389b66c46d07c6f42cd8b365b9804e16}{set\_\-node\_\-status} (ProcessStatus v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} node status (see ProcessStatus). \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_a4da33b605363d14dd5d5ccc1f0287f87}{start\_\-config} (string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Start a set of configuration changes. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_a7f396433e4295382d75333ee6bc232c0}{end\_\-config} (string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em End a set of configuration changes. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classProtoNode_aeee816d10866d2b41736d69976e860f1}{find\_\-unused\_\-config\_\-vif\_\-index} () const 
\begin{DoxyCompactList}\small\item\em Find an unused vif index from \hyperlink{protocolthe-p}{the} set of configured vifs. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_a37a5a0e2ecc4c0d2ed1fca8abb99f103}{add\_\-config\_\-vif} (const \hyperlink{classVif}{Vif} \&vif, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Add a configured vif. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_ae670edd421d9b4cc070d1dc42a33feec}{add\_\-config\_\-vif} (const string \&vif\_\-name, uint32\_\-t vif\_\-index, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Add a configured vif. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_a3dbcc4f8420c2499d9a30e40c329308c}{delete\_\-config\_\-vif} (const string \&vif\_\-name, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Delete a configured vif. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_a9f182acf277a776229c6a9b03112aebb}{add\_\-config\_\-vif\_\-addr} (const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&addr, const \hyperlink{classIPvXNet}{IPvXNet} \&subnet, const \hyperlink{classIPvX}{IPvX} \&broadcast, const \hyperlink{classIPvX}{IPvX} \&peer, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Add an address to a configured vif. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_a661e899b0659e30dd33cb94a8a31cbaa}{delete\_\-config\_\-vif\_\-addr} (const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&addr, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Delete an address from a configured vif. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_a1d3c34f83142733e534b61186fb22cdb}{set\_\-config\_\-pif\_\-index} (const string \&vif\_\-name, uint32\_\-t pif\_\-index, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} pif\_\-index of a configured vif. \item\end{DoxyCompactList}\item 
int \hyperlink{classProtoNode_acc5d4ce5b1c3a86de0e1bca22ec3b791}{set\_\-config\_\-vif\_\-flags} (const string \&vif\_\-name, bool is\_\-pim\_\-register, bool is\_\-p2p, bool is\_\-loopback, bool is\_\-multicast, bool is\_\-broadcast, bool is\_\-up, uint32\_\-t mtu, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} vif flags of a configured vif. \item\end{DoxyCompactList}\item 
map$<$ string, \hyperlink{classVif}{Vif} $>$ \& \hyperlink{classProtoNode_a0ede33fbfcb31b154c2bcbfafbfa121b}{configured\_\-vifs} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} map with configured vifs. \item\end{DoxyCompactList}\item 
const \hyperlink{classVif}{Vif} $\ast$ \hyperlink{classProtoNode_a8dfe264a6cb4f6eefe25d562d31bc11f}{configured\_\-vif\_\-find\_\-by\_\-name} (const string \&name) const 
\begin{DoxyCompactList}\small\item\em Find a configured virtual interface for a given name. \item\end{DoxyCompactList}\item 
ProcessStatus \hyperlink{classProtoNode_ad2e33fcea7293a1f978d92732e3d2546}{node\_\-status} (string \&reason\_\-msg)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} node status (see ProcessStatus). \item\end{DoxyCompactList}\item 
\hypertarget{classProtoNode_a2f141a3b13a7df653d4eca33d4bdb4d0}{
void \hyperlink{classProtoNode_a2f141a3b13a7df653d4eca33d4bdb4d0}{incr\_\-startup\_\-requests\_\-n} ()}
\label{classProtoNode_a2f141a3b13a7df653d4eca33d4bdb4d0}

\begin{DoxyCompactList}\small\item\em Increment \hyperlink{protocolthe-p}{the} number of startup requests. \item\end{DoxyCompactList}\item 
\hypertarget{classProtoNode_afd358c716f122dda2c7191a8309b405f}{
void \hyperlink{classProtoNode_afd358c716f122dda2c7191a8309b405f}{decr\_\-startup\_\-requests\_\-n} ()}
\label{classProtoNode_afd358c716f122dda2c7191a8309b405f}

\begin{DoxyCompactList}\small\item\em Decrement \hyperlink{protocolthe-p}{the} number of startup requests. \item\end{DoxyCompactList}\item 
\hypertarget{classProtoNode_ad7edc41d8dfab39dd37c4ecdfa4f5065}{
void \hyperlink{classProtoNode_ad7edc41d8dfab39dd37c4ecdfa4f5065}{incr\_\-shutdown\_\-requests\_\-n} ()}
\label{classProtoNode_ad7edc41d8dfab39dd37c4ecdfa4f5065}

\begin{DoxyCompactList}\small\item\em Increment \hyperlink{protocolthe-p}{the} number of shutdown requests. \item\end{DoxyCompactList}\item 
\hypertarget{classProtoNode_a38651a44392d2e38dc05197ffc062c22}{
void \hyperlink{classProtoNode_a38651a44392d2e38dc05197ffc062c22}{decr\_\-shutdown\_\-requests\_\-n} ()}
\label{classProtoNode_a38651a44392d2e38dc05197ffc062c22}

\begin{DoxyCompactList}\small\item\em Decrement \hyperlink{protocolthe-p}{the} number of shutdown requests. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classProtoNode_a3c2b860af63ccec9d622d8c3e8339ef8}{
void {\bfseries update\_\-status} ()}
\label{classProtoNode_a3c2b860af63ccec9d622d8c3e8339ef8}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classProtoNode_ab111419441f80e7d7e1178597388f253}{
vector$<$ V $\ast$ $>$ {\bfseries \_\-proto\_\-vifs}}
\label{classProtoNode_ab111419441f80e7d7e1178597388f253}

\item 
\hypertarget{classProtoNode_a6015edfb774b0453035acaa841e07d65}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-eventloop}}
\label{classProtoNode_a6015edfb774b0453035acaa841e07d65}

\item 
\hypertarget{classProtoNode_a9f4af12c8aa4217d516a13eab7d0ba1c}{
map$<$ string, uint32\_\-t $>$ {\bfseries \_\-vif\_\-name2vif\_\-index\_\-map}}
\label{classProtoNode_a9f4af12c8aa4217d516a13eab7d0ba1c}

\item 
\hypertarget{classProtoNode_abe7aa3f677b002080af22e30265cc8c9}{
ProcessStatus {\bfseries \_\-node\_\-status}}
\label{classProtoNode_abe7aa3f677b002080af22e30265cc8c9}

\item 
\hypertarget{classProtoNode_ae48be0d8fcaf1677a785d0c5b7064221}{
size\_\-t {\bfseries \_\-startup\_\-requests\_\-n}}
\label{classProtoNode_ae48be0d8fcaf1677a785d0c5b7064221}

\item 
\hypertarget{classProtoNode_aa4b419957363e91db0028c5e8467c30b}{
size\_\-t {\bfseries \_\-shutdown\_\-requests\_\-n}}
\label{classProtoNode_aa4b419957363e91db0028c5e8467c30b}

\item 
\hypertarget{classProtoNode_acb11bb7047836406ab09d7f5740771d5}{
map$<$ string, \hyperlink{classVif}{Vif} $>$ {\bfseries \_\-configured\_\-vifs}}
\label{classProtoNode_acb11bb7047836406ab09d7f5740771d5}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class V$>$ class ProtoNode$<$ V $>$}

Base class for a protocol node. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classProtoNode_ae673f73359a9d267841a16d0a89212b8}{
\index{ProtoNode@{ProtoNode}!ProtoNode@{ProtoNode}}
\index{ProtoNode@{ProtoNode}!ProtoNode@{ProtoNode}}
\subsubsection[{ProtoNode}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ {\bf ProtoNode}$<$ V $>$::{\bf ProtoNode} (
\begin{DoxyParamCaption}
\item[{int}]{init\_\-family, }
\item[{xorp\_\-module\_\-id}]{init\_\-module\_\-id, }
\item[{{\bf EventLoop} \&}]{init\_\-eventloop}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_ae673f73359a9d267841a16d0a89212b8}


Constructor for a given address family, module ID, and event loop. 


\begin{DoxyParams}{Parameters}
{\em init\_\-family} & \hyperlink{protocolthe-p}{the} address family (AF\_\-INET or AF\_\-INET6 for \hyperlink{classIPv4}{IPv4} and \hyperlink{classIPv6}{IPv6} respectively). \\
\hline
{\em init\_\-module\_\-id} & \hyperlink{protocolthe-p}{the} module ID XORP\_\-MODULE\_\-$\ast$ (xorp\_\-module\_\-id). \\
\hline
{\em init\_\-eventloop} & \hyperlink{protocolthe-p}{the} event loop to use. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classProtoNode_a37a5a0e2ecc4c0d2ed1fca8abb99f103}{
\index{ProtoNode@{ProtoNode}!add\_\-config\_\-vif@{add\_\-config\_\-vif}}
\index{add\_\-config\_\-vif@{add\_\-config\_\-vif}!ProtoNode@{ProtoNode}}
\subsubsection[{add\_\-config\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::add\_\-config\_\-vif (
\begin{DoxyParamCaption}
\item[{const {\bf Vif} \&}]{vif, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a37a5a0e2ecc4c0d2ed1fca8abb99f103}


Add a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vif} & \hyperlink{protocolthe-p}{the} vif with \hyperlink{protocolthe-p}{the} information to add. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classMfeaNode_ab125258754ed70160f1197d4330645c5}{MfeaNode}.

\hypertarget{classProtoNode_ae670edd421d9b4cc070d1dc42a33feec}{
\index{ProtoNode@{ProtoNode}!add\_\-config\_\-vif@{add\_\-config\_\-vif}}
\index{add\_\-config\_\-vif@{add\_\-config\_\-vif}!ProtoNode@{ProtoNode}}
\subsubsection[{add\_\-config\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::add\_\-config\_\-vif (
\begin{DoxyParamCaption}
\item[{const string \&}]{vif\_\-name, }
\item[{uint32\_\-t}]{vif\_\-index, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_ae670edd421d9b4cc070d1dc42a33feec}


Add a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif to add. \\
\hline
{\em vif\_\-index} & \hyperlink{protocolthe-p}{the} vif index of \hyperlink{protocolthe-p}{the} vif to add. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a9f182acf277a776229c6a9b03112aebb}{
\index{ProtoNode@{ProtoNode}!add\_\-config\_\-vif\_\-addr@{add\_\-config\_\-vif\_\-addr}}
\index{add\_\-config\_\-vif\_\-addr@{add\_\-config\_\-vif\_\-addr}!ProtoNode@{ProtoNode}}
\subsubsection[{add\_\-config\_\-vif\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::add\_\-config\_\-vif\_\-addr (
\begin{DoxyParamCaption}
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPvX} \&}]{addr, }
\item[{const {\bf IPvXNet} \&}]{subnet, }
\item[{const {\bf IPvX} \&}]{broadcast, }
\item[{const {\bf IPvX} \&}]{peer, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a9f182acf277a776229c6a9b03112aebb}


Add an address to a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif. \\
\hline
{\em addr} & \hyperlink{protocolthe-p}{the} address to add. \\
\hline
{\em subnet} & \hyperlink{protocolthe-p}{the} subnet address to add. \\
\hline
{\em broadcast} & \hyperlink{protocolthe-p}{the} broadcast address to add. \\
\hline
{\em peer} & \hyperlink{protocolthe-p}{the} peer address to add. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_ae990292a31ed7f7e0f172c4888d9dd81}{
\index{ProtoNode@{ProtoNode}!add\_\-vif@{add\_\-vif}}
\index{add\_\-vif@{add\_\-vif}!ProtoNode@{ProtoNode}}
\subsubsection[{add\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ int {\bf ProtoNode}$<$ V $>$::add\_\-vif (
\begin{DoxyParamCaption}
\item[{V $\ast$}]{vif}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_ae990292a31ed7f7e0f172c4888d9dd81}


Add a virtual interface. 


\begin{DoxyParams}{Parameters}
{\em vif} & a pointer to \hyperlink{protocolthe-p}{the} virtual interface to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a8dfe264a6cb4f6eefe25d562d31bc11f}{
\index{ProtoNode@{ProtoNode}!configured\_\-vif\_\-find\_\-by\_\-name@{configured\_\-vif\_\-find\_\-by\_\-name}}
\index{configured\_\-vif\_\-find\_\-by\_\-name@{configured\_\-vif\_\-find\_\-by\_\-name}!ProtoNode@{ProtoNode}}
\subsubsection[{configured\_\-vif\_\-find\_\-by\_\-name}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ const {\bf Vif} $\ast$ {\bf ProtoNode}$<$ V $>$::configured\_\-vif\_\-find\_\-by\_\-name (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a8dfe264a6cb4f6eefe25d562d31bc11f}


Find a configured virtual interface for a given name. 


\begin{DoxyParams}{Parameters}
{\em name} & \hyperlink{protocolthe-p}{the} name to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} virtual interface with name name if found, otherwise NULL. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a0ede33fbfcb31b154c2bcbfafbfa121b}{
\index{ProtoNode@{ProtoNode}!configured\_\-vifs@{configured\_\-vifs}}
\index{configured\_\-vifs@{configured\_\-vifs}!ProtoNode@{ProtoNode}}
\subsubsection[{configured\_\-vifs}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ map$<$string, {\bf Vif}$>$\& {\bf ProtoNode}$<$ V $>$::configured\_\-vifs (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a0ede33fbfcb31b154c2bcbfafbfa121b}


Get \hyperlink{protocolthe-p}{the} map with configured vifs. 

\begin{DoxyReturn}{Returns}
a reference for \hyperlink{protocolthe-p}{the} map with configured vifs. 
\end{DoxyReturn}
\hypertarget{classProtoNode_aee771e461363dc6f8cf8f1900307f703}{
\index{ProtoNode@{ProtoNode}!const\_\-proto\_\-vifs@{const\_\-proto\_\-vifs}}
\index{const\_\-proto\_\-vifs@{const\_\-proto\_\-vifs}!ProtoNode@{ProtoNode}}
\subsubsection[{const\_\-proto\_\-vifs}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ const vector$<$V $\ast$$>$\& {\bf ProtoNode}$<$ V $>$::const\_\-proto\_\-vifs (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_aee771e461363dc6f8cf8f1900307f703}


Get \hyperlink{protocolthe-p}{the} array of pointers to \hyperlink{protocolthe-p}{the} virtual interfaces. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} array of pointers to \hyperlink{protocolthe-p}{the} virtual interfaces. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a3dbcc4f8420c2499d9a30e40c329308c}{
\index{ProtoNode@{ProtoNode}!delete\_\-config\_\-vif@{delete\_\-config\_\-vif}}
\index{delete\_\-config\_\-vif@{delete\_\-config\_\-vif}!ProtoNode@{ProtoNode}}
\subsubsection[{delete\_\-config\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::delete\_\-config\_\-vif (
\begin{DoxyParamCaption}
\item[{const string \&}]{vif\_\-name, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a3dbcc4f8420c2499d9a30e40c329308c}


Delete a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif to delete. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a661e899b0659e30dd33cb94a8a31cbaa}{
\index{ProtoNode@{ProtoNode}!delete\_\-config\_\-vif\_\-addr@{delete\_\-config\_\-vif\_\-addr}}
\index{delete\_\-config\_\-vif\_\-addr@{delete\_\-config\_\-vif\_\-addr}!ProtoNode@{ProtoNode}}
\subsubsection[{delete\_\-config\_\-vif\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::delete\_\-config\_\-vif\_\-addr (
\begin{DoxyParamCaption}
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPvX} \&}]{addr, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a661e899b0659e30dd33cb94a8a31cbaa}


Delete an address from a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif. \\
\hline
{\em addr} & \hyperlink{protocolthe-p}{the} address to delete. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_ac2769d979b9800a2430cf24ef5b8a330}{
\index{ProtoNode@{ProtoNode}!delete\_\-vif@{delete\_\-vif}}
\index{delete\_\-vif@{delete\_\-vif}!ProtoNode@{ProtoNode}}
\subsubsection[{delete\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ int {\bf ProtoNode}$<$ V $>$::delete\_\-vif (
\begin{DoxyParamCaption}
\item[{const V $\ast$}]{vif}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_ac2769d979b9800a2430cf24ef5b8a330}


Delete a virtual interface. 

Note: \hyperlink{protocolthe-p}{the} vif itself is not deleted, only its place in \hyperlink{protocolthe-p}{the} array of protocol vifs.


\begin{DoxyParams}{Parameters}
{\em vif} & a pointer to \hyperlink{protocolthe-p}{the} virtual interface to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a7f396433e4295382d75333ee6bc232c0}{
\index{ProtoNode@{ProtoNode}!end\_\-config@{end\_\-config}}
\index{end\_\-config@{end\_\-config}!ProtoNode@{ProtoNode}}
\subsubsection[{end\_\-config}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::end\_\-config (
\begin{DoxyParamCaption}
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a7f396433e4295382d75333ee6bc232c0}


End a set of configuration changes. 

Note that it may change \hyperlink{protocolthe-p}{the} node status.


\begin{DoxyParams}{Parameters}
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_aa90cacea40576e3b7dcdedec778b4933}{
\index{ProtoNode@{ProtoNode}!eventloop@{eventloop}}
\index{eventloop@{eventloop}!ProtoNode@{ProtoNode}}
\subsubsection[{eventloop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ {\bf EventLoop}\& {\bf ProtoNode}$<$ V $>$::eventloop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_aa90cacea40576e3b7dcdedec778b4933}


Get \hyperlink{protocolthe-p}{the} event loop this node is added to. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} event loop this node is added to. 
\end{DoxyReturn}
\hypertarget{classProtoNode_aeee816d10866d2b41736d69976e860f1}{
\index{ProtoNode@{ProtoNode}!find\_\-unused\_\-config\_\-vif\_\-index@{find\_\-unused\_\-config\_\-vif\_\-index}}
\index{find\_\-unused\_\-config\_\-vif\_\-index@{find\_\-unused\_\-config\_\-vif\_\-index}!ProtoNode@{ProtoNode}}
\subsubsection[{find\_\-unused\_\-config\_\-vif\_\-index}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ uint32\_\-t {\bf ProtoNode}$<$ V $>$::find\_\-unused\_\-config\_\-vif\_\-index (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_aeee816d10866d2b41736d69976e860f1}


Find an unused vif index from \hyperlink{protocolthe-p}{the} set of configured vifs. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} smallest unused vif index from \hyperlink{protocolthe-p}{the} set of configured vifs if there is one available, otherwise return Vif::VIF\_\-INDEX\_\-INVALID. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a74c78357c6b27e640772d8c34eb98415}{
\index{ProtoNode@{ProtoNode}!find\_\-unused\_\-vif\_\-index@{find\_\-unused\_\-vif\_\-index}}
\index{find\_\-unused\_\-vif\_\-index@{find\_\-unused\_\-vif\_\-index}!ProtoNode@{ProtoNode}}
\subsubsection[{find\_\-unused\_\-vif\_\-index}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ uint32\_\-t {\bf ProtoNode}$<$ V $>$::find\_\-unused\_\-vif\_\-index (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a74c78357c6b27e640772d8c34eb98415}


Find an unused vif index. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} smallest unused vif index if there is one available, otherwise return Vif::VIF\_\-INDEX\_\-INVALID. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a6715b07b9360b3a6747ac1d34d1af7f1}{
\index{ProtoNode@{ProtoNode}!is\_\-done@{is\_\-done}}
\index{is\_\-done@{is\_\-done}!ProtoNode@{ProtoNode}}
\subsubsection[{is\_\-done}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ bool {\bf ProtoNode}$<$ V $>$::is\_\-done (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a6715b07b9360b3a6747ac1d34d1af7f1}


Test if \hyperlink{protocolthe-p}{the} node processing is done. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} node processing is done, otherwise false. 
\end{DoxyReturn}
\hypertarget{classProtoNode_ad6a124a9a28ba06dc573e638edd5ad16}{
\index{ProtoNode@{ProtoNode}!is\_\-my\_\-addr@{is\_\-my\_\-addr}}
\index{is\_\-my\_\-addr@{is\_\-my\_\-addr}!ProtoNode@{ProtoNode}}
\subsubsection[{is\_\-my\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ bool {\bf ProtoNode}$<$ V $>$::is\_\-my\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{ipaddr\_\-test}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_ad6a124a9a28ba06dc573e638edd5ad16}


Test if an address belongs to one of my virtual interfaces. 

Note that \hyperlink{protocolthe-p}{the} PIM Register virtual interfaces are excluded, because they are special, and because they may share \hyperlink{protocolthe-p}{the} same address as some of \hyperlink{protocolthe-p}{the} other virtual interfaces.


\begin{DoxyParams}{Parameters}
{\em ipaddr\_\-test} & \hyperlink{protocolthe-p}{the} address to test. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if ipaddr\_\-test belongs to one of my virtual interfaces, otherwise false. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a698b0ee7e3a806bca033231bdf844538}{
\index{ProtoNode@{ProtoNode}!maxvifs@{maxvifs}}
\index{maxvifs@{maxvifs}!ProtoNode@{ProtoNode}}
\subsubsection[{maxvifs}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ uint32\_\-t {\bf ProtoNode}$<$ V $>$::maxvifs (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a698b0ee7e3a806bca033231bdf844538}


Get \hyperlink{protocolthe-p}{the} maximum number of vifs. 

Note: \hyperlink{protocolthe-p}{the} interfaces that are not configured or are down are also included.

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} maximum number of vifs we can have. 
\end{DoxyReturn}
\hypertarget{classProtoNode_ad2e33fcea7293a1f978d92732e3d2546}{
\index{ProtoNode@{ProtoNode}!node\_\-status@{node\_\-status}}
\index{node\_\-status@{node\_\-status}!ProtoNode@{ProtoNode}}
\subsubsection[{node\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ ProcessStatus {\bf ProtoNode}$<$ V $>$::node\_\-status (
\begin{DoxyParamCaption}
\item[{string \&}]{reason\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classProtoNode_ad2e33fcea7293a1f978d92732e3d2546}


Get \hyperlink{protocolthe-p}{the} node status (see ProcessStatus). 


\begin{DoxyParams}{Parameters}
{\em reason\_\-msg} & return-\/by-\/reference string that contains human-\/readable information about \hyperlink{protocolthe-p}{the} status. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} node status (see ProcessStatus). 
\end{DoxyReturn}
\hypertarget{classProtoNode_af2fb9691fa7c1a99f5d693ac8c144810}{
\index{ProtoNode@{ProtoNode}!node\_\-status@{node\_\-status}}
\index{node\_\-status@{node\_\-status}!ProtoNode@{ProtoNode}}
\subsubsection[{node\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ ProcessStatus {\bf ProtoNode}$<$ V $>$::node\_\-status (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_af2fb9691fa7c1a99f5d693ac8c144810}


Get \hyperlink{protocolthe-p}{the} node status (see ProcessStatus). 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} node status (see ProcessStatus). 
\end{DoxyReturn}
\hypertarget{classProtoNode_a4752a6a3ad1e4b79045d17681fb1a304}{
\index{ProtoNode@{ProtoNode}!proto\_\-recv@{proto\_\-recv}}
\index{proto\_\-recv@{proto\_\-recv}!ProtoNode@{ProtoNode}}
\subsubsection[{proto\_\-recv}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ virtual int {\bf ProtoNode}$<$ V $>$::proto\_\-recv (
\begin{DoxyParamCaption}
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPvX} \&}]{src\_\-address, }
\item[{const {\bf IPvX} \&}]{dst\_\-address, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{int32\_\-t}]{ip\_\-ttl, }
\item[{int32\_\-t}]{ip\_\-tos, }
\item[{bool}]{ip\_\-router\_\-alert, }
\item[{bool}]{ip\_\-internet\_\-control, }
\item[{const vector$<$ uint8\_\-t $>$ \&}]{payload, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classProtoNode_a4752a6a3ad1e4b79045d17681fb1a304}


Receive a protocol packet. 

This is a pure virtual function, and it must be implemented by \hyperlink{protocolthe-p}{the} particular protocol node class that inherits this base class.


\begin{DoxyParams}{Parameters}
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface name \hyperlink{protocolthe-p}{the} packet arrived on. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif name \hyperlink{protocolthe-p}{the} packet arrived on. \\
\hline
{\em src\_\-address} & \hyperlink{protocolthe-p}{the} IP source address. \\
\hline
{\em dst\_\-address} & \hyperlink{protocolthe-p}{the} IP destination address. \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP protocol number. \\
\hline
{\em ip\_\-ttl} & \hyperlink{protocolthe-p}{the} IP TTL (hop-\/limit). If it has a negative value, then \hyperlink{protocolthe-p}{the} received value is unknown. \\
\hline
{\em ip\_\-tos} & \hyperlink{protocolthe-p}{the} Type of Service (Diffserv/ECN bits for \hyperlink{classIPv4}{IPv4}). If it has a negative value, then \hyperlink{protocolthe-p}{the} received value is unknown. \\
\hline
{\em ip\_\-router\_\-alert} & if true, \hyperlink{protocolthe-p}{the} IP Router Alert option was included in \hyperlink{protocolthe-p}{the} IP packet. \\
\hline
{\em ip\_\-internet\_\-control} & if true, then this is IP control traffic. \\
\hline
{\em payload} & \hyperlink{protocolthe-p}{the} payload, everything after \hyperlink{protocolthe-p}{the} IP header and options. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implemented in \hyperlink{classCliNode_a18c1ec32382ebc8848cf7de33e6f0d84}{CliNode}, \hyperlink{classMld6igmpNode_a5b4ba19dd9a50972c36bb8d02e4db1c8}{Mld6igmpNode}, \hyperlink{classMfeaNode_a0dc78bbda5e0c3fc19fbafc2481bef82}{MfeaNode}, \hyperlink{classMld6igmpNode_a5b4ba19dd9a50972c36bb8d02e4db1c8}{Mld6igmpNode}, and \hyperlink{classPimNode_a963d2e0cfbb60ff3edd39dbe4ab5f50c}{PimNode}.

\hypertarget{classProtoNode_a71efa0229785013a79e9a5ee025d553f}{
\index{ProtoNode@{ProtoNode}!proto\_\-send@{proto\_\-send}}
\index{proto\_\-send@{proto\_\-send}!ProtoNode@{ProtoNode}}
\subsubsection[{proto\_\-send}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ virtual int {\bf ProtoNode}$<$ V $>$::proto\_\-send (
\begin{DoxyParamCaption}
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPvX} \&}]{src\_\-address, }
\item[{const {\bf IPvX} \&}]{dst\_\-address, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{int32\_\-t}]{ip\_\-ttl, }
\item[{int32\_\-t}]{ip\_\-tos, }
\item[{bool}]{ip\_\-router\_\-alert, }
\item[{bool}]{ip\_\-internet\_\-control, }
\item[{const uint8\_\-t $\ast$}]{sndbuf, }
\item[{size\_\-t}]{sndlen, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classProtoNode_a71efa0229785013a79e9a5ee025d553f}


\hyperlink{structSend}{Send} a protocol packet. 

This is a pure virtual function, and it must be implemented by \hyperlink{protocolthe-p}{the} particular protocol node class that inherits this base class.


\begin{DoxyParams}{Parameters}
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface to send \hyperlink{protocolthe-p}{the} packet on. It is essential for multicast. In \hyperlink{protocolthe-p}{the} unicast case this field may be empty. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif to send \hyperlink{protocolthe-p}{the} packet on. It is essential for multicast. In \hyperlink{protocolthe-p}{the} unicast case this field may be empty. \\
\hline
{\em src\_\-address} & \hyperlink{protocolthe-p}{the} IP source address. \\
\hline
{\em dst\_\-address} & \hyperlink{protocolthe-p}{the} IP destination address. \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP protocol number. It must be between 1 and 255. \\
\hline
{\em ip\_\-ttl} & \hyperlink{protocolthe-p}{the} IP TTL (hop-\/limit). If it has a negative value, \hyperlink{protocolthe-p}{the} TTL will be set internally before transmission. \\
\hline
{\em ip\_\-tos} & \hyperlink{protocolthe-p}{the} Type Of Service (Diffserv/ECN bits for \hyperlink{classIPv4}{IPv4}). If it has a negative value, \hyperlink{protocolthe-p}{the} TOS will be set internally before transmission. \\
\hline
{\em ip\_\-router\_\-alert} & if true, then add \hyperlink{protocolthe-p}{the} IP Router Alert option to \hyperlink{protocolthe-p}{the} IP packet. \\
\hline
{\em ip\_\-internet\_\-control} & if true, then this is IP control traffic. \\
\hline
{\em sndbuf} & \hyperlink{protocolthe-p}{the} data buffer with \hyperlink{protocolthe-p}{the} outgoing packet. \\
\hline
{\em sndlen} & \hyperlink{protocolthe-p}{the} data length in sndbuf. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implemented in \hyperlink{classCliNode_a62b1a6e455db8da87df6c865f0a0b126}{CliNode}, \hyperlink{classXrlMld6igmpNode_a3c7cbcb6a45f6d10e35bd600a1b9b739}{XrlMld6igmpNode}, \hyperlink{classMfeaNode_a3c10f005250ff19ead5d0dba7299fc17}{MfeaNode}, \hyperlink{classXrlMld6igmpNode_a3c7cbcb6a45f6d10e35bd600a1b9b739}{XrlMld6igmpNode}, and \hyperlink{classXrlPimNode_a7d2b67b6a609b37bca6757a0339825df}{XrlPimNode}.

\hypertarget{classProtoNode_ae952820e7103ed10ccb4535eaa95c563}{
\index{ProtoNode@{ProtoNode}!proto\_\-vifs@{proto\_\-vifs}}
\index{proto\_\-vifs@{proto\_\-vifs}!ProtoNode@{ProtoNode}}
\subsubsection[{proto\_\-vifs}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ vector$<$V $\ast$$>$\& {\bf ProtoNode}$<$ V $>$::proto\_\-vifs (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_ae952820e7103ed10ccb4535eaa95c563}


Get \hyperlink{protocolthe-p}{the} array of pointers to \hyperlink{protocolthe-p}{the} virtual interfaces. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} array of pointers to \hyperlink{protocolthe-p}{the} virtual interfaces. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a1d3c34f83142733e534b61186fb22cdb}{
\index{ProtoNode@{ProtoNode}!set\_\-config\_\-pif\_\-index@{set\_\-config\_\-pif\_\-index}}
\index{set\_\-config\_\-pif\_\-index@{set\_\-config\_\-pif\_\-index}!ProtoNode@{ProtoNode}}
\subsubsection[{set\_\-config\_\-pif\_\-index}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::set\_\-config\_\-pif\_\-index (
\begin{DoxyParamCaption}
\item[{const string \&}]{vif\_\-name, }
\item[{uint32\_\-t}]{pif\_\-index, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a1d3c34f83142733e534b61186fb22cdb}


Set \hyperlink{protocolthe-p}{the} pif\_\-index of a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif. \\
\hline
{\em pif\_\-index} & \hyperlink{protocolthe-p}{the} physical interface index. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_acc5d4ce5b1c3a86de0e1bca22ec3b791}{
\index{ProtoNode@{ProtoNode}!set\_\-config\_\-vif\_\-flags@{set\_\-config\_\-vif\_\-flags}}
\index{set\_\-config\_\-vif\_\-flags@{set\_\-config\_\-vif\_\-flags}!ProtoNode@{ProtoNode}}
\subsubsection[{set\_\-config\_\-vif\_\-flags}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::set\_\-config\_\-vif\_\-flags (
\begin{DoxyParamCaption}
\item[{const string \&}]{vif\_\-name, }
\item[{bool}]{is\_\-pim\_\-register, }
\item[{bool}]{is\_\-p2p, }
\item[{bool}]{is\_\-loopback, }
\item[{bool}]{is\_\-multicast, }
\item[{bool}]{is\_\-broadcast, }
\item[{bool}]{is\_\-up, }
\item[{uint32\_\-t}]{mtu, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_acc5d4ce5b1c3a86de0e1bca22ec3b791}


Set \hyperlink{protocolthe-p}{the} vif flags of a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif. \\
\hline
{\em is\_\-pim\_\-register} & true if \hyperlink{protocolthe-p}{the} vif is a PIM Register interface. \\
\hline
{\em is\_\-p2p} & true if \hyperlink{protocolthe-p}{the} vif is point-\/to-\/point interface. \\
\hline
{\em is\_\-loopback} & true if \hyperlink{protocolthe-p}{the} vif is a loopback interface. \\
\hline
{\em is\_\-multicast} & true if \hyperlink{protocolthe-p}{the} vif is multicast capable. \\
\hline
{\em is\_\-broadcast} & true if \hyperlink{protocolthe-p}{the} vif is broadcast capable. \\
\hline
{\em is\_\-up} & true if \hyperlink{protocolthe-p}{the} underlying vif is UP. \\
\hline
{\em mtu} & \hyperlink{protocolthe-p}{the} MTU of \hyperlink{protocolthe-p}{the} vif. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classMfeaNode_adb3194e40e6ee86f456ff0736e5d3403}{MfeaNode}.

\hypertarget{classProtoNode_a389b66c46d07c6f42cd8b365b9804e16}{
\index{ProtoNode@{ProtoNode}!set\_\-node\_\-status@{set\_\-node\_\-status}}
\index{set\_\-node\_\-status@{set\_\-node\_\-status}!ProtoNode@{ProtoNode}}
\subsubsection[{set\_\-node\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ void {\bf ProtoNode}$<$ V $>$::set\_\-node\_\-status (
\begin{DoxyParamCaption}
\item[{ProcessStatus}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a389b66c46d07c6f42cd8b365b9804e16}


Set \hyperlink{protocolthe-p}{the} node status (see ProcessStatus). 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} value to set \hyperlink{protocolthe-p}{the} node status to. \\
\hline
\end{DoxyParams}
\hypertarget{classProtoNode_a77df4775756fcc3b4ce487e38fcdea3c}{
\index{ProtoNode@{ProtoNode}!signal\_\-message\_\-recv@{signal\_\-message\_\-recv}}
\index{signal\_\-message\_\-recv@{signal\_\-message\_\-recv}!ProtoNode@{ProtoNode}}
\subsubsection[{signal\_\-message\_\-recv}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ virtual int {\bf ProtoNode}$<$ V $>$::signal\_\-message\_\-recv (
\begin{DoxyParamCaption}
\item[{const string \&}]{src\_\-module\_\-instance\_\-name, }
\item[{int}]{message\_\-type, }
\item[{uint32\_\-t}]{vif\_\-index, }
\item[{const {\bf IPvX} \&}]{src, }
\item[{const {\bf IPvX} \&}]{dst, }
\item[{const uint8\_\-t $\ast$}]{rcvbuf, }
\item[{size\_\-t}]{rcvlen}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classProtoNode_a77df4775756fcc3b4ce487e38fcdea3c}


Receive a signal message. 

This is a pure virtual function, and it must be implemented by \hyperlink{protocolthe-p}{the} particular protocol node class that inherits this base class.


\begin{DoxyParams}{Parameters}
{\em src\_\-module\_\-instance\_\-name} & \hyperlink{protocolthe-p}{the} module instance name of \hyperlink{protocolthe-p}{the} module-\/origin of \hyperlink{protocolthe-p}{the} message.\\
\hline
{\em message\_\-type} & \hyperlink{protocolthe-p}{the} message type. The particular values are specific for \hyperlink{protocolthe-p}{the} origin and recepient of this signal message.\\
\hline
{\em vif\_\-index} & \hyperlink{protocolthe-p}{the} vif index of \hyperlink{protocolthe-p}{the} related interface (message-\/specific relation).\\
\hline
{\em src} & \hyperlink{protocolthe-p}{the} source address of \hyperlink{protocolthe-p}{the} message. The exact meaning of this address is message-\/specific.\\
\hline
{\em dst} & \hyperlink{protocolthe-p}{the} destination address of \hyperlink{protocolthe-p}{the} message. The exact meaning of this address is message-\/specific.\\
\hline
{\em rcvbuf} & \hyperlink{protocolthe-p}{the} data buffer with \hyperlink{protocolthe-p}{the} additional information in \hyperlink{protocolthe-p}{the} message. \\
\hline
{\em rcvlen} & \hyperlink{protocolthe-p}{the} data length in rcvbuf.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implemented in \hyperlink{classCliNode_a34ddc5dd5aaf4fae22d0f46604f59b76}{CliNode}, \hyperlink{classMld6igmpNode_a861331b820df301bb45b13edf9f7c297}{Mld6igmpNode}, \hyperlink{classMfeaNode_a849f69d434801b289f7a27feeeafd928}{MfeaNode}, \hyperlink{classMld6igmpNode_a861331b820df301bb45b13edf9f7c297}{Mld6igmpNode}, and \hyperlink{classPimNode_aad54f16da6858aed74ed9980c6c9aadc}{PimNode}.

\hypertarget{classProtoNode_aa54395d5f261926f403b9ff5323716b8}{
\index{ProtoNode@{ProtoNode}!signal\_\-message\_\-send@{signal\_\-message\_\-send}}
\index{signal\_\-message\_\-send@{signal\_\-message\_\-send}!ProtoNode@{ProtoNode}}
\subsubsection[{signal\_\-message\_\-send}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V$>$ virtual int {\bf ProtoNode}$<$ V $>$::signal\_\-message\_\-send (
\begin{DoxyParamCaption}
\item[{const string \&}]{dst\_\-module\_\-instance\_\-name, }
\item[{int}]{message\_\-type, }
\item[{uint32\_\-t}]{vif\_\-index, }
\item[{const {\bf IPvX} \&}]{src, }
\item[{const {\bf IPvX} \&}]{dst, }
\item[{const uint8\_\-t $\ast$}]{sndbuf, }
\item[{size\_\-t}]{sndlen}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classProtoNode_aa54395d5f261926f403b9ff5323716b8}


\hyperlink{structSend}{Send} a signal message. 

This is a pure virtual function, and it must be implemented by \hyperlink{protocolthe-p}{the} particular protocol node class that inherits this base class.


\begin{DoxyParams}{Parameters}
{\em dst\_\-module\_\-instance\_\-name} & \hyperlink{protocolthe-p}{the} module instance name of \hyperlink{protocolthe-p}{the} module-\/recepient of \hyperlink{protocolthe-p}{the} message.\\
\hline
{\em message\_\-type} & \hyperlink{protocolthe-p}{the} message type. The particular values are specific for \hyperlink{protocolthe-p}{the} origin and recepient of this signal message.\\
\hline
{\em vif\_\-index} & \hyperlink{protocolthe-p}{the} vif index of \hyperlink{protocolthe-p}{the} related interface (message-\/specific relation).\\
\hline
{\em src} & \hyperlink{protocolthe-p}{the} source address of \hyperlink{protocolthe-p}{the} message. The exact meaning of this address is message-\/specific.\\
\hline
{\em dst} & \hyperlink{protocolthe-p}{the} destination address of \hyperlink{protocolthe-p}{the} message. The exact meaning of this address is message-\/specific.\\
\hline
{\em sndbuf} & \hyperlink{protocolthe-p}{the} data buffer with \hyperlink{protocolthe-p}{the} outgoing message.\\
\hline
{\em sndlen} & \hyperlink{protocolthe-p}{the} data length in sndbuf.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implemented in \hyperlink{classCliNode_a5d822430c10e88bbb74f4bc208673237}{CliNode}, \hyperlink{classMld6igmpNode_a23a5b96b68ccf5edf75b8f75b1d2d8c4}{Mld6igmpNode}, \hyperlink{classXrlMfeaNode_a393256ec54016497c5bf30f1103ebe4a}{XrlMfeaNode}, \hyperlink{classMld6igmpNode_a23a5b96b68ccf5edf75b8f75b1d2d8c4}{Mld6igmpNode}, and \hyperlink{classPimNode_a8fe5dc526fecb74153c087316e5e3e67}{PimNode}.

\hypertarget{classProtoNode_a4da33b605363d14dd5d5ccc1f0287f87}{
\index{ProtoNode@{ProtoNode}!start\_\-config@{start\_\-config}}
\index{start\_\-config@{start\_\-config}!ProtoNode@{ProtoNode}}
\subsubsection[{start\_\-config}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ int {\bf ProtoNode}$<$ V $>$::start\_\-config (
\begin{DoxyParamCaption}
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a4da33b605363d14dd5d5ccc1f0287f87}


Start a set of configuration changes. 

Note that it may change \hyperlink{protocolthe-p}{the} node status.


\begin{DoxyParams}{Parameters}
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classProtoNode_ab9dc1fe5bc40cae2e5c869a063b7c74e}{
\index{ProtoNode@{ProtoNode}!vif\_\-find\_\-by\_\-addr@{vif\_\-find\_\-by\_\-addr}}
\index{vif\_\-find\_\-by\_\-addr@{vif\_\-find\_\-by\_\-addr}!ProtoNode@{ProtoNode}}
\subsubsection[{vif\_\-find\_\-by\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ V $\ast$ {\bf ProtoNode}$<$ V $>$::vif\_\-find\_\-by\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{ipaddr\_\-test}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_ab9dc1fe5bc40cae2e5c869a063b7c74e}


Find a virtual interface for a given address. 

Note that \hyperlink{protocolthe-p}{the} PIM Register virtual interfaces are excluded, because they are special, and because they may share \hyperlink{protocolthe-p}{the} same address as some of \hyperlink{protocolthe-p}{the} other virtual interfaces.


\begin{DoxyParams}{Parameters}
{\em ipaddr\_\-test} & \hyperlink{protocolthe-p}{the} address to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} virtual interface with address ipaddr\_\-test if found, otherwise NULL. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a2012bc3fe2b67f520bd9758ae5abd584}{
\index{ProtoNode@{ProtoNode}!vif\_\-find\_\-by\_\-name@{vif\_\-find\_\-by\_\-name}}
\index{vif\_\-find\_\-by\_\-name@{vif\_\-find\_\-by\_\-name}!ProtoNode@{ProtoNode}}
\subsubsection[{vif\_\-find\_\-by\_\-name}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ V $\ast$ {\bf ProtoNode}$<$ V $>$::vif\_\-find\_\-by\_\-name (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a2012bc3fe2b67f520bd9758ae5abd584}


Find a virtual interface for a given name. 


\begin{DoxyParams}{Parameters}
{\em name} & \hyperlink{protocolthe-p}{the} name to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} virtual interface with name name if found, otherwise NULL. 
\end{DoxyReturn}
\hypertarget{classProtoNode_af9447f77db794f8bc5343826a3f0bb1e}{
\index{ProtoNode@{ProtoNode}!vif\_\-find\_\-by\_\-pif\_\-index@{vif\_\-find\_\-by\_\-pif\_\-index}}
\index{vif\_\-find\_\-by\_\-pif\_\-index@{vif\_\-find\_\-by\_\-pif\_\-index}!ProtoNode@{ProtoNode}}
\subsubsection[{vif\_\-find\_\-by\_\-pif\_\-index}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ V $\ast$ {\bf ProtoNode}$<$ V $>$::vif\_\-find\_\-by\_\-pif\_\-index (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{pif\_\-index}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_af9447f77db794f8bc5343826a3f0bb1e}


Find a virtual interface for a given physical interface index. 


\begin{DoxyParams}{Parameters}
{\em pif\_\-index} & \hyperlink{protocolthe-p}{the} physical interface index to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} virtual interface with physical interface index pif\_\-index if found, otherwise NULL. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a7c544ff0660dd984f7d453a50353708f}{
\index{ProtoNode@{ProtoNode}!vif\_\-find\_\-by\_\-vif\_\-index@{vif\_\-find\_\-by\_\-vif\_\-index}}
\index{vif\_\-find\_\-by\_\-vif\_\-index@{vif\_\-find\_\-by\_\-vif\_\-index}!ProtoNode@{ProtoNode}}
\subsubsection[{vif\_\-find\_\-by\_\-vif\_\-index}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ V $\ast$ {\bf ProtoNode}$<$ V $>$::vif\_\-find\_\-by\_\-vif\_\-index (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{vif\_\-index}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a7c544ff0660dd984f7d453a50353708f}


Find a virtual interface for a given virtual interface index. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-index} & \hyperlink{protocolthe-p}{the} virtual interface index to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} vvirtual interface with virtual interface index vif\_\-index if found, otherwise NULL. 
\end{DoxyReturn}
\hypertarget{classProtoNode_a4098d85ab0886640121e8c4ca472fb86}{
\index{ProtoNode@{ProtoNode}!vif\_\-find\_\-same\_\-subnet\_\-or\_\-p2p@{vif\_\-find\_\-same\_\-subnet\_\-or\_\-p2p}}
\index{vif\_\-find\_\-same\_\-subnet\_\-or\_\-p2p@{vif\_\-find\_\-same\_\-subnet\_\-or\_\-p2p}!ProtoNode@{ProtoNode}}
\subsubsection[{vif\_\-find\_\-same\_\-subnet\_\-or\_\-p2p}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ V $\ast$ {\bf ProtoNode}$<$ V $>$::vif\_\-find\_\-same\_\-subnet\_\-or\_\-p2p (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{ipaddr\_\-test}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_a4098d85ab0886640121e8c4ca472fb86}


Find a virtual interface that belongs to \hyperlink{protocolthe-p}{the} same subnet or point-\/to-\/point link as a given address. 

Note that \hyperlink{protocolthe-p}{the} PIM Register virtual interfaces are excluded, because they are special, and because they may share \hyperlink{protocolthe-p}{the} same address as some of \hyperlink{protocolthe-p}{the} other virtual interfaces.


\begin{DoxyParams}{Parameters}
{\em ipaddr\_\-test} & \hyperlink{protocolthe-p}{the} address to search by. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} virtual interface that belongs to \hyperlink{protocolthe-p}{the} same subnet or point-\/to-\/point link as address ipaddr\_\-test if found, otherwise NULL. 
\end{DoxyReturn}
\hypertarget{classProtoNode_aa43d3272199337b61d1612b8aab6513a}{
\index{ProtoNode@{ProtoNode}!vif\_\-name2vif\_\-index@{vif\_\-name2vif\_\-index}}
\index{vif\_\-name2vif\_\-index@{vif\_\-name2vif\_\-index}!ProtoNode@{ProtoNode}}
\subsubsection[{vif\_\-name2vif\_\-index}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class V $>$ uint32\_\-t {\bf ProtoNode}$<$ V $>$::vif\_\-name2vif\_\-index (
\begin{DoxyParamCaption}
\item[{const string \&}]{vif\_\-name}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classProtoNode_aa43d3272199337b61d1612b8aab6513a}


Map a vif name to a vif index. 


\begin{DoxyParams}{Parameters}
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif name to map to a vif index. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} virtual interface index for vif name vif\_\-name. 
\end{DoxyReturn}


The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libproto/proto\_\-node.hh\end{DoxyCompactItemize}
