\hypertarget{classMPReachNLRIAttribute}{
\section{MPReachNLRIAttribute$<$ A $>$ Class Template Reference}
\label{classMPReachNLRIAttribute}\index{MPReachNLRIAttribute@{MPReachNLRIAttribute}}
}
Inheritance diagram for MPReachNLRIAttribute$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classMPReachNLRIAttribute}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classMPReachNLRIAttribute_a1c8d3261a50e2a75183f2384560d9623}{
typedef list$<$ \hyperlink{classIPNet}{IPNet}$<$ A $>$ $>$::const\_\-iterator {\bfseries const\_\-iterator}}
\label{classMPReachNLRIAttribute_a1c8d3261a50e2a75183f2384560d9623}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classMPReachNLRIAttribute_ab0bb23ce38a81a30cccce722df53a3ab}{
\hyperlink{classMPReachNLRIAttribute_ab0bb23ce38a81a30cccce722df53a3ab}{MPReachNLRIAttribute} (Safi safi)}
\label{classMPReachNLRIAttribute_ab0bb23ce38a81a30cccce722df53a3ab}

\begin{DoxyCompactList}\small\item\em Specialise these constructors for each AFI. \item\end{DoxyCompactList}\item 
\hypertarget{classMPReachNLRIAttribute_afed2d06fa4895d64dd229f38fe09a2b4}{
{\bfseries MPReachNLRIAttribute} (const uint8\_\-t $\ast$d)  throw (CorruptMessage)}
\label{classMPReachNLRIAttribute_afed2d06fa4895d64dd229f38fe09a2b4}

\item 
\hyperlink{classPathAttribute}{PathAttribute} $\ast$ \hyperlink{classMPReachNLRIAttribute_a5dd35c7cd812e9ba9a246cfaf98099bf}{clone} () const 
\begin{DoxyCompactList}\small\item\em Make a copy of \hyperlink{protocolthe-p}{the} current attribute. \item\end{DoxyCompactList}\item 
string \hyperlink{classMPReachNLRIAttribute_a39ab7416fff06a01ef07192a74466b24}{str} () const 
\begin{DoxyCompactList}\small\item\em We need to encode an attribute to send to a peer. \item\end{DoxyCompactList}\item 
\hypertarget{classMPReachNLRIAttribute_ab16d52b4b38ab5ed4896a14630eedf06}{
const A \& {\bfseries nexthop} () const }
\label{classMPReachNLRIAttribute_ab16d52b4b38ab5ed4896a14630eedf06}

\item 
\hypertarget{classMPReachNLRIAttribute_af65745178ba4426da60b6fb21264782f}{
void {\bfseries set\_\-nexthop} (const A \&nexthop)}
\label{classMPReachNLRIAttribute_af65745178ba4426da60b6fb21264782f}

\item 
\hypertarget{classMPReachNLRIAttribute_a5270e98963ab9c8802e548086a3afbb6}{
void {\bfseries add\_\-nlri} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&nlri)}
\label{classMPReachNLRIAttribute_a5270e98963ab9c8802e548086a3afbb6}

\item 
\hypertarget{classMPReachNLRIAttribute_a7420b2113ab2b038de8ca3ea460b6101}{
const list$<$ \hyperlink{classIPNet}{IPNet}$<$ A $>$ $>$ \& {\bfseries nlri\_\-list} () const }
\label{classMPReachNLRIAttribute_a7420b2113ab2b038de8ca3ea460b6101}

\item 
\hypertarget{classMPReachNLRIAttribute_a580ddc08bb138be949dbdcadec51e7d0}{
const A \& {\bfseries link\_\-local\_\-nexthop} () const }
\label{classMPReachNLRIAttribute_a580ddc08bb138be949dbdcadec51e7d0}

\item 
\hypertarget{classMPReachNLRIAttribute_a24ad89f71806132d2776d9f6f4eba566}{
void {\bfseries set\_\-link\_\-local\_\-nexthop} (const A \&n)}
\label{classMPReachNLRIAttribute_a24ad89f71806132d2776d9f6f4eba566}

\item 
\hypertarget{classMPReachNLRIAttribute_a5fb6f160d97e1bce97f8e11ed78ed4c3}{
Safi {\bfseries safi} () const }
\label{classMPReachNLRIAttribute_a5fb6f160d97e1bce97f8e11ed78ed4c3}

