\hypertarget{classMEDAttribute}{
\section{MEDAttribute Class Reference}
\label{classMEDAttribute}\index{MEDAttribute@{MEDAttribute}}
}


\hyperlink{classMEDAttribute}{MEDAttribute} is an optional non-\/transitive uint32.  




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

Inheritance diagram for MEDAttribute:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classMEDAttribute}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classMEDAttribute_a812d7e4a014ce918cfec5dd9961b8aef}{
\hyperlink{classMEDAttribute_a812d7e4a014ce918cfec5dd9961b8aef}{MEDAttribute} (const uint32\_\-t med)}
\label{classMEDAttribute_a812d7e4a014ce918cfec5dd9961b8aef}

\begin{DoxyCompactList}\small\item\em \hyperlink{classMEDAttribute}{MEDAttribute}. \item\end{DoxyCompactList}\item 
\hypertarget{classMEDAttribute_a0e34f7265b0410348e53b30b0cdb5610}{
{\bfseries MEDAttribute} (const uint8\_\-t $\ast$d)  throw (CorruptMessage)}
\label{classMEDAttribute_a0e34f7265b0410348e53b30b0cdb5610}

\item 
\hyperlink{classPathAttribute}{PathAttribute} $\ast$ \hyperlink{classMEDAttribute_a52fd73cf7581249ed8b6fd1318079c04}{clone} () const 
\begin{DoxyCompactList}\small\item\em Make a copy of \hyperlink{protocolthe-p}{the} current attribute. \item\end{DoxyCompactList}\item 
string \hyperlink{classMEDAttribute_a3f26c68d7df98b666803ce29e5f4fb96}{str} () const 
\begin{DoxyCompactList}\small\item\em We need to encode an attribute to send to a peer. \item\end{DoxyCompactList}\item 
\hypertarget{classMEDAttribute_aa7f0661b7d101936132288b15cc09c82}{
uint32\_\-t {\bfseries med} () const }
\label{classMEDAttribute_aa7f0661b7d101936132288b15cc09c82}

\item 
bool \hyperlink{classMEDAttribute_a7e486966334d9187c25eac5e2afcd776}{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{classMEDAttribute_a5c76fc696905b8c5a36e3f777e8f51ae}{
uint32\_\-t {\bfseries \_\-med}}
\label{classMEDAttribute_a5c76fc696905b8c5a36e3f777e8f51ae}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classMEDAttribute}{MEDAttribute} is an optional non-\/transitive uint32. 

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


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


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


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}
