\hypertarget{classVifAddr}{
\section{VifAddr Class Reference}
\label{classVifAddr}\index{VifAddr@{VifAddr}}
}


Virtual interface address class.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classVifAddr_a2e16fe142bc899d98a814487d1012c7b}{VifAddr} (const \hyperlink{classIPvX}{IPvX} \&ipvx\_\-addr)
\begin{DoxyCompactList}\small\item\em Constructor for a given address. \item\end{DoxyCompactList}\item 
\hyperlink{classVifAddr_a33736902ae34c2c4641bee39f33598a6}{VifAddr} (const \hyperlink{classIPvX}{IPvX} \&ipvx\_\-addr, const \hyperlink{classIPvXNet}{IPvXNet} \&ipvx\_\-subnet\_\-addr, const \hyperlink{classIPvX}{IPvX} \&ipvx\_\-broadcast\_\-addr, const \hyperlink{classIPvX}{IPvX} \&ipvx\_\-peer\_\-addr)
\begin{DoxyCompactList}\small\item\em Constructor for a given address, and its associated addresses. \item\end{DoxyCompactList}\item 
const \hyperlink{classIPvX}{IPvX} \& \hyperlink{classVifAddr_afa15c355c138821c531c752d71513908}{addr} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} interface address. \item\end{DoxyCompactList}\item 
const \hyperlink{classIPvXNet}{IPvXNet} \& \hyperlink{classVifAddr_afa6c5c75202f7fc2992b4cdb812c0180}{subnet\_\-addr} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} subnet address. \item\end{DoxyCompactList}\item 
const \hyperlink{classIPvX}{IPvX} \& \hyperlink{classVifAddr_a4bec1ea09e0632b7e000902dad492e53}{broadcast\_\-addr} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} broadcast address. \item\end{DoxyCompactList}\item 
const \hyperlink{classIPvX}{IPvX} \& \hyperlink{classVifAddr_a2abc3fc3fc1d4daa3544e0bef58e6dc9}{peer\_\-addr} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} peer address. \item\end{DoxyCompactList}\item 
void \hyperlink{classVifAddr_a301abd6b24c5516e604c087081a04128}{set\_\-addr} (const \hyperlink{classIPvX}{IPvX} \&v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} interface address. \item\end{DoxyCompactList}\item 
void \hyperlink{classVifAddr_a16d0745c6501ffc415f2befd667c923f}{set\_\-subnet\_\-addr} (const \hyperlink{classIPvXNet}{IPvXNet} \&v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} subnet address. \item\end{DoxyCompactList}\item 
void \hyperlink{classVifAddr_a02ac6b6087fff32270c73e8e6ed2ef57}{set\_\-broadcast\_\-addr} (const \hyperlink{classIPvX}{IPvX} \&v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} broadcast address. \item\end{DoxyCompactList}\item 
void \hyperlink{classVifAddr_a62dc569b1b1cd6a249655ac5335dbce9}{set\_\-peer\_\-addr} (const \hyperlink{classIPvX}{IPvX} \&v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} peer address. \item\end{DoxyCompactList}\item 
bool \hyperlink{classVifAddr_a27dc59c27d83a7a87c9cf4c5ee4765fa}{is\_\-my\_\-addr} (const \hyperlink{classIPvX}{IPvX} \&ipvx\_\-addr) const 
\begin{DoxyCompactList}\small\item\em Test whether if an \hyperlink{classIPvX}{IPvX} address is same as my address. \item\end{DoxyCompactList}\item 
bool \hyperlink{classVifAddr_ac301fccf7103e71eb1d6a75cdc672744}{is\_\-same\_\-subnet} (const \hyperlink{classIPvXNet}{IPvXNet} \&ipvxnet) const 
\begin{DoxyCompactList}\small\item\em Test if a given subnet address is a subset of my subnet address. \item\end{DoxyCompactList}\item 
bool \hyperlink{classVifAddr_a7e2529c5146f95c6fc188b9f92ab660b}{is\_\-same\_\-subnet} (const \hyperlink{classIPvX}{IPvX} \&ipvx\_\-addr) const 
\begin{DoxyCompactList}\small\item\em Test whether an address belongs to my subnet address. \item\end{DoxyCompactList}\item 
string \hyperlink{classVifAddr_a16d433b2c2a5b202a089cca138d35f2c}{str} () const 
\begin{DoxyCompactList}\small\item\em Convert this address from binary form to presentation format. \item\end{DoxyCompactList}\item 
bool \hyperlink{classVifAddr_ac488f20cc8c9849a902aef3a10b8599b}{operator==} (const \hyperlink{classVifAddr}{VifAddr} \&other) const 
\begin{DoxyCompactList}\small\item\em Equality Operator. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classVifAddr_af9886abfe416fa0cd4a7b83779d5f2ff}{
\hyperlink{classIPvX}{IPvX} {\bfseries \_\-addr}}
\label{classVifAddr_af9886abfe416fa0cd4a7b83779d5f2ff}

