\hypertarget{classIoIp}{
\section{IoIp Class Reference}
\label{classIoIp}\index{IoIp@{IoIp}}
}


A base class for I/O IP raw communication.  




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

Inheritance diagram for IoIp:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classIoIp}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classIoIp_a8b679f9ca5ea671ee96cbf8fab6f6bda}{IoIp} (\hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} \&fea\_\-data\_\-plane\_\-manager, const \hyperlink{classIfTree}{IfTree} \&iftree, int family, uint8\_\-t ip\_\-protocol)
\begin{DoxyCompactList}\small\item\em Constructor for a given address family and protocol. \item\end{DoxyCompactList}\item 
\hypertarget{classIoIp_ac4afc31e0f4d7b4933fc6b1f24d3a8c9}{
virtual \hyperlink{classIoIp_ac4afc31e0f4d7b4933fc6b1f24d3a8c9}{$\sim$IoIp} ()}
\label{classIoIp_ac4afc31e0f4d7b4933fc6b1f24d3a8c9}

\begin{DoxyCompactList}\small\item\em Virtual destructor. \item\end{DoxyCompactList}\item 
\hyperlink{classIoIpManager}{IoIpManager} \& \hyperlink{classIoIp_a1e06ac02a295a4a8d855f87a343f9528}{io\_\-ip\_\-manager} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classIoIpManager}{IoIpManager} instance. \item\end{DoxyCompactList}\item 
\hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} \& \hyperlink{classIoIp_a81c355ded7b0bd9e56c44eb647324337}{fea\_\-data\_\-plane\_\-manager} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} instance. \item\end{DoxyCompactList}\item 
virtual bool \hyperlink{classIoIp_a82018b75c9ae27afe20ec58b2237b69f}{is\_\-running} () const 
\begin{DoxyCompactList}\small\item\em Test whether this instance is running. \item\end{DoxyCompactList}\item 
\hyperlink{classEventLoop}{EventLoop} \& \hyperlink{classIoIp_a4224e91962c90f72a98e9ab200601bda}{eventloop} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} event loop. \item\end{DoxyCompactList}\item 
const \hyperlink{classIfTree}{IfTree} \& \hyperlink{classIoIp_abc6e6dbe6a6e07ef83c7925bc0f3ce39}{iftree} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} interface tree. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a9a445e44b4e9ed4ffa85c370d98f7e88}{family} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} address family. \item\end{DoxyCompactList}\item 
virtual uint8\_\-t \hyperlink{classIoIp_afd86d737fb38628e0f1b0e541d4d131d}{ip\_\-protocol} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} IP protocol number. \item\end{DoxyCompactList}\item 
\hyperlink{classIoIpReceiver}{IoIpReceiver} $\ast$ \hyperlink{classIoIp_aec1cc730714621eeab2d6626553a9df6}{io\_\-ip\_\-receiver} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} registered receiver. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classIoIp_a894063280bbacf51b9a7386d63495b34}{register\_\-io\_\-ip\_\-receiver} (\hyperlink{classIoIpReceiver}{IoIpReceiver} $\ast$io\_\-ip\_\-receiver)
\begin{DoxyCompactList}\small\item\em Register \hyperlink{protocolthe-p}{the} I/O IP raw packets receiver. \item\end{DoxyCompactList}\item 
\hypertarget{classIoIp_a820ac9d28acad1218a648505a267f0d5}{
virtual void \hyperlink{classIoIp_a820ac9d28acad1218a648505a267f0d5}{unregister\_\-io\_\-ip\_\-receiver} ()}
\label{classIoIp_a820ac9d28acad1218a648505a267f0d5}

