\hypertarget{classNexthopPortMapper}{
\section{NexthopPortMapper Class Reference}
\label{classNexthopPortMapper}\index{NexthopPortMapper@{NexthopPortMapper}}
}


A class for to keep \hyperlink{protocolthe-p}{the} mapping between next-\/hop information and a port number.  




{\ttfamily \#include $<$nexthop\_\-port\_\-mapper.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classNexthopPortMapper_a30d218b6526ce7ae6b83ff9e97bb838d}{
void \hyperlink{classNexthopPortMapper_a30d218b6526ce7ae6b83ff9e97bb838d}{clear} ()}
\label{classNexthopPortMapper_a30d218b6526ce7ae6b83ff9e97bb838d}

\begin{DoxyCompactList}\small\item\em Clear all mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_ae39547e43d49c87b0c687bf4621c9e5d}{add\_\-observer} (\hyperlink{classNexthopPortMapperObserver}{NexthopPortMapperObserver} $\ast$observer)
\begin{DoxyCompactList}\small\item\em Add an observer for observing changes to \hyperlink{protocolthe-p}{the} mapper. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a14c1050b16fdb670ac64f271f844e8b5}{delete\_\-observer} (\hyperlink{classNexthopPortMapperObserver}{NexthopPortMapperObserver} $\ast$observer)
\begin{DoxyCompactList}\small\item\em Delete an observer for observing changes to \hyperlink{protocolthe-p}{the} mapper. \item\end{DoxyCompactList}\item 
\hypertarget{classNexthopPortMapper_aeca09e6266080241ec4394034b8e4555}{
void \hyperlink{classNexthopPortMapper_aeca09e6266080241ec4394034b8e4555}{notify\_\-observers} ()}
\label{classNexthopPortMapper_aeca09e6266080241ec4394034b8e4555}