\item 
\hypertarget{classVifAddr_a6f23a5be3e4d4d1bca7f37c629594eed}{
\hyperlink{classIPvXNet}{IPvXNet} {\bfseries \_\-subnet\_\-addr}}
\label{classVifAddr_a6f23a5be3e4d4d1bca7f37c629594eed}

\item 
\hypertarget{classVifAddr_ab704368cefd3d5809365857d275c54b6}{
\hyperlink{classIPvX}{IPvX} {\bfseries \_\-broadcast\_\-addr}}
\label{classVifAddr_ab704368cefd3d5809365857d275c54b6}

\item 
\hypertarget{classVifAddr_a6daf6b4d72063b212602cc9d6c66b76d}{
\hyperlink{classIPvX}{IPvX} {\bfseries \_\-peer\_\-addr}}
\label{classVifAddr_a6daf6b4d72063b212602cc9d6c66b76d}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Virtual interface address class. \hyperlink{classVifAddr}{VifAddr} holds information about an address of a virtual interface. A virtual interface may have more than one \hyperlink{classVifAddr}{VifAddr}. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classVifAddr_a2e16fe142bc899d98a814487d1012c7b}{
\index{VifAddr@{VifAddr}!VifAddr@{VifAddr}}
\index{VifAddr@{VifAddr}!VifAddr@{VifAddr}}
\subsubsection[{VifAddr}]{\setlength{\rightskip}{0pt plus 5cm}VifAddr::VifAddr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{ipvx\_\-addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}explicit\mbox{]}}}}
\label{classVifAddr_a2e16fe142bc899d98a814487d1012c7b}


Constructor for a given address. 