\begin{DoxyCompactList}\small\item\em Unregister \hyperlink{protocolthe-p}{the} I/O IP raw packets receiver. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a62b9862050aca745cc7da7b2eb18400a}{start} (string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Start operation. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a44e244066d12564df8449cde234a5ef1}{stop} (string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Stop operation. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a9615f67c69c07d97453b3efe7392bc7e}{set\_\-multicast\_\-ttl} (int ttl, string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} default TTL (or hop-\/limit in \hyperlink{classIPv6}{IPv6}) for \hyperlink{protocolthe-p}{the} outgoing multicast packets. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_af5b13a9b0424555a615021ecc8955f1e}{enable\_\-multicast\_\-loopback} (bool is\_\-enabled, string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Enable/disable multicast loopback when transmitting multicast packets. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a1e2751f4f32a1b51ebe63331c968ee51}{set\_\-default\_\-multicast\_\-interface} (const string \&if\_\-name, const string \&vif\_\-name, string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Set default interface for transmitting multicast packets. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a91c6bbb67097f3f40cbf3c3c6ff80dcc}{join\_\-multicast\_\-group} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&group, string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Join a multicast group on an interface. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a22d7f9077a618fbdeb689146dad3a741}{leave\_\-multicast\_\-group} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&group, string \&error\_\-msg)=0
\begin{DoxyCompactList}\small\item\em Leave a multicast group on an interface. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classIoIp_a553edc941a439bbc824ae8404e1ea8d3}{send\_\-packet} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&src\_\-address, const \hyperlink{classIPvX}{IPvX} \&dst\_\-address, 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)=0
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} a raw IP packet. \item\end{DoxyCompactList}\item 
virtual \hyperlink{classXorpFd}{XorpFd} $\ast$ \hyperlink{classIoIp_a8efca10514cd213b44539b5a8397a404}{mcast\_\-protocol\_\-fd\_\-in} ()=0
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} file descriptor for receiving protocol messages. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classIoIp_aef306768e5ff0e8e500897b54b278a3c}{recv\_\-packet} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classIPvX}{IPvX} \&src\_\-address, const \hyperlink{classIPvX}{IPvX} \&dst\_\-address, 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)
\begin{DoxyCompactList}\small\item\em Received a raw IP packet. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classIoIp_a797cd56f8c5554fef32a7c094d19f15b}{recv\_\-system\_\-multicast\_\-upcall} (const vector$<$ uint8\_\-t $>$ \&payload)
\begin{DoxyCompactList}\small\item\em Received a multicast forwarding related upcall from \hyperlink{protocolthe-p}{the} system. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIoIp_a522876ded9a6bc1e00b2a85b75abac96}{
bool {\bfseries \_\-is\_\-running}}
\label{classIoIp_a522876ded9a6bc1e00b2a85b75abac96}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIoIp_a734a30cba9aa7d30f82c834573ad2323}{
\hyperlink{classIoIpManager}{IoIpManager} \& {\bfseries \_\-io\_\-ip\_\-manager}}
\label{classIoIp_a734a30cba9aa7d30f82c834573ad2323}

\item 
\hypertarget{classIoIp_afa5bec358dbc0d44c0507685f494a4f1}{
\hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} \& {\bfseries \_\-fea\_\-data\_\-plane\_\-manager}}
\label{classIoIp_afa5bec358dbc0d44c0507685f494a4f1}

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

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

\item 
\hypertarget{classIoIp_a92783f36cfa6805c4f6118b8e7109284}{
int {\bfseries \_\-family}}
\label{classIoIp_a92783f36cfa6805c4f6118b8e7109284}

\item 
\hypertarget{classIoIp_a35145f233944b1f97cd736aadcbb34a8}{
uint8\_\-t {\bfseries \_\-ip\_\-protocol}}
\label{classIoIp_a35145f233944b1f97cd736aadcbb34a8}

\item 
\hypertarget{classIoIp_a0896593f583d842113d05bdc5e448782}{
\hyperlink{classIoIpReceiver}{IoIpReceiver} $\ast$ {\bfseries \_\-io\_\-ip\_\-receiver}}
\label{classIoIp_a0896593f583d842113d05bdc5e448782}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A base class for I/O IP raw communication. Each protocol 'registers' for I/O and gets assigned one object of this class. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classIoIp_a8b679f9ca5ea671ee96cbf8fab6f6bda}{
\index{IoIp@{IoIp}!IoIp@{IoIp}}
\index{IoIp@{IoIp}!IoIp@{IoIp}}
\subsubsection[{IoIp}]{\setlength{\rightskip}{0pt plus 5cm}IoIp::IoIp (
\begin{DoxyParamCaption}
\item[{{\bf FeaDataPlaneManager} \&}]{fea\_\-data\_\-plane\_\-manager, }
\item[{const {\bf IfTree} \&}]{iftree, }
\item[{int}]{family, }
\item[{uint8\_\-t}]{ip\_\-protocol}
\end{DoxyParamCaption}
)}}
\label{classIoIp_a8b679f9ca5ea671ee96cbf8fab6f6bda}


Constructor for a given address family and protocol. 