\begin{DoxyCompactList}\small\item\em Notify observers about any port mapping changes. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a7a6760fa3f84308684fff37fac7f46ce}{lookup\_\-nexthop\_\-interface} (const string \&ifname, const string \&vifname) const 
\begin{DoxyCompactList}\small\item\em Lookup a next-\/hop interface/vif name to obtain \hyperlink{protocolthe-p}{the} corresponding port number. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a0d8e441b7f8451d0c28511fce22c5807}{lookup\_\-nexthop\_\-ipv4} (const \hyperlink{classIPv4}{IPv4} \&ipv4) const 
\begin{DoxyCompactList}\small\item\em Lookup a next-\/hop \hyperlink{classIPv4}{IPv4} address to obtain \hyperlink{protocolthe-p}{the} corresponding port number. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a94880725b792af4a6a9d5fabdb6da4b2}{lookup\_\-nexthop\_\-ipv6} (const \hyperlink{classIPv6}{IPv6} \&ipv6) const 
\begin{DoxyCompactList}\small\item\em Lookup a next-\/hop \hyperlink{classIPv6}{IPv6} address to obtain \hyperlink{protocolthe-p}{the} corresponding port number. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_aec84dfc20384dfc79d354298d51ff43b}{add\_\-interface} (const string \&ifname, const string \&vifname, int port)
\begin{DoxyCompactList}\small\item\em Add an entry for an interface/vif name to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a17eb1a0bdf57c9fa8babc89c24748c72}{delete\_\-interface} (const string \&ifname, const string \&vifname)
\begin{DoxyCompactList}\small\item\em Delete an entry for an interface/vif name to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a41654e0ee21540f366a0cccbaa0d3025}{add\_\-ipv4} (const \hyperlink{classIPv4}{IPv4} \&ipv4, int port)
\begin{DoxyCompactList}\small\item\em Add an entry for an \hyperlink{classIPv4}{IPv4} address to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a00c6609f5182dfc1854146eabb721910}{delete\_\-ipv4} (const \hyperlink{classIPv4}{IPv4} \&ipv4)
\begin{DoxyCompactList}\small\item\em Delete an entry for an \hyperlink{classIPv4}{IPv4} address to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a875a4a3fe624c2926d57c7864651166a}{add\_\-ipv6} (const \hyperlink{classIPv6}{IPv6} \&ipv6, int port)
\begin{DoxyCompactList}\small\item\em Add an entry for an \hyperlink{classIPv6}{IPv6} address to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a7baf28e80771d64bdfcd39748c6ef300}{delete\_\-ipv6} (const \hyperlink{classIPv6}{IPv6} \&ipv6)
\begin{DoxyCompactList}\small\item\em Delete an entry for an \hyperlink{classIPv6}{IPv6} address to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a19a4fc6a8d6d7b2b075233c394f2a913}{add\_\-ipv4net} (const \hyperlink{classIPNet}{IPv4Net} \&ipv4net, int port)
\begin{DoxyCompactList}\small\item\em Add an entry for an \hyperlink{classIPv4}{IPv4} subnet to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_a4ee313c98112174bc02d0663d2ec0c33}{delete\_\-ipv4net} (const \hyperlink{classIPNet}{IPv4Net} \&ipv4net)
\begin{DoxyCompactList}\small\item\em Delete an entry for an \hyperlink{classIPv4}{IPv4} subnet to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_aa49fea32beba815b9530a8efcf6543ba}{add\_\-ipv6net} (const \hyperlink{classIPNet}{IPv6Net} \&ipv6net, int port)
\begin{DoxyCompactList}\small\item\em Add an entry for an \hyperlink{classIPv6}{IPv6} subnet to port mapping. \item\end{DoxyCompactList}\item 
int \hyperlink{classNexthopPortMapper_ac8eb058b563e14f47f5b0521f993da1a}{delete\_\-ipv6net} (const \hyperlink{classIPNet}{IPv6Net} \&ipv6net)
\begin{DoxyCompactList}\small\item\em Delete an entry for an \hyperlink{classIPv6}{IPv6} subnet to port mapping. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classNexthopPortMapper_a22a7e90126bb97a653c22d658365e0c1}{
bool {\bfseries is\_\-mapping\_\-changed} () const }
\label{classNexthopPortMapper_a22a7e90126bb97a653c22d658365e0c1}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classNexthopPortMapper_ad3b67e77a7c61297f51d2a4991a1e14f}{
map$<$ pair$<$ string, string $>$, int $>$ {\bfseries \_\-interface\_\-map}}
\label{classNexthopPortMapper_ad3b67e77a7c61297f51d2a4991a1e14f}

\item 
\hypertarget{classNexthopPortMapper_a7072b84edd0d4877680f2417a18c5dd6}{
map$<$ \hyperlink{classIPv4}{IPv4}, int $>$ {\bfseries \_\-ipv4\_\-map}}
\label{classNexthopPortMapper_a7072b84edd0d4877680f2417a18c5dd6}

\item 
\hypertarget{classNexthopPortMapper_a06e6104526dfd4b774172eca410e9432}{
map$<$ \hyperlink{classIPv6}{IPv6}, int $>$ {\bfseries \_\-ipv6\_\-map}}
\label{classNexthopPortMapper_a06e6104526dfd4b774172eca410e9432}

\item 
\hypertarget{classNexthopPortMapper_a0462f23a8eda6d0b6533e03bbaead92c}{
map$<$ \hyperlink{classIPNet}{IPv4Net}, int $>$ {\bfseries \_\-ipv4net\_\-map}}
\label{classNexthopPortMapper_a0462f23a8eda6d0b6533e03bbaead92c}

\item 
\hypertarget{classNexthopPortMapper_a51f934c789fc1830090ffcda8ebead0d}{
map$<$ \hyperlink{classIPNet}{IPv6Net}, int $>$ {\bfseries \_\-ipv6net\_\-map}}
\label{classNexthopPortMapper_a51f934c789fc1830090ffcda8ebead0d}

