\hypertarget{classAS4PathAttribute}{
\section{AS4PathAttribute Class Reference}
\label{classAS4PathAttribute}\index{AS4PathAttribute@{AS4PathAttribute}}
}


\hyperlink{classAS4PathAttribute}{AS4PathAttribute} contain an \hyperlink{classAS4Path}{AS4Path}, whose structure is documented in \hyperlink{aspath_8hh_source}{aspath.hh}.  




{\ttfamily \#include $<$path\_\-attribute.hh$>$}

Inheritance diagram for AS4PathAttribute:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classAS4PathAttribute}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classAS4PathAttribute_ac45e7733ab28e3f55c11a0e910794c5a}{
{\bfseries AS4PathAttribute} (const \hyperlink{classAS4Path}{AS4Path} \&p)}
\label{classAS4PathAttribute_ac45e7733ab28e3f55c11a0e910794c5a}

\item 
\hypertarget{classAS4PathAttribute_a882854e6aa1bfcb44195a3d45be2cdcb}{
{\bfseries AS4PathAttribute} (const uint8\_\-t $\ast$d)  throw (CorruptMessage)}
\label{classAS4PathAttribute_a882854e6aa1bfcb44195a3d45be2cdcb}

\item 
\hyperlink{classPathAttribute}{PathAttribute} $\ast$ \hyperlink{classAS4PathAttribute_ab2a74dab628b24d42cf356522d3ec05b}{clone} () const 
\begin{DoxyCompactList}\small\item\em Make a copy of \hyperlink{protocolthe-p}{the} current attribute. \item\end{DoxyCompactList}\item 
string \hyperlink{classAS4PathAttribute_aa91426d659c864f5fb7b312394bca8e4}{str} () const 
\begin{DoxyCompactList}\small\item\em We need to encode an attribute to send to a peer. \item\end{DoxyCompactList}\item 
\hypertarget{classAS4PathAttribute_ae40eab66ce9532e33d2728aff6e9d26d}{
\hyperlink{classASPath}{ASPath} \& {\bfseries as\_\-path} () const }
\label{classAS4PathAttribute_ae40eab66ce9532e33d2728aff6e9d26d}

\item 
\hypertarget{classAS4PathAttribute_af778a68b5b6ab203e3a850ce50da03a3}{
\hyperlink{classAS4Path}{AS4Path} \& {\bfseries as4\_\-path} () const }
\label{classAS4PathAttribute_af778a68b5b6ab203e3a850ce50da03a3}

\item 
bool \hyperlink{classAS4PathAttribute_a232d40fec1ebdce36a87c9dbf01695ad}{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}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classAS4PathAttribute_ab09e71c53d9e3a7b65e4c482d60c57f7}{
\hyperlink{classAS4Path}{AS4Path} $\ast$ {\bfseries \_\-as\_\-path}}
\label{classAS4PathAttribute_ab09e71c53d9e3a7b65e4c482d60c57f7}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classAS4PathAttribute}{AS4PathAttribute} contain an \hyperlink{classAS4Path}{AS4Path}, whose structure is documented in \hyperlink{aspath_8hh_source}{aspath.hh}. See comment there for usage. 

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


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{classAS4PathAttribute_a232d40fec1ebdce36a87c9dbf01695ad}{
\index{AS4PathAttribute@{AS4PathAttribute}!encode@{encode}}
\index{encode@{encode}!AS4PathAttribute@{AS4PathAttribute}}
\subsubsection[{encode}]{\setlength{\rightskip}{0pt plus 5cm}bool AS4PathAttribute::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{classAS4PathAttribute_a232d40fec1ebdce36a87c9dbf01695ad}


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{classAS4PathAttribute_aa91426d659c864f5fb7b312394bca8e4}{
\index{AS4PathAttribute@{AS4PathAttribute}!str@{str}}
\index{str@{str}!AS4PathAttribute@{AS4PathAttribute}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string AS4PathAttribute::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classAS4PathAttribute_aa91426d659c864f5fb7b312394bca8e4}


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}
