\hypertarget{classBGPPacket}{
\section{BGPPacket Class Reference}
\label{classBGPPacket}\index{BGPPacket@{BGPPacket}}
}


The main container for BGP messages (packets) which are sent back and forth.  




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

Inheritance diagram for BGPPacket:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classBGPPacket}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{classBGPPacket_a7558c3d07c1ac60abf3253e012964147}{Status} \{ {\bfseries GOOD\_\-MESSAGE}, 
{\bfseries ILLEGAL\_\-MESSAGE\_\-LENGTH}, 
{\bfseries CONNECTION\_\-CLOSED}
 \}
\begin{DoxyCompactList}\small\item\em Status returned by message reader. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPacket_ad66877bf3120ace17d3181d6ee8faee9}{
uint8\_\-t {\bfseries type} () const }
\label{classBGPPacket_ad66877bf3120ace17d3181d6ee8faee9}

\item 
\hypertarget{classBGPPacket_ac8c8b5164a3cacf9ff5f7c3a7be33206}{
virtual string {\bfseries str} () const =0}
\label{classBGPPacket_ac8c8b5164a3cacf9ff5f7c3a7be33206}

\item 
\hypertarget{classBGPPacket_a022098ebc7f965ea5f054689ecf913c9}{
virtual bool {\bfseries encode} (uint8\_\-t $\ast$buf, size\_\-t \&len, const \hyperlink{classBGPPeerData}{BGPPeerData} $\ast$peerdata) const =0}
\label{classBGPPacket_a022098ebc7f965ea5f054689ecf913c9}

\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPacket_a2c497d69d83e9da808c77a7fbfb0b6c0}{
static const size\_\-t {\bfseries MARKER\_\-SIZE} = 16}
\label{classBGPPacket_a2c497d69d83e9da808c77a7fbfb0b6c0}

\item 
static const size\_\-t {\bfseries COMMON\_\-HEADER\_\-LEN}
\item 
\hypertarget{classBGPPacket_a7cb2bbbd5db6a193d20c4958d80b7fde}{
static const size\_\-t {\bfseries MARKER\_\-OFFSET} = 0}
\label{classBGPPacket_a7cb2bbbd5db6a193d20c4958d80b7fde}

\item 
\hypertarget{classBGPPacket_a8700592dbd48b521677a9b1e39b50d77}{
static const size\_\-t {\bfseries LENGTH\_\-OFFSET} = MARKER\_\-SIZE}
\label{classBGPPacket_a8700592dbd48b521677a9b1e39b50d77}

\item 
\hypertarget{classBGPPacket_a2843fde75bd4c03317f089d965323c8a}{
static const size\_\-t {\bfseries TYPE\_\-OFFSET} = LENGTH\_\-OFFSET + sizeof(uint16\_\-t)}
\label{classBGPPacket_a2843fde75bd4c03317f089d965323c8a}

\item 
\hypertarget{classBGPPacket_a4816c39c1644521ee8060364c62e74ff}{
static const size\_\-t {\bfseries MINPACKETSIZE} = COMMON\_\-HEADER\_\-LEN}
\label{classBGPPacket_a4816c39c1644521ee8060364c62e74ff}

\item 
\hypertarget{classBGPPacket_a0e07fbd1e71055ac8b6b7f0d30b7932d}{
static const size\_\-t {\bfseries MAXPACKETSIZE} = 4096}
\label{classBGPPacket_a0e07fbd1e71055ac8b6b7f0d30b7932d}

\item 
\hypertarget{classBGPPacket_ae5cb9c8cf4ec42f8f5eb4f2aa1e03033}{
static const size\_\-t {\bfseries MINOPENPACKET} = COMMON\_\-HEADER\_\-LEN + 10}
\label{classBGPPacket_ae5cb9c8cf4ec42f8f5eb4f2aa1e03033}

\item 
\hypertarget{classBGPPacket_af568307867ffe72b365aec7eab03a5a0}{
static const size\_\-t {\bfseries MINUPDATEPACKET} = COMMON\_\-HEADER\_\-LEN + 2 + 2}
\label{classBGPPacket_af568307867ffe72b365aec7eab03a5a0}

\item 
\hypertarget{classBGPPacket_a4f261bc7e4ee3baa20c3c4274bce3cfe}{
static const size\_\-t {\bfseries MINKEEPALIVEPACKET} = COMMON\_\-HEADER\_\-LEN}
\label{classBGPPacket_a4f261bc7e4ee3baa20c3c4274bce3cfe}

\item 
\hypertarget{classBGPPacket_a6a9de8bb4da3de8babae3da7a221a24a}{
static const size\_\-t {\bfseries MINNOTIFICATIONPACKET} = COMMON\_\-HEADER\_\-LEN + 2}
\label{classBGPPacket_a6a9de8bb4da3de8babae3da7a221a24a}

\item 
static const uint8\_\-t {\bfseries Marker} \mbox{[}MARKER\_\-SIZE\mbox{]}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPacket_af49da4f58068de82889da1ff494e9e7a}{
uint8\_\-t $\ast$ {\bfseries basic\_\-encode} (size\_\-t len, uint8\_\-t $\ast$buf) const }
\label{classBGPPacket_af49da4f58068de82889da1ff494e9e7a}

\item 
\hypertarget{classBGPPacket_ae7b10d217a31e2a2b59b2104aa7e8b57}{
{\bfseries BGPPacket} (const \hyperlink{classBGPPacket}{BGPPacket} \&\hyperlink{classBGPPacket}{BGPPacket})}
\label{classBGPPacket_ae7b10d217a31e2a2b59b2104aa7e8b57}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPacket_ac4543c09aec6c70ea6c4948934052c50}{
uint8\_\-t {\bfseries \_\-Type}}
\label{classBGPPacket_ac4543c09aec6c70ea6c4948934052c50}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
The main container for BGP messages (packets) which are sent back and forth. This base class only contains \hyperlink{protocolthe-p}{the} standard fields (length, type) leaving other information to be stored in \hyperlink{protocolthe-p}{the} derived objects. 

\subsection{Member Data Documentation}
\hypertarget{classBGPPacket_a5e25e872de6dba586e280fbf6d5deb3e}{
\index{BGPPacket@{BGPPacket}!COMMON\_\-HEADER\_\-LEN@{COMMON\_\-HEADER\_\-LEN}}
\index{COMMON\_\-HEADER\_\-LEN@{COMMON\_\-HEADER\_\-LEN}!BGPPacket@{BGPPacket}}
\subsubsection[{COMMON\_\-HEADER\_\-LEN}]{\setlength{\rightskip}{0pt plus 5cm}const size\_\-t BGPPacket::COMMON\_\-HEADER\_\-LEN\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classBGPPacket_a5e25e872de6dba586e280fbf6d5deb3e}
{\bfseries Initial value:}
\begin{DoxyCode}
 MARKER_SIZE
                + sizeof(uint16_t) + sizeof(uint8_t)
\end{DoxyCode}
\hypertarget{classBGPPacket_a4a317c363922fcb8a5eb3c829fc987f8}{
\index{BGPPacket@{BGPPacket}!Marker@{Marker}}
\index{Marker@{Marker}!BGPPacket@{BGPPacket}}
\subsubsection[{Marker}]{\setlength{\rightskip}{0pt plus 5cm}const uint8\_\-t BGPPacket::Marker\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classBGPPacket_a4a317c363922fcb8a5eb3c829fc987f8}
{\bfseries Initial value:}
\begin{DoxyCode}
 {
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
}
\end{DoxyCode}


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