\hypertarget{classIptuple}{
\section{Iptuple Class Reference}
\label{classIptuple}\index{Iptuple@{Iptuple}}
}


\hyperlink{classStore}{Store} \hyperlink{protocolthe-p}{the} Local Interface, IP, Local Server \hyperlink{classPort}{Port}, \hyperlink{classPeer}{Peer} IP and \hyperlink{classPeer}{Peer} Server \hyperlink{classPort}{Port} tuple.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIptuple_a0466cadc7e38df97724b29dde8443348}{
{\bfseries Iptuple} (const char $\ast$local\_\-dev, const char $\ast$local\_\-addr, uint16\_\-t local\_\-port, const char $\ast$peer\_\-addr, uint16\_\-t peer\_\-port)  throw (UnresolvableHost,AddressFamilyMismatch)}
\label{classIptuple_a0466cadc7e38df97724b29dde8443348}

\item 
\hypertarget{classIptuple_adc59204a705c7d971c440348be612567}{
{\bfseries Iptuple} (const \hyperlink{classIptuple}{Iptuple} \&)}
\label{classIptuple_adc59204a705c7d971c440348be612567}

\item 
\hypertarget{classIptuple_a99b3047bb2a23b3e5409564df8c55bd6}{
\hyperlink{classIptuple}{Iptuple} \& {\bfseries operator=} (const \hyperlink{classIptuple}{Iptuple} \&)}
\label{classIptuple_a99b3047bb2a23b3e5409564df8c55bd6}

\item 
\hypertarget{classIptuple_a1e3d26fb15a1bb45f543381d905f35d2}{
void {\bfseries copy} (const \hyperlink{classIptuple}{Iptuple} \&)}
\label{classIptuple_a1e3d26fb15a1bb45f543381d905f35d2}

\item 
\hypertarget{classIptuple_a38cb429ea62c819b0d7c1daf4cca2c46}{
bool {\bfseries operator==} (const \hyperlink{classIptuple}{Iptuple} \&) const }
\label{classIptuple_a38cb429ea62c819b0d7c1daf4cca2c46}

\item 
\hypertarget{classIptuple_a6d2d587f7e5e662d06990d0b96b34773}{
struct sockaddr $\ast$ {\bfseries get\_\-local\_\-socket} (size\_\-t \&len) const }
\label{classIptuple_a6d2d587f7e5e662d06990d0b96b34773}

\item 
\hypertarget{classIptuple_ac6f46d944f7f4ab5a42c1a6c699b6397}{
string {\bfseries get\_\-local\_\-addr} () const }
\label{classIptuple_ac6f46d944f7f4ab5a42c1a6c699b6397}

\item 
\hypertarget{classIptuple_a6d9833622c1d5852002df3b1b9656b7c}{
bool {\bfseries get\_\-local\_\-addr} (\hyperlink{classIPv4}{IPv4} \&addr) const }
\label{classIptuple_a6d9833622c1d5852002df3b1b9656b7c}

\item 
\hypertarget{classIptuple_a49585f95b46ac62bed1dad5958e58a2b}{
bool {\bfseries get\_\-local\_\-addr} (\hyperlink{classIPv6}{IPv6} \&addr) const }
\label{classIptuple_a49585f95b46ac62bed1dad5958e58a2b}

\item 
\hypertarget{classIptuple_a987d75b302e5c26573037922bc53f2cd}{
uint16\_\-t {\bfseries get\_\-local\_\-port} () const }
\label{classIptuple_a987d75b302e5c26573037922bc53f2cd}

\item 
\hypertarget{classIptuple_a0ef3adff308015d9a90819c29bf42443}{
struct sockaddr $\ast$ {\bfseries get\_\-bind\_\-socket} (size\_\-t \&len) const }
\label{classIptuple_a0ef3adff308015d9a90819c29bf42443}

\item 
\hypertarget{classIptuple_a5590bef43e0245bbf92ce8c7f91dc939}{
struct sockaddr $\ast$ {\bfseries get\_\-peer\_\-socket} (size\_\-t \&len) const }
\label{classIptuple_a5590bef43e0245bbf92ce8c7f91dc939}

\item 
\hypertarget{classIptuple_a13a0a4910ad456981fe5ede60302f597}{
string {\bfseries get\_\-peer\_\-addr} () const }
\label{classIptuple_a13a0a4910ad456981fe5ede60302f597}

\item 
\hypertarget{classIptuple_aba30195a1d34b4a45a2dd8626661daa2}{
const string \& {\bfseries get\_\-local\_\-interface} () const }
\label{classIptuple_aba30195a1d34b4a45a2dd8626661daa2}

\item 
\hypertarget{classIptuple_a8f53a626d98b9f4d33447c359ca9a3a6}{
bool {\bfseries get\_\-peer\_\-addr} (\hyperlink{classIPv4}{IPv4} \&addr) const }
\label{classIptuple_a8f53a626d98b9f4d33447c359ca9a3a6}

\item 
\hypertarget{classIptuple_ad735df29fd77b13a38be6e13ad94e0cb}{
bool {\bfseries get\_\-peer\_\-addr} (\hyperlink{classIPv6}{IPv6} \&addr) const }
\label{classIptuple_ad735df29fd77b13a38be6e13ad94e0cb}

\item 
\hypertarget{classIptuple_ad5e24424f39ac02d6a3a2be505dbc149}{
uint16\_\-t {\bfseries get\_\-peer\_\-port} () const }
\label{classIptuple_ad5e24424f39ac02d6a3a2be505dbc149}