\begin{DoxyParams}{Parameters}
{\em ipvx\_\-addr} & \hyperlink{protocolthe-p}{the} interface address. \\
\hline
\end{DoxyParams}
\hypertarget{classVifAddr_a33736902ae34c2c4641bee39f33598a6}{
\index{VifAddr@{VifAddr}!VifAddr@{VifAddr}}
\index{VifAddr@{VifAddr}!VifAddr@{VifAddr}}
\subsubsection[{VifAddr}]{\setlength{\rightskip}{0pt plus 5cm}VifAddr::VifAddr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{ipvx\_\-addr, }
\item[{const {\bf IPvXNet} \&}]{ipvx\_\-subnet\_\-addr, }
\item[{const {\bf IPvX} \&}]{ipvx\_\-broadcast\_\-addr, }
\item[{const {\bf IPvX} \&}]{ipvx\_\-peer\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classVifAddr_a33736902ae34c2c4641bee39f33598a6}


Constructor for a given address, and its associated addresses. 


\begin{DoxyParams}{Parameters}
{\em ipvx\_\-addr} & \hyperlink{protocolthe-p}{the} interface address. \\
\hline
{\em ipvx\_\-subnet\_\-addr} & \hyperlink{protocolthe-p}{the} subnet address. \\
\hline
{\em ipvx\_\-broadcast\_\-addr} & \hyperlink{protocolthe-p}{the} broadcast address (if \hyperlink{protocolthe-p}{the} interface is broadcast-\/capable). \\
\hline
{\em ipvx\_\-peer\_\-addr} & \hyperlink{protocolthe-p}{the} peer address (if \hyperlink{protocolthe-p}{the} interface is point-\/to-\/point). \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classVifAddr_afa15c355c138821c531c752d71513908}{
\index{VifAddr@{VifAddr}!addr@{addr}}
\index{addr@{addr}!VifAddr@{VifAddr}}
\subsubsection[{addr}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf IPvX}\& VifAddr::addr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_afa15c355c138821c531c752d71513908}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} interface address. 
\end{DoxyReturn}
\hypertarget{classVifAddr_a4bec1ea09e0632b7e000902dad492e53}{
\index{VifAddr@{VifAddr}!broadcast\_\-addr@{broadcast\_\-addr}}
\index{broadcast\_\-addr@{broadcast\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{broadcast\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf IPvX}\& VifAddr::broadcast\_\-addr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_a4bec1ea09e0632b7e000902dad492e53}


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

The broadcast address is valid only if \hyperlink{protocolthe-p}{the} interface is broadcast capable.

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} broadcast address of \hyperlink{protocolthe-p}{the} interface. 
\end{DoxyReturn}
\hypertarget{classVifAddr_a27dc59c27d83a7a87c9cf4c5ee4765fa}{
\index{VifAddr@{VifAddr}!is\_\-my\_\-addr@{is\_\-my\_\-addr}}
\index{is\_\-my\_\-addr@{is\_\-my\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{is\_\-my\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool VifAddr::is\_\-my\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{ipvx\_\-addr}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_a27dc59c27d83a7a87c9cf4c5ee4765fa}


Test whether if an \hyperlink{classIPvX}{IPvX} address is same as my address. 


\begin{DoxyParams}{Parameters}
{\em ipvx\_\-addr} & \hyperlink{protocolthe-p}{the} address to test whether is \hyperlink{protocolthe-p}{the} same as my interface address.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if ipvx\_\-addr is same as my interface address, otherwise false. 
\end{DoxyReturn}
\hypertarget{classVifAddr_ac301fccf7103e71eb1d6a75cdc672744}{
\index{VifAddr@{VifAddr}!is\_\-same\_\-subnet@{is\_\-same\_\-subnet}}
\index{is\_\-same\_\-subnet@{is\_\-same\_\-subnet}!VifAddr@{VifAddr}}
\subsubsection[{is\_\-same\_\-subnet}]{\setlength{\rightskip}{0pt plus 5cm}bool VifAddr::is\_\-same\_\-subnet (
\begin{DoxyParamCaption}
\item[{const {\bf IPvXNet} \&}]{ipvxnet}
\end{DoxyParamCaption}
) const}}
\label{classVifAddr_ac301fccf7103e71eb1d6a75cdc672744}


Test if a given subnet address is a subset of my subnet address. 


\begin{DoxyParams}{Parameters}
{\em ipvxnet} & \hyperlink{protocolthe-p}{the} subnet address to test whether is a subset of my subnet address.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if ipvxnet is a subset of my subnet address, otherwise false. 
\end{DoxyReturn}
\hypertarget{classVifAddr_a7e2529c5146f95c6fc188b9f92ab660b}{
\index{VifAddr@{VifAddr}!is\_\-same\_\-subnet@{is\_\-same\_\-subnet}}
\index{is\_\-same\_\-subnet@{is\_\-same\_\-subnet}!VifAddr@{VifAddr}}
\subsubsection[{is\_\-same\_\-subnet}]{\setlength{\rightskip}{0pt plus 5cm}bool VifAddr::is\_\-same\_\-subnet (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{ipvx\_\-addr}
\end{DoxyParamCaption}
) const}}
\label{classVifAddr_a7e2529c5146f95c6fc188b9f92ab660b}


Test whether an address belongs to my subnet address. 


\begin{DoxyParams}{Parameters}
{\em ipvx\_\-addr} & \hyperlink{protocolthe-p}{the} address to test whether it belongs to my subnet address. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if ipvx\_\-addr belongs to my subnet address, otherwise false. 
\end{DoxyReturn}
\hypertarget{classVifAddr_ac488f20cc8c9849a902aef3a10b8599b}{
\index{VifAddr@{VifAddr}!operator==@{operator==}}
\index{operator==@{operator==}!VifAddr@{VifAddr}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}bool VifAddr::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf VifAddr} \&}]{other}
\end{DoxyParamCaption}
) const}}
\label{classVifAddr_ac488f20cc8c9849a902aef3a10b8599b}


Equality Operator. 