\item 
\hypertarget{classNexthopPortMapper_aa1191c3e8cad66c1b19f232552305ec1}{
map$<$ pair$<$ string, string $>$, int $>$ {\bfseries \_\-old\_\-interface\_\-map}}
\label{classNexthopPortMapper_aa1191c3e8cad66c1b19f232552305ec1}

\item 
\hypertarget{classNexthopPortMapper_a309e5b1abd28648f9bd419070eb96001}{
map$<$ \hyperlink{classIPv4}{IPv4}, int $>$ {\bfseries \_\-old\_\-ipv4\_\-map}}
\label{classNexthopPortMapper_a309e5b1abd28648f9bd419070eb96001}

\item 
\hypertarget{classNexthopPortMapper_ad4fa82d65ebfa2624ba7f8ba0a4152bb}{
map$<$ \hyperlink{classIPv6}{IPv6}, int $>$ {\bfseries \_\-old\_\-ipv6\_\-map}}
\label{classNexthopPortMapper_ad4fa82d65ebfa2624ba7f8ba0a4152bb}

\item 
\hypertarget{classNexthopPortMapper_a8f6120fc2b5e6692caa419abc4d49802}{
map$<$ \hyperlink{classIPNet}{IPv4Net}, int $>$ {\bfseries \_\-old\_\-ipv4net\_\-map}}
\label{classNexthopPortMapper_a8f6120fc2b5e6692caa419abc4d49802}

\item 
\hypertarget{classNexthopPortMapper_a2c399d7dad4768fe9e4559531589eab6}{
map$<$ \hyperlink{classIPNet}{IPv6Net}, int $>$ {\bfseries \_\-old\_\-ipv6net\_\-map}}
\label{classNexthopPortMapper_a2c399d7dad4768fe9e4559531589eab6}

\item 
\hypertarget{classNexthopPortMapper_a5b583f437d69982c715020603d8861e4}{
list$<$ \hyperlink{classNexthopPortMapperObserver}{NexthopPortMapperObserver} $\ast$ $>$ {\bfseries \_\-observers}}
\label{classNexthopPortMapper_a5b583f437d69982c715020603d8861e4}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A class for to keep \hyperlink{protocolthe-p}{the} mapping between next-\/hop information and a port number. The next-\/hop information can be one of \hyperlink{protocolthe-p}{the} following: network interface, IP host address (local or peer address on point-\/to-\/point links), or IP subnet address (of \hyperlink{protocolthe-p}{the} directly connected subnet for an interface).

Note that observers (\hyperlink{classNexthopPortMapperObserver}{NexthopPortMapperObserver}) can be attached to monitor changes to \hyperlink{protocolthe-p}{the} port mapping. The observers notification is triggered by an explicit call to \hyperlink{classNexthopPortMapper_aeca09e6266080241ec4394034b8e4555}{NexthopPortMapper::notify\_\-observers}. 