\item 
bool \hyperlink{classMPReachNLRIAttribute_a62ea5585aa5c6396a3d64d385afa5327}{encode} (uint8\_\-t $\ast$buf, size\_\-t \&wire\_\-size, const \hyperlink{classBGPPeerData}{BGPPeerData} $\ast$peerdata) const 
\begin{DoxyCompactList}\small\item\em encode a path attribute. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$$>$ }\\bool \hyperlink{classMPReachNLRIAttribute_ad27993a2093f4b8e782e36559c08936c}{encode} (uint8\_\-t $\ast$buf, size\_\-t \&wire\_\-size, const \hyperlink{classBGPPeerData}{BGPPeerData} $\ast$peerdata) const
\item 
{\footnotesize template$<$$>$ }\\bool \hyperlink{classMPReachNLRIAttribute_a1ae23a5269fedf2a4f9b00eabc6a945f}{encode} (uint8\_\-t $\ast$buf, size\_\-t \&wire\_\-size, const \hyperlink{classBGPPeerData}{BGPPeerData} $\ast$peerdata) const
\begin{DoxyCompactList}\small\item\em encode a path attribute. \item\end{DoxyCompactList}\item 
\hypertarget{classMPReachNLRIAttribute_a83fcabe9c3f6f606909cb41768ef5de4}{
{\footnotesize template$<$$>$ }\\{\bfseries MPReachNLRIAttribute} (Safi safi)}
\label{classMPReachNLRIAttribute_a83fcabe9c3f6f606909cb41768ef5de4}

\item 
\hypertarget{classMPReachNLRIAttribute_aa4ae9df93c6c7ed67ad7ed1071b19919}{
{\footnotesize template$<$$>$ }\\{\bfseries MPReachNLRIAttribute} (Safi safi)}
\label{classMPReachNLRIAttribute_aa4ae9df93c6c7ed67ad7ed1071b19919}

\item 
\hypertarget{classMPReachNLRIAttribute_a27247d3b18d6fe1b16bdac5d40ebf5ea}{
{\footnotesize template$<$$>$ }\\{\bfseries MPReachNLRIAttribute} (const uint8\_\-t $\ast$d) throw(CorruptMessage)}
\label{classMPReachNLRIAttribute_a27247d3b18d6fe1b16bdac5d40ebf5ea}

\item 
\hypertarget{classMPReachNLRIAttribute_a41f2dfe1ba33cd9166628028080e41ef}{
{\footnotesize template$<$$>$ }\\{\bfseries MPReachNLRIAttribute} (const uint8\_\-t $\ast$d) throw(CorruptMessage)}
\label{classMPReachNLRIAttribute_a41f2dfe1ba33cd9166628028080e41ef}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classMPReachNLRIAttribute_ac49081a4f0fcd8271e3a789f71409e8b}{
Afi {\bfseries \_\-afi}}
\label{classMPReachNLRIAttribute_ac49081a4f0fcd8271e3a789f71409e8b}

\item 
\hypertarget{classMPReachNLRIAttribute_ad7d8da9fa03f9a20e38a119519c7dd36}{
Safi {\bfseries \_\-safi}}
\label{classMPReachNLRIAttribute_ad7d8da9fa03f9a20e38a119519c7dd36}

\item 
\hypertarget{classMPReachNLRIAttribute_a5a1952078e1400a172c78acd926c0a9c}{
A {\bfseries \_\-nexthop}}
\label{classMPReachNLRIAttribute_a5a1952078e1400a172c78acd926c0a9c}

\item 
\hypertarget{classMPReachNLRIAttribute_afb7b5bea5ad5577163ff3b534feac31d}{
list$<$ \hyperlink{classIPNet}{IPNet}$<$ A $>$ $>$ {\bfseries \_\-nlri}}
\label{classMPReachNLRIAttribute_afb7b5bea5ad5577163ff3b534feac31d}

\item 
\hypertarget{classMPReachNLRIAttribute_adcab52f491b46841d5084cd6e655301a}{
A {\bfseries \_\-link\_\-local\_\-next\_\-hop}}
\label{classMPReachNLRIAttribute_adcab52f491b46841d5084cd6e655301a}

\end{DoxyCompactItemize}
\subsubsection*{template$<$class A$>$ class MPReachNLRIAttribute$<$ A $>$}