\begin{DoxyParams}{Parameters}
{\em other} & \hyperlink{protocolthe-p}{the} right-\/hand operand to compare against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} left-\/hand operand is numerically same as \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classVifAddr_a2abc3fc3fc1d4daa3544e0bef58e6dc9}{
\index{VifAddr@{VifAddr}!peer\_\-addr@{peer\_\-addr}}
\index{peer\_\-addr@{peer\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{peer\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf IPvX}\& VifAddr::peer\_\-addr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_a2abc3fc3fc1d4daa3544e0bef58e6dc9}


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

The peer address is valid only if \hyperlink{protocolthe-p}{the} interface is point-\/to-\/point.

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} peer address of \hyperlink{protocolthe-p}{the} interface. 
\end{DoxyReturn}
\hypertarget{classVifAddr_a301abd6b24c5516e604c087081a04128}{
\index{VifAddr@{VifAddr}!set\_\-addr@{set\_\-addr}}
\index{set\_\-addr@{set\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{set\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}void VifAddr::set\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_a301abd6b24c5516e604c087081a04128}


Set \hyperlink{protocolthe-p}{the} interface address. 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} interface address to set to \hyperlink{protocolthe-p}{the} interface. \\
\hline
\end{DoxyParams}
\hypertarget{classVifAddr_a02ac6b6087fff32270c73e8e6ed2ef57}{
\index{VifAddr@{VifAddr}!set\_\-broadcast\_\-addr@{set\_\-broadcast\_\-addr}}
\index{set\_\-broadcast\_\-addr@{set\_\-broadcast\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{set\_\-broadcast\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}void VifAddr::set\_\-broadcast\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_a02ac6b6087fff32270c73e8e6ed2ef57}


Set \hyperlink{protocolthe-p}{the} broadcast address. 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} broadcast address to set to \hyperlink{protocolthe-p}{the} interface. \\
\hline
\end{DoxyParams}
\hypertarget{classVifAddr_a62dc569b1b1cd6a249655ac5335dbce9}{
\index{VifAddr@{VifAddr}!set\_\-peer\_\-addr@{set\_\-peer\_\-addr}}
\index{set\_\-peer\_\-addr@{set\_\-peer\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{set\_\-peer\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}void VifAddr::set\_\-peer\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvX} \&}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_a62dc569b1b1cd6a249655ac5335dbce9}


Set \hyperlink{protocolthe-p}{the} peer address. 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} peer address to set to \hyperlink{protocolthe-p}{the} interface. \\
\hline
\end{DoxyParams}
\hypertarget{classVifAddr_a16d0745c6501ffc415f2befd667c923f}{
\index{VifAddr@{VifAddr}!set\_\-subnet\_\-addr@{set\_\-subnet\_\-addr}}
\index{set\_\-subnet\_\-addr@{set\_\-subnet\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{set\_\-subnet\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}void VifAddr::set\_\-subnet\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPvXNet} \&}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_a16d0745c6501ffc415f2befd667c923f}


Set \hyperlink{protocolthe-p}{the} subnet address. 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} subnet address to set to \hyperlink{protocolthe-p}{the} interface. \\
\hline
\end{DoxyParams}
\hypertarget{classVifAddr_a16d433b2c2a5b202a089cca138d35f2c}{
\index{VifAddr@{VifAddr}!str@{str}}
\index{str@{str}!VifAddr@{VifAddr}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string VifAddr::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classVifAddr_a16d433b2c2a5b202a089cca138d35f2c}


Convert this address from binary form to presentation format. 

\begin{DoxyReturn}{Returns}
C++ string with \hyperlink{protocolthe-p}{the} human-\/readable ASCII representation of \hyperlink{protocolthe-p}{the} address. 
\end{DoxyReturn}
\hypertarget{classVifAddr_afa6c5c75202f7fc2992b4cdb812c0180}{
\index{VifAddr@{VifAddr}!subnet\_\-addr@{subnet\_\-addr}}
\index{subnet\_\-addr@{subnet\_\-addr}!VifAddr@{VifAddr}}
\subsubsection[{subnet\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf IPvXNet}\& VifAddr::subnet\_\-addr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVifAddr_afa6c5c75202f7fc2992b4cdb812c0180}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet address of \hyperlink{protocolthe-p}{the} interface. 
\end{DoxyReturn}


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