\hypertarget{classCommunityAttribute}{
\section{CommunityAttribute Class Reference}
\label{classCommunityAttribute}\index{CommunityAttribute@{CommunityAttribute}}
}
Inheritance diagram for CommunityAttribute:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classCommunityAttribute}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classCommunityAttribute_ac5d9703407db9dc44df88a29aee11b05}{
typedef set$<$ uint32\_\-t $>$::const\_\-iterator {\bfseries const\_\-iterator}}
\label{classCommunityAttribute_ac5d9703407db9dc44df88a29aee11b05}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classCommunityAttribute_a0676ac389e2c58694ed4c7c2a9c50e67}{
\hyperlink{classCommunityAttribute_a0676ac389e2c58694ed4c7c2a9c50e67}{CommunityAttribute} ()}
\label{classCommunityAttribute_a0676ac389e2c58694ed4c7c2a9c50e67}

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

\item 
\hyperlink{classPathAttribute}{PathAttribute} $\ast$ \hyperlink{classCommunityAttribute_a2b8fc4fe8d7c7092170e69bdb49df471}{clone} () const 
\begin{DoxyCompactList}\small\item\em Make a copy of \hyperlink{protocolthe-p}{the} current attribute. \item\end{DoxyCompactList}\item 
string \hyperlink{classCommunityAttribute_a2e50e5974c1500b528cdb44068035ed6}{str} () const 
\begin{DoxyCompactList}\small\item\em We need to encode an attribute to send to a peer. \item\end{DoxyCompactList}\item 
\hypertarget{classCommunityAttribute_aac3df2ec8b70aafa5b8bf5cf4f30d8b5}{
const set$<$ uint32\_\-t $>$ \& {\bfseries community\_\-set} () const }
\label{classCommunityAttribute_aac3df2ec8b70aafa5b8bf5cf4f30d8b5}

\item 
\hypertarget{classCommunityAttribute_aa2d188107f525a0ea512cf72ac988460}{
void {\bfseries add\_\-community} (uint32\_\-t community)}
\label{classCommunityAttribute_aa2d188107f525a0ea512cf72ac988460}

\item 
\hypertarget{classCommunityAttribute_a370e1f28a29f63a8db86823b42e8e35f}{
bool {\bfseries contains} (uint32\_\-t community) const }
\label{classCommunityAttribute_a370e1f28a29f63a8db86823b42e8e35f}

\item 
bool \hyperlink{classCommunityAttribute_addd4f1a3745742ffe91ffe31dfe6d9a9}{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*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classCommunityAttribute_af012ab194573f70e4fb99b627885c175}{
static const uint32\_\-t {\bfseries NO\_\-EXPORT} = 0xFFFFFF01}
\label{classCommunityAttribute_af012ab194573f70e4fb99b627885c175}

\item 
\hypertarget{classCommunityAttribute_a35aefa23b891b95fd9c208102fafe201}{
static const uint32\_\-t {\bfseries NO\_\-ADVERTISE} = 0xFFFFFF02}
\label{classCommunityAttribute_a35aefa23b891b95fd9c208102fafe201}

\item 
\hypertarget{classCommunityAttribute_a0b7a9ae4089e663d85f769fbdd547979}{
static const uint32\_\-t {\bfseries NO\_\-EXPORT\_\-SUBCONFED} = 0xFFFFFF03}
\label{classCommunityAttribute_a0b7a9ae4089e663d85f769fbdd547979}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classCommunityAttribute_a828b062187de4e4cf08ca9e92effa9e1}{
set$<$ uint32\_\-t $>$ {\bfseries \_\-communities}}
\label{classCommunityAttribute_a828b062187de4e4cf08ca9e92effa9e1}

\end{DoxyCompactItemize}


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


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


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


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}