\begin{DoxyParams}{Parameters}
{\em fea\_\-data\_\-plane\_\-manager} & \hyperlink{protocolthe-p}{the} corresponding data plane manager (\hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager}). \\
\hline
{\em iftree} & \hyperlink{protocolthe-p}{the} interface tree to use. \\
\hline
{\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 (IPPROTO\_\-$\ast$). \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classIoIp_af5b13a9b0424555a615021ecc8955f1e}{
\index{IoIp@{IoIp}!enable\_\-multicast\_\-loopback@{enable\_\-multicast\_\-loopback}}
\index{enable\_\-multicast\_\-loopback@{enable\_\-multicast\_\-loopback}!IoIp@{IoIp}}
\subsubsection[{enable\_\-multicast\_\-loopback}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::enable\_\-multicast\_\-loopback (
\begin{DoxyParamCaption}
\item[{bool}]{is\_\-enabled, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_af5b13a9b0424555a615021ecc8955f1e}


Enable/disable multicast loopback when transmitting multicast packets. 

If \hyperlink{protocolthe-p}{the} multicast loopback is enabled, a transmitted multicast packet will be delivered back to this host (assuming \hyperlink{protocolthe-p}{the} host is a member of \hyperlink{protocolthe-p}{the} same multicast group).


\begin{DoxyParams}{Parameters}
{\em is\_\-enabled} & if true, enable \hyperlink{protocolthe-p}{the} loopback, otherwise disable it. \\
\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{classIoIpDummy_a66da8890e363b90abd4e9b34adebaf2f}{IoIpDummy}, and \hyperlink{classIoIpSocket_aef19264ce87ab1f44e2386f4d90e22c9}{IoIpSocket}.

\hypertarget{classIoIp_a4224e91962c90f72a98e9ab200601bda}{
\index{IoIp@{IoIp}!eventloop@{eventloop}}
\index{eventloop@{eventloop}!IoIp@{IoIp}}
\subsubsection[{eventloop}]{\setlength{\rightskip}{0pt plus 5cm}{\bf EventLoop}\& IoIp::eventloop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIoIp_a4224e91962c90f72a98e9ab200601bda}


Get \hyperlink{protocolthe-p}{the} event loop. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} event loop. 
\end{DoxyReturn}
\hypertarget{classIoIp_a9a445e44b4e9ed4ffa85c370d98f7e88}{
\index{IoIp@{IoIp}!family@{family}}
\index{family@{family}!IoIp@{IoIp}}
\subsubsection[{family}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::family (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classIoIp_a9a445e44b4e9ed4ffa85c370d98f7e88}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} address family. 
\end{DoxyReturn}
\hypertarget{classIoIp_a81c355ded7b0bd9e56c44eb647324337}{
\index{IoIp@{IoIp}!fea\_\-data\_\-plane\_\-manager@{fea\_\-data\_\-plane\_\-manager}}
\index{fea\_\-data\_\-plane\_\-manager@{fea\_\-data\_\-plane\_\-manager}!IoIp@{IoIp}}
\subsubsection[{fea\_\-data\_\-plane\_\-manager}]{\setlength{\rightskip}{0pt plus 5cm}{\bf FeaDataPlaneManager}\& IoIp::fea\_\-data\_\-plane\_\-manager (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIoIp_a81c355ded7b0bd9e56c44eb647324337}


Get \hyperlink{protocolthe-p}{the} \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} instance. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classFeaDataPlaneManager}{FeaDataPlaneManager} instance. 
\end{DoxyReturn}
\hypertarget{classIoIp_abc6e6dbe6a6e07ef83c7925bc0f3ce39}{
\index{IoIp@{IoIp}!iftree@{iftree}}
\index{iftree@{iftree}!IoIp@{IoIp}}
\subsubsection[{iftree}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf IfTree}\& IoIp::iftree (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIoIp_abc6e6dbe6a6e07ef83c7925bc0f3ce39}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} interface tree. 
\end{DoxyReturn}
\hypertarget{classIoIp_a1e06ac02a295a4a8d855f87a343f9528}{
\index{IoIp@{IoIp}!io\_\-ip\_\-manager@{io\_\-ip\_\-manager}}
\index{io\_\-ip\_\-manager@{io\_\-ip\_\-manager}!IoIp@{IoIp}}
\subsubsection[{io\_\-ip\_\-manager}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IoIpManager}\& IoIp::io\_\-ip\_\-manager (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIoIp_a1e06ac02a295a4a8d855f87a343f9528}


Get \hyperlink{protocolthe-p}{the} \hyperlink{classIoIpManager}{IoIpManager} instance. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classIoIpManager}{IoIpManager} instance. 
\end{DoxyReturn}
\hypertarget{classIoIp_aec1cc730714621eeab2d6626553a9df6}{
\index{IoIp@{IoIp}!io\_\-ip\_\-receiver@{io\_\-ip\_\-receiver}}
\index{io\_\-ip\_\-receiver@{io\_\-ip\_\-receiver}!IoIp@{IoIp}}
\subsubsection[{io\_\-ip\_\-receiver}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IoIpReceiver}$\ast$ IoIp::io\_\-ip\_\-receiver (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIoIp_aec1cc730714621eeab2d6626553a9df6}


Get \hyperlink{protocolthe-p}{the} registered receiver. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} registered receiver. 
\end{DoxyReturn}
\hypertarget{classIoIp_afd86d737fb38628e0f1b0e541d4d131d}{
\index{IoIp@{IoIp}!ip\_\-protocol@{ip\_\-protocol}}
\index{ip\_\-protocol@{ip\_\-protocol}!IoIp@{IoIp}}
\subsubsection[{ip\_\-protocol}]{\setlength{\rightskip}{0pt plus 5cm}virtual uint8\_\-t IoIp::ip\_\-protocol (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classIoIp_afd86d737fb38628e0f1b0e541d4d131d}


Get \hyperlink{protocolthe-p}{the} IP protocol number. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} IP protocol number. 
\end{DoxyReturn}
\hypertarget{classIoIp_a82018b75c9ae27afe20ec58b2237b69f}{
\index{IoIp@{IoIp}!is\_\-running@{is\_\-running}}
\index{is\_\-running@{is\_\-running}!IoIp@{IoIp}}
\subsubsection[{is\_\-running}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool IoIp::is\_\-running (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classIoIp_a82018b75c9ae27afe20ec58b2237b69f}


Test whether this instance is running. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} instance is running, otherwise false. 
\end{DoxyReturn}
\hypertarget{classIoIp_a91c6bbb67097f3f40cbf3c3c6ff80dcc}{
\index{IoIp@{IoIp}!join\_\-multicast\_\-group@{join\_\-multicast\_\-group}}
\index{join\_\-multicast\_\-group@{join\_\-multicast\_\-group}!IoIp@{IoIp}}
\subsubsection[{join\_\-multicast\_\-group}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::join\_\-multicast\_\-group (
\begin{DoxyParamCaption}
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPvX} \&}]{group, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a91c6bbb67097f3f40cbf3c3c6ff80dcc}


Join a multicast group on an interface. 


\begin{DoxyParams}{Parameters}
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} interface to join \hyperlink{protocolthe-p}{the} multicast group. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif to join \hyperlink{protocolthe-p}{the} multicast group. \\
\hline
{\em group} & \hyperlink{protocolthe-p}{the} multicast group 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}


Implemented in \hyperlink{classIoIpDummy_ae2206847a823a97e4ed71ad8ac58fc8c}{IoIpDummy}, and \hyperlink{classIoIpSocket_ab4d391cf9771e31ea3c9d25657f0174f}{IoIpSocket}.

\hypertarget{classIoIp_a22d7f9077a618fbdeb689146dad3a741}{
\index{IoIp@{IoIp}!leave\_\-multicast\_\-group@{leave\_\-multicast\_\-group}}
\index{leave\_\-multicast\_\-group@{leave\_\-multicast\_\-group}!IoIp@{IoIp}}
\subsubsection[{leave\_\-multicast\_\-group}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::leave\_\-multicast\_\-group (
\begin{DoxyParamCaption}
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf IPvX} \&}]{group, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a22d7f9077a618fbdeb689146dad3a741}


Leave a multicast group on an interface. 


\begin{DoxyParams}{Parameters}
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} interface to leave \hyperlink{protocolthe-p}{the} multicast group. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif to leave \hyperlink{protocolthe-p}{the} multicast group. \\
\hline
{\em group} & \hyperlink{protocolthe-p}{the} multicast group 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}


Implemented in \hyperlink{classIoIpDummy_a38498634e0c3d61b62878d9525867542}{IoIpDummy}, and \hyperlink{classIoIpSocket_a3dc58c2cd1360f7980d2c991f17ba45a}{IoIpSocket}.

\hypertarget{classIoIp_a8efca10514cd213b44539b5a8397a404}{
\index{IoIp@{IoIp}!mcast\_\-protocol\_\-fd\_\-in@{mcast\_\-protocol\_\-fd\_\-in}}
\index{mcast\_\-protocol\_\-fd\_\-in@{mcast\_\-protocol\_\-fd\_\-in}!IoIp@{IoIp}}
\subsubsection[{mcast\_\-protocol\_\-fd\_\-in}]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf XorpFd}$\ast$ IoIp::mcast\_\-protocol\_\-fd\_\-in (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a8efca10514cd213b44539b5a8397a404}


Get \hyperlink{protocolthe-p}{the} file descriptor for receiving protocol messages. 

\begin{DoxyReturn}{Returns}
a pointer to \hyperlink{protocolthe-p}{the} file descriptor for receiving protocol messages, or NULL if it cannot be found. 
\end{DoxyReturn}


Implemented in \hyperlink{classIoIpDummy_a01da99723d16bc9507d19e2a811380a4}{IoIpDummy}, and \hyperlink{classIoIpSocket_a6948bab69c8432699cb01faa21d9f85e}{IoIpSocket}.

\hypertarget{classIoIp_aef306768e5ff0e8e500897b54b278a3c}{
\index{IoIp@{IoIp}!recv\_\-packet@{recv\_\-packet}}
\index{recv\_\-packet@{recv\_\-packet}!IoIp@{IoIp}}
\subsubsection[{recv\_\-packet}]{\setlength{\rightskip}{0pt plus 5cm}void IoIp::recv\_\-packet (
\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[{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}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, virtual\mbox{]}}}}
\label{classIoIp_aef306768e5ff0e8e500897b54b278a3c}


Received a raw IP packet. 


\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\_\-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} & 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 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 packet} & \hyperlink{protocolthe-p}{the} payload, everything after \hyperlink{protocolthe-p}{the} IP header and options. \\
\hline
\end{DoxyParams}
\hypertarget{classIoIp_a797cd56f8c5554fef32a7c094d19f15b}{
\index{IoIp@{IoIp}!recv\_\-system\_\-multicast\_\-upcall@{recv\_\-system\_\-multicast\_\-upcall}}
\index{recv\_\-system\_\-multicast\_\-upcall@{recv\_\-system\_\-multicast\_\-upcall}!IoIp@{IoIp}}
\subsubsection[{recv\_\-system\_\-multicast\_\-upcall}]{\setlength{\rightskip}{0pt plus 5cm}void IoIp::recv\_\-system\_\-multicast\_\-upcall (
\begin{DoxyParamCaption}
\item[{const vector$<$ uint8\_\-t $>$ \&}]{payload}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, virtual\mbox{]}}}}
\label{classIoIp_a797cd56f8c5554fef32a7c094d19f15b}