\item 
\hypertarget{classIptuple_a23c2e720c338ea6cf3394d7041c5c362}{
string {\bfseries str} () const }
\label{classIptuple_a23c2e720c338ea6cf3394d7041c5c362}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIptuple_a7547da04247a36669543f8bfb1d5803f}{
void {\bfseries fill\_\-address} (const char $\ast$addr, uint16\_\-t local\_\-port, struct sockaddr\_\-storage \&ss, size\_\-t \&len, string \&addr\_\-numeric)  throw (UnresolvableHost)}
\label{classIptuple_a7547da04247a36669543f8bfb1d5803f}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIptuple_a308268178d913ac7d62bac68103a96e0}{
string {\bfseries \_\-local\_\-dev}}
\label{classIptuple_a308268178d913ac7d62bac68103a96e0}

\item 
\hypertarget{classIptuple_a2784b2bf24668da99e8ffae27f2815ed}{
string {\bfseries \_\-local\_\-addr}}
\label{classIptuple_a2784b2bf24668da99e8ffae27f2815ed}

\item 
\hypertarget{classIptuple_adbdc36e2a31cec155ac6a43c745330c2}{
string {\bfseries \_\-peer\_\-addr}}
\label{classIptuple_adbdc36e2a31cec155ac6a43c745330c2}

\item 
\hypertarget{classIptuple_aafc9804adac8a9a50526dee8f09fbff6}{
struct sockaddr\_\-storage {\bfseries \_\-local\_\-sock}}
\label{classIptuple_aafc9804adac8a9a50526dee8f09fbff6}

\item 
\hypertarget{classIptuple_a493d388e427bf14b04182d605dc2eefe}{
size\_\-t {\bfseries \_\-local\_\-sock\_\-len}}
\label{classIptuple_a493d388e427bf14b04182d605dc2eefe}

\item 
\hypertarget{classIptuple_a78fd0b1ae8c8b52c5b05dd78c85facbc}{
struct sockaddr\_\-storage {\bfseries \_\-bind\_\-sock}}
\label{classIptuple_a78fd0b1ae8c8b52c5b05dd78c85facbc}

\item 
\hypertarget{classIptuple_a420beca098e84f677e47ffe47c23d390}{
size\_\-t {\bfseries \_\-bind\_\-sock\_\-len}}
\label{classIptuple_a420beca098e84f677e47ffe47c23d390}

\item 
\hypertarget{classIptuple_a4bd61dd90d5989b03662dad9b0473071}{
struct sockaddr\_\-storage {\bfseries \_\-peer\_\-sock}}
\label{classIptuple_a4bd61dd90d5989b03662dad9b0473071}

\item 
\hypertarget{classIptuple_ac7be418988af96ccf5fd3d73fbc94145}{
size\_\-t {\bfseries \_\-peer\_\-sock\_\-len}}
\label{classIptuple_ac7be418988af96ccf5fd3d73fbc94145}

\item 
\hypertarget{classIptuple_ac96c6170ce9ee3d7b2c98fd4587a6750}{
string {\bfseries \_\-local\_\-address}}
\label{classIptuple_ac96c6170ce9ee3d7b2c98fd4587a6750}

\item 
\hypertarget{classIptuple_aa6959a33162d92e3dc9b05e2614aa11f}{
\hyperlink{classIPvX}{IPvX} {\bfseries \_\-local\_\-address\_\-ipvx}}
\label{classIptuple_aa6959a33162d92e3dc9b05e2614aa11f}

\item 
\hypertarget{classIptuple_ad9ac7c54495eb4756370ed35b4b54df2}{
string {\bfseries \_\-peer\_\-address}}
\label{classIptuple_ad9ac7c54495eb4756370ed35b4b54df2}

\item 
\hypertarget{classIptuple_ac9d6b756b67f89b41b34b20e0d104ba6}{
\hyperlink{classIPvX}{IPvX} {\bfseries \_\-peer\_\-address\_\-ipvx}}
\label{classIptuple_ac9d6b756b67f89b41b34b20e0d104ba6}

\item 
\hypertarget{classIptuple_a84085b51c8195e906f77fe2b8be60b6b}{
uint16\_\-t {\bfseries \_\-local\_\-port}}
\label{classIptuple_a84085b51c8195e906f77fe2b8be60b6b}

\item 
\hypertarget{classIptuple_abf5e869433bfd39d762edb8392620130}{
uint16\_\-t {\bfseries \_\-peer\_\-port}}
\label{classIptuple_abf5e869433bfd39d762edb8392620130}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classStore}{Store} \hyperlink{protocolthe-p}{the} Local Interface, IP, Local Server \hyperlink{classPort}{Port}, \hyperlink{classPeer}{Peer} IP and \hyperlink{classPeer}{Peer} Server \hyperlink{classPort}{Port} tuple. Also create \hyperlink{protocolthe-p}{the} socket buffers to be used by \hyperlink{protocolthe-p}{the} socket code. All \hyperlink{protocolthe-p}{the} IP protocol family differences can therefore be hidden in here.

The endpoint addresses can be presented as either numeric addresses or symbolic addresses. Symbolic addresses are converted to numeric addresses and held as such. The symbolic address are kept to aid debugging but are never accessed after \hyperlink{protocolthe-p}{the} initial conversion to \hyperlink{protocolthe-p}{the} numeric form. Only in \hyperlink{protocolthe-p}{the} constructor is there a possibility of a DNS / Yellow pages interaction taking place. After this as we are dealing with IP addresses there should be no danger. 

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