\subsection{Member Function Documentation}
\hypertarget{classNexthopPortMapper_aec84dfc20384dfc79d354298d51ff43b}{
\index{NexthopPortMapper@{NexthopPortMapper}!add\_\-interface@{add\_\-interface}}
\index{add\_\-interface@{add\_\-interface}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{add\_\-interface}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::add\_\-interface (
\begin{DoxyParamCaption}
\item[{const string \&}]{ifname, }
\item[{const string \&}]{vifname, }
\item[{int}]{port}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_aec84dfc20384dfc79d354298d51ff43b}


Add an entry for an interface/vif name to port mapping. 

If \hyperlink{protocolthe-p}{the} entry already exists, then \hyperlink{protocolthe-p}{the} port will be updated.


\begin{DoxyParams}{Parameters}
{\em ifname} & \hyperlink{protocolthe-p}{the} interface name to add. \\
\hline
{\em vifname} & \hyperlink{protocolthe-p}{the} vif name to add. \\
\hline
{\em port} & \hyperlink{protocolthe-p}{the} port number to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a41654e0ee21540f366a0cccbaa0d3025}{
\index{NexthopPortMapper@{NexthopPortMapper}!add\_\-ipv4@{add\_\-ipv4}}
\index{add\_\-ipv4@{add\_\-ipv4}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{add\_\-ipv4}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::add\_\-ipv4 (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{ipv4, }
\item[{int}]{port}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a41654e0ee21540f366a0cccbaa0d3025}


Add an entry for an \hyperlink{classIPv4}{IPv4} address to port mapping. 

If \hyperlink{protocolthe-p}{the} entry already exists, then \hyperlink{protocolthe-p}{the} port will be updated.


\begin{DoxyParams}{Parameters}
{\em ipv4} & \hyperlink{protocolthe-p}{the} address to add. \\
\hline
{\em port} & \hyperlink{protocolthe-p}{the} port number to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a19a4fc6a8d6d7b2b075233c394f2a913}{
\index{NexthopPortMapper@{NexthopPortMapper}!add\_\-ipv4net@{add\_\-ipv4net}}
\index{add\_\-ipv4net@{add\_\-ipv4net}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{add\_\-ipv4net}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::add\_\-ipv4net (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4Net} \&}]{ipv4net, }
\item[{int}]{port}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a19a4fc6a8d6d7b2b075233c394f2a913}


Add an entry for an \hyperlink{classIPv4}{IPv4} subnet to port mapping. 

If \hyperlink{protocolthe-p}{the} entry already exists, then \hyperlink{protocolthe-p}{the} port will be updated.


\begin{DoxyParams}{Parameters}
{\em ipv4net} & \hyperlink{protocolthe-p}{the} subnet to add. \\
\hline
{\em port} & \hyperlink{protocolthe-p}{the} port number to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a875a4a3fe624c2926d57c7864651166a}{
\index{NexthopPortMapper@{NexthopPortMapper}!add\_\-ipv6@{add\_\-ipv6}}
\index{add\_\-ipv6@{add\_\-ipv6}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{add\_\-ipv6}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::add\_\-ipv6 (
\begin{DoxyParamCaption}
\item[{const {\bf IPv6} \&}]{ipv6, }
\item[{int}]{port}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a875a4a3fe624c2926d57c7864651166a}


Add an entry for an \hyperlink{classIPv6}{IPv6} address to port mapping. 

If \hyperlink{protocolthe-p}{the} entry already exists, then \hyperlink{protocolthe-p}{the} port will be updated.


\begin{DoxyParams}{Parameters}
{\em ipv6} & \hyperlink{protocolthe-p}{the} address to add. \\
\hline
{\em port} & \hyperlink{protocolthe-p}{the} port number to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_aa49fea32beba815b9530a8efcf6543ba}{
\index{NexthopPortMapper@{NexthopPortMapper}!add\_\-ipv6net@{add\_\-ipv6net}}
\index{add\_\-ipv6net@{add\_\-ipv6net}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{add\_\-ipv6net}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::add\_\-ipv6net (
\begin{DoxyParamCaption}
\item[{const {\bf IPv6Net} \&}]{ipv6net, }
\item[{int}]{port}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_aa49fea32beba815b9530a8efcf6543ba}


Add an entry for an \hyperlink{classIPv6}{IPv6} subnet to port mapping. 

If \hyperlink{protocolthe-p}{the} entry already exists, then \hyperlink{protocolthe-p}{the} port will be updated.


\begin{DoxyParams}{Parameters}
{\em ipv6net} & \hyperlink{protocolthe-p}{the} subnet to add. \\
\hline
{\em port} & \hyperlink{protocolthe-p}{the} port number to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_ae39547e43d49c87b0c687bf4621c9e5d}{
\index{NexthopPortMapper@{NexthopPortMapper}!add\_\-observer@{add\_\-observer}}
\index{add\_\-observer@{add\_\-observer}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{add\_\-observer}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::add\_\-observer (
\begin{DoxyParamCaption}
\item[{{\bf NexthopPortMapperObserver} $\ast$}]{observer}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_ae39547e43d49c87b0c687bf4621c9e5d}


Add an observer for observing changes to \hyperlink{protocolthe-p}{the} mapper. 


\begin{DoxyParams}{Parameters}
{\em observer} & \hyperlink{protocolthe-p}{the} observer to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a17eb1a0bdf57c9fa8babc89c24748c72}{
\index{NexthopPortMapper@{NexthopPortMapper}!delete\_\-interface@{delete\_\-interface}}
\index{delete\_\-interface@{delete\_\-interface}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{delete\_\-interface}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::delete\_\-interface (
\begin{DoxyParamCaption}
\item[{const string \&}]{ifname, }
\item[{const string \&}]{vifname}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a17eb1a0bdf57c9fa8babc89c24748c72}


Delete an entry for an interface/vif name to port mapping. 


\begin{DoxyParams}{Parameters}
{\em ifname} & \hyperlink{protocolthe-p}{the} interface name to delete. \\
\hline
{\em vifname} & \hyperlink{protocolthe-p}{the} vif name to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a00c6609f5182dfc1854146eabb721910}{
\index{NexthopPortMapper@{NexthopPortMapper}!delete\_\-ipv4@{delete\_\-ipv4}}
\index{delete\_\-ipv4@{delete\_\-ipv4}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{delete\_\-ipv4}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::delete\_\-ipv4 (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{ipv4}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a00c6609f5182dfc1854146eabb721910}


Delete an entry for an \hyperlink{classIPv4}{IPv4} address to port mapping. 


\begin{DoxyParams}{Parameters}
{\em ipv4} & \hyperlink{protocolthe-p}{the} address to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a4ee313c98112174bc02d0663d2ec0c33}{
\index{NexthopPortMapper@{NexthopPortMapper}!delete\_\-ipv4net@{delete\_\-ipv4net}}
\index{delete\_\-ipv4net@{delete\_\-ipv4net}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{delete\_\-ipv4net}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::delete\_\-ipv4net (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4Net} \&}]{ipv4net}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a4ee313c98112174bc02d0663d2ec0c33}


Delete an entry for an \hyperlink{classIPv4}{IPv4} subnet to port mapping. 


\begin{DoxyParams}{Parameters}
{\em ipv4net} & \hyperlink{protocolthe-p}{the} subnet to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a7baf28e80771d64bdfcd39748c6ef300}{
\index{NexthopPortMapper@{NexthopPortMapper}!delete\_\-ipv6@{delete\_\-ipv6}}
\index{delete\_\-ipv6@{delete\_\-ipv6}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{delete\_\-ipv6}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::delete\_\-ipv6 (
\begin{DoxyParamCaption}
\item[{const {\bf IPv6} \&}]{ipv6}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a7baf28e80771d64bdfcd39748c6ef300}


Delete an entry for an \hyperlink{classIPv6}{IPv6} address to port mapping. 


\begin{DoxyParams}{Parameters}
{\em ipv6} & \hyperlink{protocolthe-p}{the} address to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_ac8eb058b563e14f47f5b0521f993da1a}{
\index{NexthopPortMapper@{NexthopPortMapper}!delete\_\-ipv6net@{delete\_\-ipv6net}}
\index{delete\_\-ipv6net@{delete\_\-ipv6net}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{delete\_\-ipv6net}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::delete\_\-ipv6net (
\begin{DoxyParamCaption}
\item[{const {\bf IPv6Net} \&}]{ipv6net}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_ac8eb058b563e14f47f5b0521f993da1a}


Delete an entry for an \hyperlink{classIPv6}{IPv6} subnet to port mapping. 


\begin{DoxyParams}{Parameters}
{\em ipv6net} & \hyperlink{protocolthe-p}{the} subnet to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a14c1050b16fdb670ac64f271f844e8b5}{
\index{NexthopPortMapper@{NexthopPortMapper}!delete\_\-observer@{delete\_\-observer}}
\index{delete\_\-observer@{delete\_\-observer}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{delete\_\-observer}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::delete\_\-observer (
\begin{DoxyParamCaption}
\item[{{\bf NexthopPortMapperObserver} $\ast$}]{observer}
\end{DoxyParamCaption}
)}}
\label{classNexthopPortMapper_a14c1050b16fdb670ac64f271f844e8b5}


Delete an observer for observing changes to \hyperlink{protocolthe-p}{the} mapper. 


\begin{DoxyParams}{Parameters}
{\em observer} & \hyperlink{protocolthe-p}{the} observer to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a7a6760fa3f84308684fff37fac7f46ce}{
\index{NexthopPortMapper@{NexthopPortMapper}!lookup\_\-nexthop\_\-interface@{lookup\_\-nexthop\_\-interface}}
\index{lookup\_\-nexthop\_\-interface@{lookup\_\-nexthop\_\-interface}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{lookup\_\-nexthop\_\-interface}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::lookup\_\-nexthop\_\-interface (
\begin{DoxyParamCaption}
\item[{const string \&}]{ifname, }
\item[{const string \&}]{vifname}
\end{DoxyParamCaption}
) const}}
\label{classNexthopPortMapper_a7a6760fa3f84308684fff37fac7f46ce}


Lookup a next-\/hop interface/vif name to obtain \hyperlink{protocolthe-p}{the} corresponding port number. 


\begin{DoxyParams}{Parameters}
{\em ifname} & \hyperlink{protocolthe-p}{the} next-\/hop interface name to lookup. \\
\hline
{\em vifname} & \hyperlink{protocolthe-p}{the} next-\/hop vif name to lookup. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} port number on success, otherwise -\/1. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a0d8e441b7f8451d0c28511fce22c5807}{
\index{NexthopPortMapper@{NexthopPortMapper}!lookup\_\-nexthop\_\-ipv4@{lookup\_\-nexthop\_\-ipv4}}
\index{lookup\_\-nexthop\_\-ipv4@{lookup\_\-nexthop\_\-ipv4}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{lookup\_\-nexthop\_\-ipv4}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::lookup\_\-nexthop\_\-ipv4 (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{ipv4}
\end{DoxyParamCaption}
) const}}
\label{classNexthopPortMapper_a0d8e441b7f8451d0c28511fce22c5807}


Lookup a next-\/hop \hyperlink{classIPv4}{IPv4} address to obtain \hyperlink{protocolthe-p}{the} corresponding port number. 


\begin{DoxyParams}{Parameters}
{\em ipv4} & \hyperlink{protocolthe-p}{the} next-\/hop address to lookup. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} port number on success, otherwise -\/1. 
\end{DoxyReturn}
\hypertarget{classNexthopPortMapper_a94880725b792af4a6a9d5fabdb6da4b2}{
\index{NexthopPortMapper@{NexthopPortMapper}!lookup\_\-nexthop\_\-ipv6@{lookup\_\-nexthop\_\-ipv6}}
\index{lookup\_\-nexthop\_\-ipv6@{lookup\_\-nexthop\_\-ipv6}!NexthopPortMapper@{NexthopPortMapper}}
\subsubsection[{lookup\_\-nexthop\_\-ipv6}]{\setlength{\rightskip}{0pt plus 5cm}int NexthopPortMapper::lookup\_\-nexthop\_\-ipv6 (
\begin{DoxyParamCaption}
\item[{const {\bf IPv6} \&}]{ipv6}
\end{DoxyParamCaption}
) const}}
\label{classNexthopPortMapper_a94880725b792af4a6a9d5fabdb6da4b2}


Lookup a next-\/hop \hyperlink{classIPv6}{IPv6} address to obtain \hyperlink{protocolthe-p}{the} corresponding port number. 


\begin{DoxyParams}{Parameters}
{\em ipv6} & \hyperlink{protocolthe-p}{the} next-\/hop address to lookup. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} port number on success, otherwise -\/1. 
\end{DoxyReturn}


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