\hypertarget{classIoIpManager}{
\section{IoIpManager Class Reference}
\label{classIoIpManager}\index{IoIpManager@{IoIpManager}}
}


A class that manages raw IP I/O.  




{\ttfamily \#include $<$io\_\-ip\_\-manager.hh$>$}

Inheritance diagram for IoIpManager:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classIoIpManager}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIoIpManager_a779fefcb870627a411d597df685f33d2}{
typedef XorpCallback2$<$ int, const uint8\_\-t $\ast$, size\_\-t $>$::RefPtr {\bfseries UpcallReceiverCb}}
\label{classIoIpManager_a779fefcb870627a411d597df685f33d2}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIoIpManager_a28130ae1bebed4c558860334005652b3}{
\hyperlink{classIoIpManager_a28130ae1bebed4c558860334005652b3}{IoIpManager} (\hyperlink{classFeaNode}{FeaNode} \&fea\_\-node, const \hyperlink{classIfTree}{IfTree} \&iftree)}
\label{classIoIpManager_a28130ae1bebed4c558860334005652b3}

\begin{DoxyCompactList}\small\item\em Constructor for \hyperlink{classIoIpManager}{IoIpManager}. \item\end{DoxyCompactList}\item 
\hypertarget{classIoIpManager_ae7eb32f88f7367e3e32fc2f445a50522}{
virtual \hyperlink{classIoIpManager_ae7eb32f88f7367e3e32fc2f445a50522}{$\sim$IoIpManager} ()}
\label{classIoIpManager_ae7eb32f88f7367e3e32fc2f445a50522}