\subsection{Member Function Documentation}
\hypertarget{classMPReachNLRIAttribute_a5dd35c7cd812e9ba9a246cfaf98099bf}{
\index{MPReachNLRIAttribute@{MPReachNLRIAttribute}!clone@{clone}}
\index{clone@{clone}!MPReachNLRIAttribute@{MPReachNLRIAttribute}}
\subsubsection[{clone}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ {\bf PathAttribute} $\ast$ {\bf MPReachNLRIAttribute}$<$ A $>$::clone (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classMPReachNLRIAttribute_a5dd35c7cd812e9ba9a246cfaf98099bf}


Make a copy of \hyperlink{protocolthe-p}{the} current attribute. 

The derived class should use new to generate a copy of itself. The wire format representation will not be used by \hyperlink{protocolthe-p}{the} caller. 

Implements \hyperlink{classPathAttribute_a17f0c215d2873317797a899b7ac58ef6}{PathAttribute}.

\hypertarget{classMPReachNLRIAttribute_a62ea5585aa5c6396a3d64d385afa5327}{
\index{MPReachNLRIAttribute@{MPReachNLRIAttribute}!encode@{encode}}
\index{encode@{encode}!MPReachNLRIAttribute@{MPReachNLRIAttribute}}
\subsubsection[{encode}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf MPReachNLRIAttribute}$<$ A $>$::encode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{buf, }
\item[{size\_\-t \&}]{wire\_\-size, }
\item[{const {\bf BGPPeerData} $\ast$}]{peerdata}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classMPReachNLRIAttribute_a62ea5585aa5c6396a3d64d385afa5327}


encode a path attribute. 

In a sane world, we'd use a virtual function for this. But we store so many path attributes that we can't afford \hyperlink{protocolthe-p}{the} overhead of a virtual function table for them, so we have to do this \hyperlink{protocolthe-p}{the} hard way

XXX THE ABOVE IS NO LONGER THE CASE. WE SHOULD REWRITE THIS TO USE VIRTUAL FUNCTIONS 

Implements \hyperlink{classPathAttribute_a5570039d9cd5e255bb187fd245861e09}{PathAttribute}.

\hypertarget{classMPReachNLRIAttribute_ad27993a2093f4b8e782e36559c08936c}{
\index{MPReachNLRIAttribute@{MPReachNLRIAttribute}!encode@{encode}}
\index{encode@{encode}!MPReachNLRIAttribute@{MPReachNLRIAttribute}}
\subsubsection[{encode}]{\setlength{\rightskip}{0pt plus 5cm}template$<$$>$ bool {\bf MPReachNLRIAttribute}$<$ {\bf IPv6} $>$::encode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{buf, }
\item[{size\_\-t \&}]{wire\_\-size, }
\item[{const {\bf BGPPeerData} $\ast$}]{peerdata}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classMPReachNLRIAttribute_ad27993a2093f4b8e782e36559c08936c}
This is an optional non-\/transitive attribute that can be used for \hyperlink{protocolthe-p}{the} following purposes:

(a) to advertise a feasible route to a peer

(b) to permit a router to advertise \hyperlink{protocolthe-p}{the} Network Layer address of \hyperlink{protocolthe-p}{the} router that should be used as \hyperlink{protocolthe-p}{the} next hop to \hyperlink{protocolthe-p}{the} destinations listed in \hyperlink{protocolthe-p}{the} Network Layer Reachability Information field of \hyperlink{protocolthe-p}{the} MP\_\-NLRI attribute.

(c) to allow a given router to report some or all of \hyperlink{protocolthe-p}{the} Subnetwork Points of Attachment (SNPAs) that exist within \hyperlink{protocolthe-p}{the} local system 

Implements \hyperlink{classPathAttribute_a5570039d9cd5e255bb187fd245861e09}{PathAttribute}.

\hypertarget{classMPReachNLRIAttribute_a1ae23a5269fedf2a4f9b00eabc6a945f}{
\index{MPReachNLRIAttribute@{MPReachNLRIAttribute}!encode@{encode}}
\index{encode@{encode}!MPReachNLRIAttribute@{MPReachNLRIAttribute}}
\subsubsection[{encode}]{\setlength{\rightskip}{0pt plus 5cm}template$<$$>$ bool {\bf MPReachNLRIAttribute}$<$ {\bf IPv4} $>$::encode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{buf, }
\item[{size\_\-t \&}]{wire\_\-size, }
\item[{const {\bf BGPPeerData} $\ast$}]{peerdata}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classMPReachNLRIAttribute_a1ae23a5269fedf2a4f9b00eabc6a945f}


encode a path attribute. 

In a sane world, we'd use a virtual function for this. But we store so many path attributes that we can't afford \hyperlink{protocolthe-p}{the} overhead of a virtual function table for them, so we have to do this \hyperlink{protocolthe-p}{the} hard way

XXX THE ABOVE IS NO LONGER THE CASE. WE SHOULD REWRITE THIS TO USE VIRTUAL FUNCTIONS 

Implements \hyperlink{classPathAttribute_a5570039d9cd5e255bb187fd245861e09}{PathAttribute}.

\hypertarget{classMPReachNLRIAttribute_a39ab7416fff06a01ef07192a74466b24}{
\index{MPReachNLRIAttribute@{MPReachNLRIAttribute}!str@{str}}
\index{str@{str}!MPReachNLRIAttribute@{MPReachNLRIAttribute}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ string {\bf MPReachNLRIAttribute}$<$ A $>$::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classMPReachNLRIAttribute_a39ab7416fff06a01ef07192a74466b24}


We need to encode an attribute to send to a peer. 

However we only have \hyperlink{protocolthe-p}{the} canonically encoded byte stream data for it. Sometimes that is fine, and we should just send that; sometimes we need to decode and re-\/encode for this specific peer. 

Reimplemented from \hyperlink{classPathAttribute_aae2900e4b96589e10291f96d3f584b6e}{PathAttribute}.



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