Received a multicast forwarding related upcall from \hyperlink{protocolthe-p}{the} system. 

Examples of such upcalls are: \char`\"{}nocache\char`\"{}, \char`\"{}wrongiif\char`\"{}, \char`\"{}wholepkt\char`\"{}, \char`\"{}bw\_\-upcall\char`\"{}.


\begin{DoxyParams}{Parameters}
{\em payload} & \hyperlink{protocolthe-p}{the} payload data for \hyperlink{protocolthe-p}{the} upcall. \\
\hline
\end{DoxyParams}
\hypertarget{classIoIp_a894063280bbacf51b9a7386d63495b34}{
\index{IoIp@{IoIp}!register\_\-io\_\-ip\_\-receiver@{register\_\-io\_\-ip\_\-receiver}}
\index{register\_\-io\_\-ip\_\-receiver@{register\_\-io\_\-ip\_\-receiver}!IoIp@{IoIp}}
\subsubsection[{register\_\-io\_\-ip\_\-receiver}]{\setlength{\rightskip}{0pt plus 5cm}void IoIp::register\_\-io\_\-ip\_\-receiver (
\begin{DoxyParamCaption}
\item[{{\bf IoIpReceiver} $\ast$}]{io\_\-ip\_\-receiver}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classIoIp_a894063280bbacf51b9a7386d63495b34}


Register \hyperlink{protocolthe-p}{the} I/O IP raw packets receiver. 


\begin{DoxyParams}{Parameters}
{\em io\_\-ip\_\-receiver} & \hyperlink{protocolthe-p}{the} receiver to register. \\
\hline
\end{DoxyParams}
\hypertarget{classIoIp_a553edc941a439bbc824ae8404e1ea8d3}{
\index{IoIp@{IoIp}!send\_\-packet@{send\_\-packet}}
\index{send\_\-packet@{send\_\-packet}!IoIp@{IoIp}}
\subsubsection[{send\_\-packet}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::send\_\-packet (
\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[{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}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a553edc941a439bbc824ae8404e1ea8d3}


\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\_\-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} or 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}


Implemented in \hyperlink{classIoIpDummy_a97f2066e7e8149341f2436ee72abf753}{IoIpDummy}, and \hyperlink{classIoIpSocket_a9c120d282dafba95b0ff9de59cb1f9ef}{IoIpSocket}.

\hypertarget{classIoIp_a1e2751f4f32a1b51ebe63331c968ee51}{
\index{IoIp@{IoIp}!set\_\-default\_\-multicast\_\-interface@{set\_\-default\_\-multicast\_\-interface}}
\index{set\_\-default\_\-multicast\_\-interface@{set\_\-default\_\-multicast\_\-interface}!IoIp@{IoIp}}
\subsubsection[{set\_\-default\_\-multicast\_\-interface}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::set\_\-default\_\-multicast\_\-interface (
\begin{DoxyParamCaption}
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a1e2751f4f32a1b51ebe63331c968ee51}


Set default interface for transmitting multicast packets. 


\begin{DoxyParams}{Parameters}
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} interface that would become \hyperlink{protocolthe-p}{the} default multicast interface. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif that would become \hyperlink{protocolthe-p}{the} default multicast interface. \\
\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{classIoIpDummy_a40c2d153472f3b76714d5864baeac494}{IoIpDummy}, and \hyperlink{classIoIpSocket_a73366298efc49aea5d9da273753df980}{IoIpSocket}.

\hypertarget{classIoIp_a9615f67c69c07d97453b3efe7392bc7e}{
\index{IoIp@{IoIp}!set\_\-multicast\_\-ttl@{set\_\-multicast\_\-ttl}}
\index{set\_\-multicast\_\-ttl@{set\_\-multicast\_\-ttl}!IoIp@{IoIp}}
\subsubsection[{set\_\-multicast\_\-ttl}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::set\_\-multicast\_\-ttl (
\begin{DoxyParamCaption}
\item[{int}]{ttl, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a9615f67c69c07d97453b3efe7392bc7e}


Set \hyperlink{protocolthe-p}{the} default TTL (or hop-\/limit in \hyperlink{classIPv6}{IPv6}) for \hyperlink{protocolthe-p}{the} outgoing multicast packets. 


\begin{DoxyParams}{Parameters}
{\em ttl} & \hyperlink{protocolthe-p}{the} desired IP TTL (a.k.a. hop-\/limit in \hyperlink{classIPv6}{IPv6}) value. \\
\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{classIoIpDummy_ad3b0fa75f8150e8d12cc101c3adfd95b}{IoIpDummy}, and \hyperlink{classIoIpSocket_a72c7a64ff65b7056efb566487eee8e20}{IoIpSocket}.

\hypertarget{classIoIp_a62b9862050aca745cc7da7b2eb18400a}{
\index{IoIp@{IoIp}!start@{start}}
\index{start@{start}!IoIp@{IoIp}}
\subsubsection[{start}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::start (
\begin{DoxyParamCaption}
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a62b9862050aca745cc7da7b2eb18400a}


Start operation. 


\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}


Implemented in \hyperlink{classIoIpDummy_a25511be5425c4eab7de68e11d2346144}{IoIpDummy}, and \hyperlink{classIoIpSocket_af3813acbd62730eb63871aa3a47b68ff}{IoIpSocket}.

\hypertarget{classIoIp_a44e244066d12564df8449cde234a5ef1}{
\index{IoIp@{IoIp}!stop@{stop}}
\index{stop@{stop}!IoIp@{IoIp}}
\subsubsection[{stop}]{\setlength{\rightskip}{0pt plus 5cm}virtual int IoIp::stop (
\begin{DoxyParamCaption}
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classIoIp_a44e244066d12564df8449cde234a5ef1}


Stop operation. 


\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}


Implemented in \hyperlink{classIoIpDummy_a4be974246d92d02a5cb7ddcde647b187}{IoIpDummy}, and \hyperlink{classIoIpSocket_aaeac72103b1b88e63ae78d3dd344d39a}{IoIpSocket}.



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