\begin{DoxyCompactList}\small\item\em Virtual destructor. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_a5c2ed7e65d8cf38d65e6a0893582eba8}{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 vector$<$ uint8\_\-t $>$ \&ext\_\-headers\_\-type, const vector$<$ vector$<$ uint8\_\-t $>$ $>$ \&ext\_\-headers\_\-payload, const vector$<$ uint8\_\-t $>$ \&payload, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} a raw IP packet. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_a11d261f8b36955c8f1b1d134d32fce0e}{register\_\-receiver} (int family, const string \&receiver\_\-name, const string \&if\_\-name, const string \&vif\_\-name, uint8\_\-t ip\_\-protocol, bool enable\_\-multicast\_\-loopback, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Register to receive IP packets. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_a8e8a07d664c45a3270f53553b4607088}{unregister\_\-receiver} (int family, const string \&receiver\_\-name, const string \&if\_\-name, const string \&vif\_\-name, uint8\_\-t ip\_\-protocol, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Unregister to receive IP packets. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_aefba23ebcdd5865b3ae55aae3f5f12d4}{join\_\-multicast\_\-group} (const string \&receiver\_\-name, const string \&if\_\-name, const string \&vif\_\-name, uint8\_\-t ip\_\-protocol, const \hyperlink{classIPvX}{IPvX} \&group\_\-address, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Join an IP multicast group. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_a324c2a0ff1f3763b2d10cafa703cfcd2}{leave\_\-multicast\_\-group} (const string \&receiver\_\-name, const string \&if\_\-name, const string \&vif\_\-name, uint8\_\-t ip\_\-protocol, const \hyperlink{classIPvX}{IPvX} \&group\_\-address, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Leave an IP multicast group. \item\end{DoxyCompactList}\item 
\hypertarget{classIoIpManager_ac4b62b86cc4f48055c1a2371a5e9fc42}{
int \hyperlink{classIoIpManager_ac4b62b86cc4f48055c1a2371a5e9fc42}{leave\_\-all\_\-multicast\_\-groups} (const string \&if\_\-name, const string \&vif\_\-name, string \&error\_\-msg)}
\label{classIoIpManager_ac4b62b86cc4f48055c1a2371a5e9fc42}

\begin{DoxyCompactList}\small\item\em Leave all multicast groups on this vif. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_ab082cddec061f2fc7853ff3127e19aba}{register\_\-system\_\-multicast\_\-upcall\_\-receiver} (int family, uint8\_\-t ip\_\-protocol, IoIpManager::UpcallReceiverCb receiver\_\-cb, \hyperlink{classXorpFd}{XorpFd} \&mcast\_\-receiver\_\-fd, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Register to receive multicast forwarding related upcalls from \hyperlink{protocolthe-p}{the} system. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_ab858b2cef9caa72bd6a9c20e37b7a219}{unregister\_\-system\_\-multicast\_\-upcall\_\-receiver} (int family, uint8\_\-t ip\_\-protocol, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Unregister to receive multicast forwarding related upcalls from \hyperlink{protocolthe-p}{the} system. \item\end{DoxyCompactList}\item 
void \hyperlink{classIoIpManager_a17922a6e9b5d9897865cd07f4b27889b}{recv\_\-event} (const string \&receiver\_\-name, const struct \hyperlink{structIPvXHeaderInfo}{IPvXHeaderInfo} \&header, const vector$<$ uint8\_\-t $>$ \&payload)
\begin{DoxyCompactList}\small\item\em Data received event. \item\end{DoxyCompactList}\item 
void \hyperlink{classIoIpManager_a5ef29d6d3c49cade649eb128cb5403ec}{instance\_\-birth} (const string \&instance\_\-name)
\begin{DoxyCompactList}\small\item\em Inform \hyperlink{protocolthe-p}{the} watcher that a component instance is alive. \item\end{DoxyCompactList}\item 
void \hyperlink{classIoIpManager_aa95f751c6f3399ff37781edd0afaeaab}{instance\_\-death} (const string \&instance\_\-name)
\begin{DoxyCompactList}\small\item\em Inform \hyperlink{protocolthe-p}{the} watcher that a component instance is dead. \item\end{DoxyCompactList}\item 
\hypertarget{classIoIpManager_a3f29309ab61dfc21d669a0a7fef3b132}{
void \hyperlink{classIoIpManager_a3f29309ab61dfc21d669a0a7fef3b132}{set\_\-io\_\-ip\_\-manager\_\-receiver} (\hyperlink{classIoIpManagerReceiver}{IoIpManagerReceiver} $\ast$v)}
\label{classIoIpManager_a3f29309ab61dfc21d669a0a7fef3b132}

\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} instance that is responsible for sending IP packets to a receiver. \item\end{DoxyCompactList}\item 
const \hyperlink{classIfTree}{IfTree} \& \hyperlink{classIoIpManager_a52f970af64c63df3fac0b0e2275e9303}{iftree} () const 
\begin{DoxyCompactList}\small\item\em Get a reference to \hyperlink{protocolthe-p}{the} interface tree. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_aa840451e04efcca7f626226293f04675}{register\_\-data\_\-plane\_\-manager} (\hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} $\ast$fea\_\-data\_\-plane\_\-manager, bool is\_\-exclusive)
\begin{DoxyCompactList}\small\item\em Register \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} data plane manager. \item\end{DoxyCompactList}\item 
int \hyperlink{classIoIpManager_a576a077981d1d3424801e54c400cd755}{unregister\_\-data\_\-plane\_\-manager} (\hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} $\ast$fea\_\-data\_\-plane\_\-manager)
\begin{DoxyCompactList}\small\item\em Unregister \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} data plane manager. \item\end{DoxyCompactList}\item 
list$<$ \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} $\ast$ $>$ \& \hyperlink{classIoIpManager_a2a2d110ee7e5b4a06de277bf6c9cb49c}{fea\_\-data\_\-plane\_\-managers} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} list of registered data plane managers. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIoIpManager_a4f94411b5e05581c67a69e93cfdc29f8}{
typedef map$<$ uint8\_\-t, \hyperlink{classIoIpComm}{IoIpComm} $\ast$ $>$ {\bfseries CommTable}}
\label{classIoIpManager_a4f94411b5e05581c67a69e93cfdc29f8}

\item 
\hypertarget{classIoIpManager_a2883245955109f02af0bffcadcce327e}{
typedef multimap$<$ string, \hyperlink{classIoIpComm_1_1InputFilter}{IoIpComm::InputFilter} $\ast$ $>$ {\bfseries FilterBag}}
\label{classIoIpManager_a2883245955109f02af0bffcadcce327e}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
CommTable \& \hyperlink{classIoIpManager_ac853cee19da2aad2167a1d43e282a19e}{comm\_\-table\_\-by\_\-family} (int family)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} CommTable for an address family. \item\end{DoxyCompactList}\item 
FilterBag \& \hyperlink{classIoIpManager_a997177a4160573f7140666820a83125c}{filters\_\-by\_\-family} (int family)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} FilterBag for an address family. \item\end{DoxyCompactList}\item 
void \hyperlink{classIoIpManager_a9baf9229f2b7f47326ebd5a1f668f579}{erase\_\-filters\_\-by\_\-receiver\_\-name} (int family, const string \&receiver\_\-name)
\begin{DoxyCompactList}\small\item\em Erase filters for a given receiver name. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIoIpManager_acbc16f745992d301c53167d422d183cd}{has\_\-filter\_\-by\_\-receiver\_\-name} (const string \&receiver\_\-name) const 
\begin{DoxyCompactList}\small\item\em Test whether there is a filter for a given receiver name. \item\end{DoxyCompactList}\item 
void \hyperlink{classIoIpManager_ac26088c0b862e36e12766780bf54c623}{erase\_\-filters} (CommTable \&comm\_\-table, FilterBag \&filters, const FilterBag::iterator \&begin, const FilterBag::iterator \&end)
\begin{DoxyCompactList}\small\item\em Erase filters for a given CommTable and FilterBag. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIoIpManager_a986927c43964372465cf015b80560eb0}{
\hyperlink{classFeaNode}{FeaNode} \& {\bfseries \_\-fea\_\-node}}
\label{classIoIpManager_a986927c43964372465cf015b80560eb0}

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

\item 
\hypertarget{classIoIpManager_a193e4255786fefddf057657460ec5c42}{
const \hyperlink{classIfTree}{IfTree} \& {\bfseries \_\-iftree}}
\label{classIoIpManager_a193e4255786fefddf057657460ec5c42}

\item 
\hypertarget{classIoIpManager_a7ed75efa8b34baa82e626ff9966e7190}{
CommTable {\bfseries \_\-comm\_\-table4}}
\label{classIoIpManager_a7ed75efa8b34baa82e626ff9966e7190}

\item 
\hypertarget{classIoIpManager_ae6510bd24f2f3c400a29bf7b26b9553a}{
CommTable {\bfseries \_\-comm\_\-table6}}
\label{classIoIpManager_ae6510bd24f2f3c400a29bf7b26b9553a}

\item 
\hypertarget{classIoIpManager_ab1ae984421df8894a8f0e6d712c1b200}{
FilterBag {\bfseries \_\-filters4}}
\label{classIoIpManager_ab1ae984421df8894a8f0e6d712c1b200}

\item 
\hypertarget{classIoIpManager_ac6aa73fb2cc2c3f7ec43c37c9862fa70}{
FilterBag {\bfseries \_\-filters6}}
\label{classIoIpManager_ac6aa73fb2cc2c3f7ec43c37c9862fa70}

\item 
\hypertarget{classIoIpManager_afa10730ffcd1a3d365d47057298cee47}{
\hyperlink{classIoIpManagerReceiver}{IoIpManagerReceiver} $\ast$ {\bfseries \_\-io\_\-ip\_\-manager\_\-receiver}}
\label{classIoIpManager_afa10730ffcd1a3d365d47057298cee47}

\item 
\hypertarget{classIoIpManager_afe810a9037a25978a84110b383fd5ccb}{
list$<$ \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} $\ast$ $>$ {\bfseries \_\-fea\_\-data\_\-plane\_\-managers}}
\label{classIoIpManager_afe810a9037a25978a84110b383fd5ccb}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A class that manages raw IP I/O. The \hyperlink{classIoIpManager}{IoIpManager} has two containers: a container for IP protocol handlers (\hyperlink{classIoIpComm}{IoIpComm}) indexed by \hyperlink{protocolthe-p}{the} protocol associated with \hyperlink{protocolthe-p}{the} handler, and a container for \hyperlink{protocolthe-p}{the} filters associated with each receiver\_\-name. When a receiver registers for interest in a particular type of raw packet a handler (\hyperlink{classIoIpComm}{IoIpComm}) is created if necessary, then \hyperlink{protocolthe-p}{the} relevent filter is created and associated with \hyperlink{protocolthe-p}{the} \hyperlink{classIoIpComm}{IoIpComm}. 

\subsection{Member Function Documentation}
\hypertarget{classIoIpManager_ac853cee19da2aad2167a1d43e282a19e}{
\index{IoIpManager@{IoIpManager}!comm\_\-table\_\-by\_\-family@{comm\_\-table\_\-by\_\-family}}
\index{comm\_\-table\_\-by\_\-family@{comm\_\-table\_\-by\_\-family}!IoIpManager@{IoIpManager}}
\subsubsection[{comm\_\-table\_\-by\_\-family}]{\setlength{\rightskip}{0pt plus 5cm}IoIpManager::CommTable \& IoIpManager::comm\_\-table\_\-by\_\-family (
\begin{DoxyParamCaption}
\item[{int}]{family}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classIoIpManager_ac853cee19da2aad2167a1d43e282a19e}


Get \hyperlink{protocolthe-p}{the} CommTable for an address family. 


\begin{DoxyParams}{Parameters}
{\em family} & \hyperlink{protocolthe-p}{the} address family. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a reference to \hyperlink{protocolthe-p}{the} CommTable for \hyperlink{protocolthe-p}{the} address family. 
\end{DoxyReturn}
\hypertarget{classIoIpManager_ac26088c0b862e36e12766780bf54c623}{
\index{IoIpManager@{IoIpManager}!erase\_\-filters@{erase\_\-filters}}
\index{erase\_\-filters@{erase\_\-filters}!IoIpManager@{IoIpManager}}
\subsubsection[{erase\_\-filters}]{\setlength{\rightskip}{0pt plus 5cm}void IoIpManager::erase\_\-filters (
\begin{DoxyParamCaption}
\item[{CommTable \&}]{comm\_\-table, }
\item[{FilterBag \&}]{filters, }
\item[{const FilterBag::iterator \&}]{begin, }
\item[{const FilterBag::iterator \&}]{end}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classIoIpManager_ac26088c0b862e36e12766780bf54c623}


Erase filters for a given CommTable and FilterBag. 


\begin{DoxyParams}{Parameters}
{\em comm\_\-table} & \hyperlink{protocolthe-p}{the} associated CommTable. \\
\hline
{\em filters} & \hyperlink{protocolthe-p}{the} associated FilterBag. \\
\hline
{\em begin} & \hyperlink{protocolthe-p}{the} begin iterator to \hyperlink{protocolthe-p}{the} FilterBag for \hyperlink{protocolthe-p}{the} set of filters to erase. \\
\hline
{\em end} & \hyperlink{protocolthe-p}{the} end iterator to \hyperlink{protocolthe-p}{the} FilterBag for \hyperlink{protocolthe-p}{the} set of filters to erase. \\
\hline
\end{DoxyParams}
\hypertarget{classIoIpManager_a9baf9229f2b7f47326ebd5a1f668f579}{
\index{IoIpManager@{IoIpManager}!erase\_\-filters\_\-by\_\-receiver\_\-name@{erase\_\-filters\_\-by\_\-receiver\_\-name}}
\index{erase\_\-filters\_\-by\_\-receiver\_\-name@{erase\_\-filters\_\-by\_\-receiver\_\-name}!IoIpManager@{IoIpManager}}
\subsubsection[{erase\_\-filters\_\-by\_\-receiver\_\-name}]{\setlength{\rightskip}{0pt plus 5cm}void IoIpManager::erase\_\-filters\_\-by\_\-receiver\_\-name (
\begin{DoxyParamCaption}
\item[{int}]{family, }
\item[{const string \&}]{receiver\_\-name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classIoIpManager_a9baf9229f2b7f47326ebd5a1f668f579}


Erase filters for a given receiver name. 


\begin{DoxyParams}{Parameters}
{\em family} & \hyperlink{protocolthe-p}{the} address family. \\
\hline
{\em receiver\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} receiver. \\
\hline
\end{DoxyParams}
\hypertarget{classIoIpManager_a2a2d110ee7e5b4a06de277bf6c9cb49c}{
\index{IoIpManager@{IoIpManager}!fea\_\-data\_\-plane\_\-managers@{fea\_\-data\_\-plane\_\-managers}}
\index{fea\_\-data\_\-plane\_\-managers@{fea\_\-data\_\-plane\_\-managers}!IoIpManager@{IoIpManager}}
\subsubsection[{fea\_\-data\_\-plane\_\-managers}]{\setlength{\rightskip}{0pt plus 5cm}list$<${\bf FeaDataPlaneManager}$\ast$$>$\& IoIpManager::fea\_\-data\_\-plane\_\-managers (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIoIpManager_a2a2d110ee7e5b4a06de277bf6c9cb49c}


Get \hyperlink{protocolthe-p}{the} list of registered data plane managers. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} list of registered data plane managers. 
\end{DoxyReturn}
\hypertarget{classIoIpManager_a997177a4160573f7140666820a83125c}{
\index{IoIpManager@{IoIpManager}!filters\_\-by\_\-family@{filters\_\-by\_\-family}}
\index{filters\_\-by\_\-family@{filters\_\-by\_\-family}!IoIpManager@{IoIpManager}}
\subsubsection[{filters\_\-by\_\-family}]{\setlength{\rightskip}{0pt plus 5cm}IoIpManager::FilterBag \& IoIpManager::filters\_\-by\_\-family (
\begin{DoxyParamCaption}
\item[{int}]{family}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classIoIpManager_a997177a4160573f7140666820a83125c}


Get \hyperlink{protocolthe-p}{the} FilterBag for an address family. 


\begin{DoxyParams}{Parameters}
{\em family} & \hyperlink{protocolthe-p}{the} address family. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a reference to \hyperlink{protocolthe-p}{the} FilterBag for \hyperlink{protocolthe-p}{the} address family. 
\end{DoxyReturn}
\hypertarget{classIoIpManager_acbc16f745992d301c53167d422d183cd}{
\index{IoIpManager@{IoIpManager}!has\_\-filter\_\-by\_\-receiver\_\-name@{has\_\-filter\_\-by\_\-receiver\_\-name}}
\index{has\_\-filter\_\-by\_\-receiver\_\-name@{has\_\-filter\_\-by\_\-receiver\_\-name}!IoIpManager@{IoIpManager}}
\subsubsection[{has\_\-filter\_\-by\_\-receiver\_\-name}]{\setlength{\rightskip}{0pt plus 5cm}bool IoIpManager::has\_\-filter\_\-by\_\-receiver\_\-name (
\begin{DoxyParamCaption}
\item[{const string \&}]{receiver\_\-name}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classIoIpManager_acbc16f745992d301c53167d422d183cd}


Test whether there is a filter for a given receiver name. 


\begin{DoxyParams}{Parameters}
{\em receiver\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} receiver. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if there is a filter for \hyperlink{protocolthe-p}{the} given receiver name, otherwise false. 
\end{DoxyReturn}
\hypertarget{classIoIpManager_a52f970af64c63df3fac0b0e2275e9303}{
\index{IoIpManager@{IoIpManager}!iftree@{iftree}}
\index{iftree@{iftree}!IoIpManager@{IoIpManager}}
\subsubsection[{iftree}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf IfTree}\& IoIpManager::iftree (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIoIpManager_a52f970af64c63df3fac0b0e2275e9303}


Get a reference to \hyperlink{protocolthe-p}{the} interface tree. 

\begin{DoxyReturn}{Returns}
a reference to \hyperlink{protocolthe-p}{the} interface tree (\hyperlink{classIfTree}{IfTree}). 
\end{DoxyReturn}
\hypertarget{classIoIpManager_a5ef29d6d3c49cade649eb128cb5403ec}{
\index{IoIpManager@{IoIpManager}!instance\_\-birth@{instance\_\-birth}}
\index{instance\_\-birth@{instance\_\-birth}!IoIpManager@{IoIpManager}}
\subsubsection[{instance\_\-birth}]{\setlength{\rightskip}{0pt plus 5cm}void IoIpManager::instance\_\-birth (
\begin{DoxyParamCaption}
\item[{const string \&}]{instance\_\-name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classIoIpManager_a5ef29d6d3c49cade649eb128cb5403ec}


Inform \hyperlink{protocolthe-p}{the} watcher that a component instance is alive. 


\begin{DoxyParams}{Parameters}
{\em instance\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} instance that is alive. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classInstanceWatcher_a3b06e7ebf696bd290eaead8c03a67852}{InstanceWatcher}.

\hypertarget{classIoIpManager_aa95f751c6f3399ff37781edd0afaeaab}{
\index{IoIpManager@{IoIpManager}!instance\_\-death@{instance\_\-death}}
\index{instance\_\-death@{instance\_\-death}!IoIpManager@{IoIpManager}}
\subsubsection[{instance\_\-death}]{\setlength{\rightskip}{0pt plus 5cm}void IoIpManager::instance\_\-death (
\begin{DoxyParamCaption}
\item[{const string \&}]{instance\_\-name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classIoIpManager_aa95f751c6f3399ff37781edd0afaeaab}


Inform \hyperlink{protocolthe-p}{the} watcher that a component instance is dead. 


\begin{DoxyParams}{Parameters}
{\em instance\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} instance that is dead. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classInstanceWatcher_a0c7e95931514afd961ee2123ced8dea1}{InstanceWatcher}.

\hypertarget{classIoIpManager_aefba23ebcdd5865b3ae55aae3f5f12d4}{
\index{IoIpManager@{IoIpManager}!join\_\-multicast\_\-group@{join\_\-multicast\_\-group}}
\index{join\_\-multicast\_\-group@{join\_\-multicast\_\-group}!IoIpManager@{IoIpManager}}
\subsubsection[{join\_\-multicast\_\-group}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::join\_\-multicast\_\-group (
\begin{DoxyParamCaption}
\item[{const string \&}]{receiver\_\-name, }
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{const {\bf IPvX} \&}]{group\_\-address, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_aefba23ebcdd5865b3ae55aae3f5f12d4}


Join an IP multicast group. 


\begin{DoxyParams}{Parameters}
{\em receiver\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} receiver. \\
\hline
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface through which packets should be accepted. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif through which packets should be accepted. \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP protocol number that \hyperlink{protocolthe-p}{the} receiver is interested in. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols. \\
\hline
{\em group\_\-address} & \hyperlink{protocolthe-p}{the} multicast group address to join. \\
\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{classIoIpManager_a324c2a0ff1f3763b2d10cafa703cfcd2}{
\index{IoIpManager@{IoIpManager}!leave\_\-multicast\_\-group@{leave\_\-multicast\_\-group}}
\index{leave\_\-multicast\_\-group@{leave\_\-multicast\_\-group}!IoIpManager@{IoIpManager}}
\subsubsection[{leave\_\-multicast\_\-group}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::leave\_\-multicast\_\-group (
\begin{DoxyParamCaption}
\item[{const string \&}]{receiver\_\-name, }
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{const {\bf IPvX} \&}]{group\_\-address, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_a324c2a0ff1f3763b2d10cafa703cfcd2}


Leave an IP multicast group. 


\begin{DoxyParams}{Parameters}
{\em receiver\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} receiver. \\
\hline
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface through which packets should not be accepted. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif through which packets should not be accepted. \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP protocol number that \hyperlink{protocolthe-p}{the} receiver is not interested in anymore. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols. \\
\hline
{\em group\_\-address} & \hyperlink{protocolthe-p}{the} multicast group address to leave. \\
\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{classIoIpManager_a17922a6e9b5d9897865cd07f4b27889b}{
\index{IoIpManager@{IoIpManager}!recv\_\-event@{recv\_\-event}}
\index{recv\_\-event@{recv\_\-event}!IoIpManager@{IoIpManager}}
\subsubsection[{recv\_\-event}]{\setlength{\rightskip}{0pt plus 5cm}void IoIpManager::recv\_\-event (
\begin{DoxyParamCaption}
\item[{const string \&}]{receiver\_\-name, }
\item[{const struct {\bf IPvXHeaderInfo} \&}]{header, }
\item[{const vector$<$ uint8\_\-t $>$ \&}]{payload}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classIoIpManager_a17922a6e9b5d9897865cd07f4b27889b}


Data received event. 


\begin{DoxyParams}{Parameters}
{\em receiver\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} receiver to send \hyperlink{protocolthe-p}{the} IP packet to. \\
\hline
{\em header} & \hyperlink{protocolthe-p}{the} IP header information. \\
\hline
{\em payload} & \hyperlink{protocolthe-p}{the} payload, everything after \hyperlink{protocolthe-p}{the} IP header and options. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classIoIpManagerReceiver_a3285158be193365ff85156064d7ce15b}{IoIpManagerReceiver}.

\hypertarget{classIoIpManager_aa840451e04efcca7f626226293f04675}{
\index{IoIpManager@{IoIpManager}!register\_\-data\_\-plane\_\-manager@{register\_\-data\_\-plane\_\-manager}}
\index{register\_\-data\_\-plane\_\-manager@{register\_\-data\_\-plane\_\-manager}!IoIpManager@{IoIpManager}}
\subsubsection[{register\_\-data\_\-plane\_\-manager}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::register\_\-data\_\-plane\_\-manager (
\begin{DoxyParamCaption}
\item[{{\bf FeaDataPlaneManager} $\ast$}]{fea\_\-data\_\-plane\_\-manager, }
\item[{bool}]{is\_\-exclusive}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_aa840451e04efcca7f626226293f04675}


Register \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} data plane manager. 


\begin{DoxyParams}{Parameters}
{\em fea\_\-data\_\-plane\_\-manager} & \hyperlink{protocolthe-p}{the} data plane manager to register. \\
\hline
{\em is\_\-exclusive} & if true, \hyperlink{protocolthe-p}{the} manager is registered as \hyperlink{protocolthe-p}{the} exclusive manager, otherwise is added to \hyperlink{protocolthe-p}{the} list of managers. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classIoIpManager_a11d261f8b36955c8f1b1d134d32fce0e}{
\index{IoIpManager@{IoIpManager}!register\_\-receiver@{register\_\-receiver}}
\index{register\_\-receiver@{register\_\-receiver}!IoIpManager@{IoIpManager}}
\subsubsection[{register\_\-receiver}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::register\_\-receiver (
\begin{DoxyParamCaption}
\item[{int}]{family, }
\item[{const string \&}]{receiver\_\-name, }
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{bool}]{enable\_\-multicast\_\-loopback, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_a11d261f8b36955c8f1b1d134d32fce0e}


Register to receive IP packets. 


\begin{DoxyParams}{Parameters}
{\em family} & \hyperlink{protocolthe-p}{the} address family (AF\_\-INET or AF\_\-INET6 for \hyperlink{classIPv4}{IPv4} and \hyperlink{classIPv6}{IPv6} respectively). \\
\hline
{\em receiver\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} receiver. \\
\hline
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface through which packets should be accepted. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif through which packets should be accepted. \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP protocol number that \hyperlink{protocolthe-p}{the} receiver is interested in. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols. \\
\hline
{\em enable\_\-multicast\_\-loopback} & if true then enable delivering of multicast datagrams back to this host (assuming \hyperlink{protocolthe-p}{the} host is a member of \hyperlink{protocolthe-p}{the} same multicast group. \\
\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{classIoIpManager_ab082cddec061f2fc7853ff3127e19aba}{
\index{IoIpManager@{IoIpManager}!register\_\-system\_\-multicast\_\-upcall\_\-receiver@{register\_\-system\_\-multicast\_\-upcall\_\-receiver}}
\index{register\_\-system\_\-multicast\_\-upcall\_\-receiver@{register\_\-system\_\-multicast\_\-upcall\_\-receiver}!IoIpManager@{IoIpManager}}
\subsubsection[{register\_\-system\_\-multicast\_\-upcall\_\-receiver}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::register\_\-system\_\-multicast\_\-upcall\_\-receiver (
\begin{DoxyParamCaption}
\item[{int}]{family, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{IoIpManager::UpcallReceiverCb}]{receiver\_\-cb, }
\item[{{\bf XorpFd} \&}]{mcast\_\-receiver\_\-fd, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_ab082cddec061f2fc7853ff3127e19aba}


Register to receive multicast forwarding related upcalls from \hyperlink{protocolthe-p}{the} system. 


\begin{DoxyParams}{Parameters}
{\em family} & \hyperlink{protocolthe-p}{the} address family (AF\_\-INET or AF\_\-INET6 for \hyperlink{classIPv4}{IPv4} and \hyperlink{classIPv6}{IPv6} respectively). \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP protocol number that \hyperlink{protocolthe-p}{the} receiver is interested in. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols. \\
\hline
{\em receiver\_\-cb} & \hyperlink{protocolthe-p}{the} receiver callback to be invoked when an upcall is received. \\
\hline
{\em receiver\_\-fd} & \hyperlink{protocolthe-p}{the} return-\/by-\/reference file descriptor for \hyperlink{protocolthe-p}{the} socket that receives \hyperlink{protocolthe-p}{the} upcalls. \\
\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{classIoIpManager_a5c2ed7e65d8cf38d65e6a0893582eba8}{
\index{IoIpManager@{IoIpManager}!send@{send}}
\index{send@{send}!IoIpManager@{IoIpManager}}
\subsubsection[{send}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::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 vector$<$ uint8\_\-t $>$ \&}]{ext\_\-headers\_\-type, }
\item[{const vector$<$ vector$<$ uint8\_\-t $>$ $>$ \&}]{ext\_\-headers\_\-payload, }
\item[{const vector$<$ uint8\_\-t $>$ \&}]{payload, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_a5c2ed7e65d8cf38d65e6a0893582eba8}


\hyperlink{structSend}{Send} a raw IP packet. 


\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 (IP traffic class for \hyperlink{classIPv6}{IPv6}). 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 ext\_\-headers\_\-type} & a vector of integers with \hyperlink{protocolthe-p}{the} types of \hyperlink{protocolthe-p}{the} optional \hyperlink{classIPv6}{IPv6} extention headers. \\
\hline
{\em ext\_\-headers\_\-payload} & a vector of payload data, one for each optional \hyperlink{classIPv6}{IPv6} extention header. The number of entries must match ext\_\-headers\_\-type. \\
\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}
\hypertarget{classIoIpManager_a576a077981d1d3424801e54c400cd755}{
\index{IoIpManager@{IoIpManager}!unregister\_\-data\_\-plane\_\-manager@{unregister\_\-data\_\-plane\_\-manager}}
\index{unregister\_\-data\_\-plane\_\-manager@{unregister\_\-data\_\-plane\_\-manager}!IoIpManager@{IoIpManager}}
\subsubsection[{unregister\_\-data\_\-plane\_\-manager}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::unregister\_\-data\_\-plane\_\-manager (
\begin{DoxyParamCaption}
\item[{{\bf FeaDataPlaneManager} $\ast$}]{fea\_\-data\_\-plane\_\-manager}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_a576a077981d1d3424801e54c400cd755}


Unregister \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} data plane manager. 


\begin{DoxyParams}{Parameters}
{\em fea\_\-data\_\-plane\_\-manager} & \hyperlink{protocolthe-p}{the} data plane manager to unregister. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classIoIpManager_a8e8a07d664c45a3270f53553b4607088}{
\index{IoIpManager@{IoIpManager}!unregister\_\-receiver@{unregister\_\-receiver}}
\index{unregister\_\-receiver@{unregister\_\-receiver}!IoIpManager@{IoIpManager}}
\subsubsection[{unregister\_\-receiver}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::unregister\_\-receiver (
\begin{DoxyParamCaption}
\item[{int}]{family, }
\item[{const string \&}]{receiver\_\-name, }
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_a8e8a07d664c45a3270f53553b4607088}


Unregister to receive IP packets. 


\begin{DoxyParams}{Parameters}
{\em family} & \hyperlink{protocolthe-p}{the} address family (AF\_\-INET or AF\_\-INET6 for \hyperlink{classIPv4}{IPv4} and \hyperlink{classIPv6}{IPv6} respectively). \\
\hline
{\em receiver\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} receiver. \\
\hline
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface through which packets should not be accepted. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif through which packets should not be accepted. \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP \hyperlink{classProtocol}{Protocol} number that \hyperlink{protocolthe-p}{the} receiver is not interested in anymore. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols. \\
\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{classIoIpManager_ab858b2cef9caa72bd6a9c20e37b7a219}{
\index{IoIpManager@{IoIpManager}!unregister\_\-system\_\-multicast\_\-upcall\_\-receiver@{unregister\_\-system\_\-multicast\_\-upcall\_\-receiver}}
\index{unregister\_\-system\_\-multicast\_\-upcall\_\-receiver@{unregister\_\-system\_\-multicast\_\-upcall\_\-receiver}!IoIpManager@{IoIpManager}}
\subsubsection[{unregister\_\-system\_\-multicast\_\-upcall\_\-receiver}]{\setlength{\rightskip}{0pt plus 5cm}int IoIpManager::unregister\_\-system\_\-multicast\_\-upcall\_\-receiver (
\begin{DoxyParamCaption}
\item[{int}]{family, }
\item[{uint8\_\-t}]{ip\_\-protocol, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classIoIpManager_ab858b2cef9caa72bd6a9c20e37b7a219}


Unregister to receive multicast forwarding related upcalls from \hyperlink{protocolthe-p}{the} system. 


\begin{DoxyParams}{Parameters}
{\em family} & \hyperlink{protocolthe-p}{the} address family (AF\_\-INET or AF\_\-INET6 for \hyperlink{classIPv4}{IPv4} and \hyperlink{classIPv6}{IPv6} respectively). \\
\hline
{\em ip\_\-protocol} & \hyperlink{protocolthe-p}{the} IP \hyperlink{classProtocol}{Protocol} number that \hyperlink{protocolthe-p}{the} receiver is not interested in anymore. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols. \\
\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}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/fea/io\_\-ip\_\-manager.hh\item 
/home/greearb/git/xorp.ct.github/xorp/fea/io\_\-ip\_\-manager.cc\end{DoxyCompactItemize}
