\hypertarget{classBGPPeer}{
\section{BGPPeer Class Reference}
\label{classBGPPeer}\index{BGPPeer@{BGPPeer}}
}
Inheritance diagram for BGPPeer:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classBGPPeer}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPeer_a5d2365c5029012e48ebeb4fe5cee2b40}{
{\bfseries BGPPeer} (\hyperlink{classLocalData}{LocalData} $\ast$ld, \hyperlink{classBGPPeerData}{BGPPeerData} $\ast$pd, \hyperlink{classSocketClient}{SocketClient} $\ast$sock, \hyperlink{classBGPMain}{BGPMain} $\ast$m)}
\label{classBGPPeer_a5d2365c5029012e48ebeb4fe5cee2b40}

\item 
\hypertarget{classBGPPeer_a6f91c7421704ac84cf9fb413a729a108}{
uint32\_\-t \hyperlink{classBGPPeer_a6f91c7421704ac84cf9fb413a729a108}{get\_\-unique\_\-id} () const }
\label{classBGPPeer_a6f91c7421704ac84cf9fb413a729a108}

\begin{DoxyCompactList}\small\item\em Get this peers unique ID. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_a3a8e5221f1b30fd9a134c6b17ecaa387}{
void \hyperlink{classBGPPeer_a3a8e5221f1b30fd9a134c6b17ecaa387}{zero\_\-stats} ()}
\label{classBGPPeer_a3a8e5221f1b30fd9a134c6b17ecaa387}

\begin{DoxyCompactList}\small\item\em Zero all \hyperlink{protocolthe-p}{the} stats counters. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_aeefaba32bd188817128f35f2236494a4}{
void \hyperlink{classBGPPeer_aeefaba32bd188817128f35f2236494a4}{clear\_\-last\_\-error} ()}
\label{classBGPPeer_aeefaba32bd188817128f35f2236494a4}

\begin{DoxyCompactList}\small\item\em Clear \hyperlink{protocolthe-p}{the} last error. \item\end{DoxyCompactList}\item 
\hyperlink{classBGPPeerData}{BGPPeerData} $\ast$ \hyperlink{classBGPPeer_a1ce6751964aa3c5c1c0a2ef9085fde24}{swap\_\-peerdata} (\hyperlink{classBGPPeerData}{BGPPeerData} $\ast$pd)
\begin{DoxyCompactList}\small\item\em Replace \hyperlink{protocolthe-p}{the} old peerdata with a new copy. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_ae0de7dd22a762211a1349bb6f2105717}{
void {\bfseries connected} (\hyperlink{classXorpFd}{XorpFd} s)}
\label{classBGPPeer_ae0de7dd22a762211a1349bb6f2105717}

\item 
\hypertarget{classBGPPeer_a79c8f04eecd4d4c8dd78c6f9fcfae80f}{
void {\bfseries remove\_\-accept\_\-attempt} (\hyperlink{classAcceptSession}{AcceptSession} $\ast$conn)}
\label{classBGPPeer_a79c8f04eecd4d4c8dd78c6f9fcfae80f}

\item 
\hypertarget{classBGPPeer_a567b3fa7a6658b74b1164b5441c04cde}{
\hyperlink{classSocketClient}{SocketClient} $\ast$ {\bfseries swap\_\-sockets} (\hyperlink{classSocketClient}{SocketClient} $\ast$new\_\-sock)}
\label{classBGPPeer_a567b3fa7a6658b74b1164b5441c04cde}

\item 
\hypertarget{classBGPPeer_aa5fe45986ada17230c3b688d8b439ec6}{
\hyperlink{classXorpFd}{XorpFd} {\bfseries get\_\-sock} ()}
\label{classBGPPeer_aa5fe45986ada17230c3b688d8b439ec6}

\item 
\hypertarget{classBGPPeer_a65fb43a1b9fa5a3b9afb3d0476b076f1}{
void \hyperlink{classBGPPeer_a65fb43a1b9fa5a3b9afb3d0476b076f1}{event\_\-start} ()}
\label{classBGPPeer_a65fb43a1b9fa5a3b9afb3d0476b076f1}

\begin{DoxyCompactList}\small\item\em state machine handlers for \hyperlink{protocolthe-p}{the} various BGP events \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_a2ecd22a411841b22ce90fda06b175d20}{
void {\bfseries event\_\-stop} (bool restart=false, bool automatic=false)}
\label{classBGPPeer_a2ecd22a411841b22ce90fda06b175d20}

\item 
\hypertarget{classBGPPeer_ac6f04d688c4a45eca6f39ba8a4364ff4}{
void {\bfseries event\_\-open} ()}
\label{classBGPPeer_ac6f04d688c4a45eca6f39ba8a4364ff4}

\item 
\hypertarget{classBGPPeer_aeb856856ccbffc812c2fbe1a3f5d06a9}{
void {\bfseries event\_\-open} (const \hyperlink{classXorpFd}{XorpFd} sock)}
\label{classBGPPeer_aeb856856ccbffc812c2fbe1a3f5d06a9}

\item 
\hypertarget{classBGPPeer_afc80188ce9f68a619c2e4ab670a38d39}{
void {\bfseries event\_\-closed} ()}
\label{classBGPPeer_afc80188ce9f68a619c2e4ab670a38d39}

\item 
\hypertarget{classBGPPeer_a0942cc592a34dd5c18372c64c69a0d78}{
void {\bfseries event\_\-openfail} ()}
\label{classBGPPeer_a0942cc592a34dd5c18372c64c69a0d78}

\item 
\hypertarget{classBGPPeer_ac84ef9d146eafb01bb7c98e9ba54d136}{
void {\bfseries event\_\-tranfatal} ()}
\label{classBGPPeer_ac84ef9d146eafb01bb7c98e9ba54d136}

\item 
\hypertarget{classBGPPeer_a13ad777a553068048183595ba99197eb}{
void {\bfseries event\_\-connexp} ()}
\label{classBGPPeer_a13ad777a553068048183595ba99197eb}

\item 
\hypertarget{classBGPPeer_a7d28c7e8cf8ab1bce3164dd88a4ce705}{
void {\bfseries event\_\-holdexp} ()}
\label{classBGPPeer_a7d28c7e8cf8ab1bce3164dd88a4ce705}

\item 
\hypertarget{classBGPPeer_a6d7ff7779e5c9ac23b54150fe347238f}{
void {\bfseries event\_\-keepexp} ()}
\label{classBGPPeer_a6d7ff7779e5c9ac23b54150fe347238f}

\item 
\hypertarget{classBGPPeer_aeea1074fc77c9c7a0725fa7fd2f65e74}{
void {\bfseries event\_\-delay\_\-open\_\-exp} ()}
\label{classBGPPeer_aeea1074fc77c9c7a0725fa7fd2f65e74}

\item 
\hypertarget{classBGPPeer_a9310ddb4749a7361e4c878a45ef7b18f}{
void {\bfseries event\_\-idle\_\-hold\_\-exp} ()}
\label{classBGPPeer_a9310ddb4749a7361e4c878a45ef7b18f}

\item 
\hypertarget{classBGPPeer_aaf5a70f3ef157c6f220d2f2d310ed81c}{
void {\bfseries event\_\-openmess} (const \hyperlink{classOpenPacket}{OpenPacket} \&p)}
\label{classBGPPeer_aaf5a70f3ef157c6f220d2f2d310ed81c}

\item 
\hypertarget{classBGPPeer_a0943762be71aa9217b4fff3a857b35bb}{
void {\bfseries event\_\-keepmess} ()}
\label{classBGPPeer_a0943762be71aa9217b4fff3a857b35bb}

\item 
\hypertarget{classBGPPeer_abe4157747bba1422c3fa902b71447f9c}{
void {\bfseries event\_\-recvupdate} (\hyperlink{classUpdatePacket}{UpdatePacket} \&p)}
\label{classBGPPeer_abe4157747bba1422c3fa902b71447f9c}

\item 
\hypertarget{classBGPPeer_a6f42938fe96a01e40f00f2f8014053df}{
void {\bfseries event\_\-recvnotify} (const \hyperlink{classNotificationPacket}{NotificationPacket} \&p)}
\label{classBGPPeer_a6f42938fe96a01e40f00f2f8014053df}

\item 
\hypertarget{classBGPPeer_a06b59a883745c6908f0fc7647690d742}{
void {\bfseries generate\_\-open\_\-message} (\hyperlink{classOpenPacket}{OpenPacket} \&open)}
\label{classBGPPeer_a06b59a883745c6908f0fc7647690d742}

\item 
\hypertarget{classBGPPeer_a960b4a652d3c0dc72c9b04e50982babb}{
void {\bfseries notify\_\-peer\_\-of\_\-error} (const int error, const int subcode=UNSPECIFIED, const uint8\_\-t $\ast$data=0, const size\_\-t len=0)}
\label{classBGPPeer_a960b4a652d3c0dc72c9b04e50982babb}

\item 
\hypertarget{classBGPPeer_ac0788a09305f874b7b9b8a4f8a68d255}{
FSMState {\bfseries state} ()}
\label{classBGPPeer_ac0788a09305f874b7b9b8a4f8a68d255}

\item 
\hypertarget{classBGPPeer_a095804bd1674e70b8b16bbe7cceb103c}{
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classBGPPeer_a095804bd1674e70b8b16bbe7cceb103c}{jitter} (const \hyperlink{classTimeVal}{TimeVal} \&t)}
\label{classBGPPeer_a095804bd1674e70b8b16bbe7cceb103c}

\begin{DoxyCompactList}\small\item\em If jitter is globally enabled apply it to \hyperlink{protocolthe-p}{the} time provided otherwise just return \hyperlink{protocolthe-p}{the} input time. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_a523a9cc538e8cc0d45fb96dcaf27c0d5}{
void {\bfseries clear\_\-all\_\-timers} ()}
\label{classBGPPeer_a523a9cc538e8cc0d45fb96dcaf27c0d5}

\item 
\hypertarget{classBGPPeer_a2d648b62d31916e94c318ac6937a1001}{
void {\bfseries start\_\-connect\_\-retry\_\-timer} ()}
\label{classBGPPeer_a2d648b62d31916e94c318ac6937a1001}

\item 
\hypertarget{classBGPPeer_ab00b4501d72304d54f9d9f41fabfb273}{
void {\bfseries clear\_\-connect\_\-retry\_\-timer} ()}
\label{classBGPPeer_ab00b4501d72304d54f9d9f41fabfb273}

\item 
\hypertarget{classBGPPeer_a3d5bd3ccbdc75a1883101ad75f45b742}{
void {\bfseries restart\_\-connect\_\-retry\_\-timer} ()}
\label{classBGPPeer_a3d5bd3ccbdc75a1883101ad75f45b742}

\item 
\hypertarget{classBGPPeer_aaa9d73f5d511d051cd99223df10a9e3a}{
void {\bfseries start\_\-keepalive\_\-timer} ()}
\label{classBGPPeer_aaa9d73f5d511d051cd99223df10a9e3a}

\item 
\hypertarget{classBGPPeer_a59fef90e8df4b66cb74768a5a515d2f4}{
void {\bfseries clear\_\-keepalive\_\-timer} ()}
\label{classBGPPeer_a59fef90e8df4b66cb74768a5a515d2f4}

\item 
\hypertarget{classBGPPeer_a68dd4fc42025142e5a79c05912e42e72}{
void {\bfseries start\_\-hold\_\-timer} ()}
\label{classBGPPeer_a68dd4fc42025142e5a79c05912e42e72}

\item 
\hypertarget{classBGPPeer_a24c1ade87c0df9d7d354e80f12d50ce1}{
void {\bfseries clear\_\-hold\_\-timer} ()}
\label{classBGPPeer_a24c1ade87c0df9d7d354e80f12d50ce1}

\item 
\hypertarget{classBGPPeer_a0a49120145e9673fe7ca037364fc3c36}{
void {\bfseries restart\_\-hold\_\-timer} ()}
\label{classBGPPeer_a0a49120145e9673fe7ca037364fc3c36}

\item 
\hypertarget{classBGPPeer_a73026e71ef72dfa737ea68e63a5ff819}{
void {\bfseries start\_\-stopped\_\-timer} ()}
\label{classBGPPeer_a73026e71ef72dfa737ea68e63a5ff819}

\item 
\hypertarget{classBGPPeer_a6a9e49ab5a6b255bb4f93d1f40933d39}{
void {\bfseries clear\_\-stopped\_\-timer} ()}
\label{classBGPPeer_a6a9e49ab5a6b255bb4f93d1f40933d39}

\item 
\hypertarget{classBGPPeer_aa8b06f20dd97e93acfafadd8c8592ac8}{
void {\bfseries start\_\-idle\_\-hold\_\-timer} ()}
\label{classBGPPeer_aa8b06f20dd97e93acfafadd8c8592ac8}

\item 
\hypertarget{classBGPPeer_a19b7f0a46cc286bd34300d85e58db448}{
void {\bfseries clear\_\-idle\_\-hold\_\-timer} ()}
\label{classBGPPeer_a19b7f0a46cc286bd34300d85e58db448}

\item 
bool \hyperlink{classBGPPeer_a74935bcb433a8a2afd4590dea4608704}{running\_\-idle\_\-hold\_\-timer} () const 
\item 
\hypertarget{classBGPPeer_a325dcf07c05a07722c245ded12aa39aa}{
void {\bfseries start\_\-delay\_\-open\_\-timer} ()}
\label{classBGPPeer_a325dcf07c05a07722c245ded12aa39aa}

\item 
\hypertarget{classBGPPeer_aa8976a4d723b0f3c7287d3b98541084c}{
void {\bfseries clear\_\-delay\_\-open\_\-timer} ()}
\label{classBGPPeer_aa8976a4d723b0f3c7287d3b98541084c}

\item 
\hypertarget{classBGPPeer_ac7d4be732265ac79c1c5cf26d3b74a8a}{
bool {\bfseries get\_\-message} (\hyperlink{classBGPPacket_a7558c3d07c1ac60abf3253e012964147}{BGPPacket::Status} status, const uint8\_\-t $\ast$buf, size\_\-t len, \hyperlink{classSocketClient}{SocketClient} $\ast$socket\_\-client)}
\label{classBGPPeer_ac7d4be732265ac79c1c5cf26d3b74a8a}

\item 
\hypertarget{classBGPPeer_ad87ef1587012cb272df5e1281ce9d6a1}{
PeerOutputState {\bfseries send\_\-message} (const \hyperlink{classBGPPacket}{BGPPacket} \&p)}
\label{classBGPPeer_ad87ef1587012cb272df5e1281ce9d6a1}

\item 
\hypertarget{classBGPPeer_a90cb4777bccde81346e949f89a2ab2e6}{
void {\bfseries send\_\-message\_\-complete} (SocketClient::Event, const uint8\_\-t $\ast$buf)}
\label{classBGPPeer_a90cb4777bccde81346e949f89a2ab2e6}

\item 
\hypertarget{classBGPPeer_a09ca22f093ae16c53513415a65eeac0d}{
string {\bfseries str} () const }
\label{classBGPPeer_a09ca22f093ae16c53513415a65eeac0d}

\item 
\hypertarget{classBGPPeer_a3b2eeb8b4c8c3cf182fcc5ef097cd532}{
bool {\bfseries is\_\-connected} () const }
\label{classBGPPeer_a3b2eeb8b4c8c3cf182fcc5ef097cd532}

\item 
\hypertarget{classBGPPeer_a26829dc87c3b618fc6a466d9af909f14}{
bool {\bfseries still\_\-reading} () const }
\label{classBGPPeer_a26829dc87c3b618fc6a466d9af909f14}

\item 
\hypertarget{classBGPPeer_a878db63ba399558bba3eb192c33422d2}{
\hyperlink{classLocalData}{LocalData} $\ast$ {\bfseries localdata} ()}
\label{classBGPPeer_a878db63ba399558bba3eb192c33422d2}

\item 
\hypertarget{classBGPPeer_a5c9ae770841583a8bc98bc5d9d61d866}{
\hyperlink{classIPv4}{IPv4} {\bfseries id} () const }
\label{classBGPPeer_a5c9ae770841583a8bc98bc5d9d61d866}

\item 
\hypertarget{classBGPPeer_a7b8838ca0ff95ed7f71bfdc148aa9f95}{
\hyperlink{classBGPMain}{BGPMain} $\ast$ {\bfseries main} () const }
\label{classBGPPeer_a7b8838ca0ff95ed7f71bfdc148aa9f95}

\item 
\hypertarget{classBGPPeer_ad84d8ff4e76deb6ccb03d241b036ae1f}{
const \hyperlink{classBGPPeerData}{BGPPeerData} $\ast$ {\bfseries peerdata} () const }
\label{classBGPPeer_ad84d8ff4e76deb6ccb03d241b036ae1f}

\item 
\hypertarget{classBGPPeer_a3bf36736d821b52bb0b6ebbc5f8818ea}{
bool {\bfseries ibgp} () const }
\label{classBGPPeer_a3bf36736d821b52bb0b6ebbc5f8818ea}

\item 
\hypertarget{classBGPPeer_a6406d271b87fa881f05b9271a8fa20cb}{
bool {\bfseries use\_\-4byte\_\-asnums} () const }
\label{classBGPPeer_a6406d271b87fa881f05b9271a8fa20cb}

\item 
\hypertarget{classBGPPeer_a4c5c536ef28e81805a012eedb8ce45e8}{
bool {\bfseries we\_\-use\_\-4byte\_\-asnums} () const }
\label{classBGPPeer_a4c5c536ef28e81805a012eedb8ce45e8}

\item 
\hypertarget{classBGPPeer_a1157bf978f8d61a0e0dde4d2f5cb7f3a}{
bool \hyperlink{classBGPPeer_a1157bf978f8d61a0e0dde4d2f5cb7f3a}{send\_\-netreachability} (const \hyperlink{classBGPUpdateAttrib}{BGPUpdateAttrib} \&n)}
\label{classBGPPeer_a1157bf978f8d61a0e0dde4d2f5cb7f3a}

\begin{DoxyCompactList}\small\item\em send \hyperlink{protocolthe-p}{the} netreachability message, return send result. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_ae07dfd55ea4c3f522fb26e09bad48e08}{
virtual PeerOutputState {\bfseries send\_\-update\_\-message} (const \hyperlink{classUpdatePacket}{UpdatePacket} \&p)}
\label{classBGPPeer_ae07dfd55ea4c3f522fb26e09bad48e08}

\item 
\hypertarget{classBGPPeer_af594e4f57f95f760178c85e90d5faf1f}{
uint32\_\-t {\bfseries get\_\-established\_\-transitions} () const }
\label{classBGPPeer_af594e4f57f95f760178c85e90d5faf1f}

\item 
\hypertarget{classBGPPeer_a63c4623547a59f0a7eea6305cec4deae}{
uint32\_\-t {\bfseries get\_\-established\_\-time} () const }
\label{classBGPPeer_a63c4623547a59f0a7eea6305cec4deae}

\item 
\hypertarget{classBGPPeer_a68f2d2e5514c6976bafd921987adbe0c}{
void {\bfseries get\_\-msg\_\-stats} (uint32\_\-t \&in\_\-updates, uint32\_\-t \&out\_\-updates, uint32\_\-t \&in\_\-msgs, uint32\_\-t \&out\_\-msgs, uint16\_\-t \&last\_\-error, uint32\_\-t \&in\_\-update\_\-elapsed) const }
\label{classBGPPeer_a68f2d2e5514c6976bafd921987adbe0c}

\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPeer_a47e31e02c3f060d8a88a33e4d4847ea4}{
static const char $\ast$ {\bfseries pretty\_\-print\_\-state} (FSMState s)}
\label{classBGPPeer_a47e31e02c3f060d8a88a33e4d4847ea4}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPeer_a168433ea0f37f138eda417ab24de1aef}{
void {\bfseries connect\_\-to\_\-peer} (\hyperlink{classSocketClient_a80fca2c612913e2ec8e2c68440b7e3ee}{SocketClient::ConnectCallback} cb)}
\label{classBGPPeer_a168433ea0f37f138eda417ab24de1aef}

\item 
\hypertarget{classBGPPeer_abfd296baaf50e84878205ee336bceb88}{
void {\bfseries connect\_\-to\_\-peer\_\-complete} (bool success)}
\label{classBGPPeer_abfd296baaf50e84878205ee336bceb88}

\item 
\hypertarget{classBGPPeer_a0d1497d4f69fa7fb2783c0c37449844e}{
void {\bfseries send\_\-notification} (const \hyperlink{classNotificationPacket}{NotificationPacket} \&p, bool restart=true, bool automatic=true)}
\label{classBGPPeer_a0d1497d4f69fa7fb2783c0c37449844e}

\item 
\hypertarget{classBGPPeer_a25b11c2b014fb59aeed054d9fca84147}{
void {\bfseries send\_\-notification\_\-complete} (SocketClient::Event, const uint8\_\-t $\ast$buf, bool restart, bool automatic)}
\label{classBGPPeer_a25b11c2b014fb59aeed054d9fca84147}

\item 
\hypertarget{classBGPPeer_a0a9be0470462674c0819e694ba5af10d}{
void {\bfseries flush\_\-transmit\_\-queue} ()}
\label{classBGPPeer_a0a9be0470462674c0819e694ba5af10d}

\item 
\hypertarget{classBGPPeer_af8f8530e2aeedc5b9c4901f2d8c784b7}{
void {\bfseries stop\_\-reader} ()}
\label{classBGPPeer_af8f8530e2aeedc5b9c4901f2d8c784b7}

\item 
\hypertarget{classBGPPeer_acf02db0863aa4d0cab8c0a69d981011d}{
void {\bfseries hook\_\-stopped} ()}
\label{classBGPPeer_acf02db0863aa4d0cab8c0a69d981011d}

\item 
\hypertarget{classBGPPeer_a94d7c36faa8c20b281b63a6480ab4df5}{
void {\bfseries check\_\-open\_\-packet} (const \hyperlink{classOpenPacket}{OpenPacket} $\ast$p)  throw (CorruptMessage)}
\label{classBGPPeer_a94d7c36faa8c20b281b63a6480ab4df5}

\item 
\hypertarget{classBGPPeer_a30d5f0cc81a5a06fa916fb379324e5b4}{
\hyperlink{classNotificationPacket}{NotificationPacket} $\ast$ {\bfseries check\_\-update\_\-packet} (const \hyperlink{classUpdatePacket}{UpdatePacket} $\ast$p, bool \&good\_\-nexthop)}
\label{classBGPPeer_a30d5f0cc81a5a06fa916fb379324e5b4}

\item 
\hypertarget{classBGPPeer_a446b5196bd0bdf5f1bc9e26949d3f527}{
bool \hyperlink{classBGPPeer_a446b5196bd0bdf5f1bc9e26949d3f527}{established} ()}
\label{classBGPPeer_a446b5196bd0bdf5f1bc9e26949d3f527}

\begin{DoxyCompactList}\small\item\em Called \hyperlink{protocolthe-p}{the} first time that we go to \hyperlink{protocolthe-p}{the} established state. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_a7e374879206923bf5e0854becbdcb3a9}{
bool {\bfseries release\_\-resources} ()}
\label{classBGPPeer_a7e374879206923bf5e0854becbdcb3a9}

\item 
void \hyperlink{classBGPPeer_a28d4914baa7551c82923d99dfac7af35}{set\_\-state} (FSMState s, bool restart=true, bool automatic=true)
\begin{DoxyCompactList}\small\item\em move to \hyperlink{protocolthe-p}{the} desired state, plus does some additional work to clean up existing state and possibly retrying to open/connect if restart = true \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_ac9cb05be2111473703e713688ad8ff85}{
bool {\bfseries remote\_\-ip\_\-ge\_\-than} (const \hyperlink{classBGPPeer}{BGPPeer} \&peer)}
\label{classBGPPeer_ac9cb05be2111473703e713688ad8ff85}

\item 
void \hyperlink{classBGPPeer_a61af2a5a79f8a94fb79cb1bc90a52873}{automatic\_\-restart} ()
\begin{DoxyCompactList}\small\item\em Called every time there is an automatic restart. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_a0511311142b49382dbbd331e5611c39e}{
void {\bfseries set\_\-current\_\-peer\_\-state} (bool state)}
\label{classBGPPeer_a0511311142b49382dbbd331e5611c39e}

\item 
\hypertarget{classBGPPeer_ab0a472fe841f0f985f1088fdb6ca676d}{
bool {\bfseries get\_\-current\_\-peer\_\-state} ()}
\label{classBGPPeer_ab0a472fe841f0f985f1088fdb6ca676d}

\item 
\hypertarget{classBGPPeer_af2f468526c925a5fede9c7782bb1072e}{
void {\bfseries set\_\-next\_\-peer\_\-state} (bool state)}
\label{classBGPPeer_af2f468526c925a5fede9c7782bb1072e}

\item 
\hypertarget{classBGPPeer_a66fa458b8fbfac18c9b3a5977366fb37}{
bool {\bfseries get\_\-next\_\-peer\_\-state} ()}
\label{classBGPPeer_a66fa458b8fbfac18c9b3a5977366fb37}

\item 
\hypertarget{classBGPPeer_a306f13bfc5b1fd37b178ef02748655a0}{
void {\bfseries set\_\-activate\_\-state} (bool state)}
\label{classBGPPeer_a306f13bfc5b1fd37b178ef02748655a0}

\item 
\hypertarget{classBGPPeer_a808f99154299037a68ef621ce95fdc19}{
bool {\bfseries get\_\-activate\_\-state} ()}
\label{classBGPPeer_a808f99154299037a68ef621ce95fdc19}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPeer_a204dc220b5b5beccd532cbdecdb98244}{
\hyperlink{classLocalData}{LocalData} $\ast$ {\bfseries \_\-localdata}}
\label{classBGPPeer_a204dc220b5b5beccd532cbdecdb98244}

\item 
\hypertarget{classBGPPeer_af526d160fc3c7f07dd654a92096f475a}{
const uint32\_\-t {\bfseries \_\-unique\_\-id}}
\label{classBGPPeer_af526d160fc3c7f07dd654a92096f475a}

\item 
\hypertarget{classBGPPeer_ac5219ddae15e542f2a562dafd901b1f0}{
\hyperlink{classSocketClient}{SocketClient} $\ast$ {\bfseries \_\-SocketClient}}
\label{classBGPPeer_ac5219ddae15e542f2a562dafd901b1f0}

\item 
\hypertarget{classBGPPeer_a48b7f9d1c1a694449d6abd0e42051aba}{
bool {\bfseries \_\-output\_\-queue\_\-was\_\-busy}}
\label{classBGPPeer_a48b7f9d1c1a694449d6abd0e42051aba}

\item 
\hypertarget{classBGPPeer_a08a76df8d8532aa19f0f12e92c4bb4db}{
FSMState {\bfseries \_\-state}}
\label{classBGPPeer_a08a76df8d8532aa19f0f12e92c4bb4db}

\item 
\hypertarget{classBGPPeer_a375b0f2a095a7fb33b38a36efe679617}{
\hyperlink{classBGPPeerData}{BGPPeerData} $\ast$ {\bfseries \_\-peerdata}}
\label{classBGPPeer_a375b0f2a095a7fb33b38a36efe679617}

\item 
\hypertarget{classBGPPeer_a6bc79177736808f6ae47850ded950f15}{
\hyperlink{classBGPMain}{BGPMain} $\ast$ {\bfseries \_\-mainprocess}}
\label{classBGPPeer_a6bc79177736808f6ae47850ded950f15}

\item 
\hypertarget{classBGPPeer_afd944b97f6f5b4a7c38dbf2455c68145}{
\hyperlink{classPeerHandler}{PeerHandler} $\ast$ {\bfseries \_\-handler}}
\label{classBGPPeer_afd944b97f6f5b4a7c38dbf2455c68145}

\item 
\hypertarget{classBGPPeer_a33968f37e701bab6ff98a61a4b5f88e8}{
list$<$ \hyperlink{classAcceptSession}{AcceptSession} $\ast$ $>$ {\bfseries \_\-accept\_\-attempt}}
\label{classBGPPeer_a33968f37e701bab6ff98a61a4b5f88e8}

\item 
\hypertarget{classBGPPeer_a4ede54e9258edbb107a587f3e0dfdc9a}{
string {\bfseries \_\-peername}}
\label{classBGPPeer_a4ede54e9258edbb107a587f3e0dfdc9a}

\item 
\hypertarget{classBGPPeer_a293d0711663d5d40b241d650d1eb3a9a}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-timer\_\-connect\_\-retry}}
\label{classBGPPeer_a293d0711663d5d40b241d650d1eb3a9a}

\item 
\hypertarget{classBGPPeer_a7f2b0d8fd9fbfb48a4550fe6f517e4a9}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-timer\_\-hold\_\-time}}
\label{classBGPPeer_a7f2b0d8fd9fbfb48a4550fe6f517e4a9}

\item 
\hypertarget{classBGPPeer_a74b89f399e430ed2f7344a9323451194}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-timer\_\-keep\_\-alive}}
\label{classBGPPeer_a74b89f399e430ed2f7344a9323451194}

\item 
\hypertarget{classBGPPeer_a6a73318d926e5d0fad4e875a9bdaf0d6}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-idle\_\-hold}}
\label{classBGPPeer_a6a73318d926e5d0fad4e875a9bdaf0d6}

\item 
\hypertarget{classBGPPeer_a1f9233b5c66f4c3b17ba177d7e9d550d}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-delay\_\-open}}
\label{classBGPPeer_a1f9233b5c66f4c3b17ba177d7e9d550d}

\item 
\hypertarget{classBGPPeer_ab5f16336dc69755b0dea06cf3a389453}{
uint32\_\-t {\bfseries \_\-in\_\-updates}}
\label{classBGPPeer_ab5f16336dc69755b0dea06cf3a389453}

\item 
\hypertarget{classBGPPeer_a56beb9954cbd90a97127ae1aa9904467}{
uint32\_\-t {\bfseries \_\-out\_\-updates}}
\label{classBGPPeer_a56beb9954cbd90a97127ae1aa9904467}

\item 
\hypertarget{classBGPPeer_a68c35309a839d9f36bd0000bca994dde}{
uint32\_\-t {\bfseries \_\-in\_\-total\_\-messages}}
\label{classBGPPeer_a68c35309a839d9f36bd0000bca994dde}

\item 
\hypertarget{classBGPPeer_ae56d75116e7304f34efc992ddcb11f27}{
uint32\_\-t {\bfseries \_\-out\_\-total\_\-messages}}
\label{classBGPPeer_ae56d75116e7304f34efc992ddcb11f27}

\item 
\hypertarget{classBGPPeer_a799c8fceb9e8dec40a9cbf44ad86a559}{
uint8\_\-t {\bfseries \_\-last\_\-error} \mbox{[}2\mbox{]}}
\label{classBGPPeer_a799c8fceb9e8dec40a9cbf44ad86a559}

\item 
\hypertarget{classBGPPeer_af31d68017e2a3bed0aae34d5ad4c4c64}{
uint32\_\-t {\bfseries \_\-established\_\-transitions}}
\label{classBGPPeer_af31d68017e2a3bed0aae34d5ad4c4c64}

\item 
\hypertarget{classBGPPeer_a682983a1c158fe17cf22ccbaa1c6abc2}{
\hyperlink{classTimeVal}{TimeVal} {\bfseries \_\-established\_\-time}}
\label{classBGPPeer_a682983a1c158fe17cf22ccbaa1c6abc2}

\item 
\hypertarget{classBGPPeer_a3a274a7f50198aab49ee6878b24d5961}{
\hyperlink{classTimeVal}{TimeVal} {\bfseries \_\-in\_\-update\_\-time}}
\label{classBGPPeer_a3a274a7f50198aab49ee6878b24d5961}

\item 
\hypertarget{classBGPPeer_a582a3c027b961d79fad1439b2e4cf1a6}{
\hyperlink{classXorpTimer}{XorpTimer} \hyperlink{classBGPPeer_a582a3c027b961d79fad1439b2e4cf1a6}{\_\-timer\_\-stopped}}
\label{classBGPPeer_a582a3c027b961d79fad1439b2e4cf1a6}

\begin{DoxyCompactList}\small\item\em This timer is to break us out of \hyperlink{protocolthe-p}{the} stopped state. \item\end{DoxyCompactList}\item 
\hypertarget{classBGPPeer_a719ad86eb52b61079de23c3d8c2ea983}{
bool {\bfseries \_\-damping\_\-peer\_\-oscillations}}
\label{classBGPPeer_a719ad86eb52b61079de23c3d8c2ea983}

\item 
\hypertarget{classBGPPeer_a961ea59204d5b1d9b18b240dae4fc186}{
\hyperlink{classDampPeerOscillations}{DampPeerOscillations} {\bfseries \_\-damp\_\-peer\_\-oscillations}}
\label{classBGPPeer_a961ea59204d5b1d9b18b240dae4fc186}

\item 
\hypertarget{classBGPPeer_a9d864b012b566ae80ae0cfbe960db441}{
bool {\bfseries \_\-current\_\-state}}
\label{classBGPPeer_a9d864b012b566ae80ae0cfbe960db441}

\item 
\hypertarget{classBGPPeer_a7dd868f28391791e337d9e07f3636e93}{
bool {\bfseries \_\-next\_\-state}}
\label{classBGPPeer_a7dd868f28391791e337d9e07f3636e93}

\item 
\hypertarget{classBGPPeer_a2094150a02bccea5fd24a5f3a31c5ec6}{
bool {\bfseries \_\-activated}}
\label{classBGPPeer_a2094150a02bccea5fd24a5f3a31c5ec6}

\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPeer_a0f96fcbfd0f112e0d186a1ff0cd4772c}{
static uint32\_\-t \hyperlink{classBGPPeer_a0f96fcbfd0f112e0d186a1ff0cd4772c}{\_\-unique\_\-id\_\-allocator} = UNIQUE\_\-ID\_\-START}
\label{classBGPPeer_a0f96fcbfd0f112e0d186a1ff0cd4772c}

\begin{DoxyCompactList}\small\item\em For \hyperlink{protocolthe-p}{the} processing in decision every peer requires a unique ID. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBGPPeer_a2a5c67ccdafaaf2e6dfdc36999255954}{
class \hyperlink{classBGPPeer_a2a5c67ccdafaaf2e6dfdc36999255954}{BGPPeerList}}
\label{classBGPPeer_a2a5c67ccdafaaf2e6dfdc36999255954}

\item 
\hypertarget{classBGPPeer_add673ade0f98475defe2fa8df4a7c85d}{
class \hyperlink{classBGPPeer_add673ade0f98475defe2fa8df4a7c85d}{BGPMain}}
\label{classBGPPeer_add673ade0f98475defe2fa8df4a7c85d}

\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{classBGPPeer_a61af2a5a79f8a94fb79cb1bc90a52873}{
\index{BGPPeer@{BGPPeer}!automatic\_\-restart@{automatic\_\-restart}}
\index{automatic\_\-restart@{automatic\_\-restart}!BGPPeer@{BGPPeer}}
\subsubsection[{automatic\_\-restart}]{\setlength{\rightskip}{0pt plus 5cm}void BGPPeer::automatic\_\-restart (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classBGPPeer_a61af2a5a79f8a94fb79cb1bc90a52873}


Called every time there is an automatic restart. 

Used for tracking peer damp oscillations. \hypertarget{classBGPPeer_a74935bcb433a8a2afd4590dea4608704}{
\index{BGPPeer@{BGPPeer}!running\_\-idle\_\-hold\_\-timer@{running\_\-idle\_\-hold\_\-timer}}
\index{running\_\-idle\_\-hold\_\-timer@{running\_\-idle\_\-hold\_\-timer}!BGPPeer@{BGPPeer}}
\subsubsection[{running\_\-idle\_\-hold\_\-timer}]{\setlength{\rightskip}{0pt plus 5cm}bool BGPPeer::running\_\-idle\_\-hold\_\-timer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classBGPPeer_a74935bcb433a8a2afd4590dea4608704}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} idle hold timer is running. 
\end{DoxyReturn}
\hypertarget{classBGPPeer_a28d4914baa7551c82923d99dfac7af35}{
\index{BGPPeer@{BGPPeer}!set\_\-state@{set\_\-state}}
\index{set\_\-state@{set\_\-state}!BGPPeer@{BGPPeer}}
\subsubsection[{set\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}void BGPPeer::set\_\-state (
\begin{DoxyParamCaption}
\item[{FSMState}]{s, }
\item[{bool}]{restart = {\ttfamily true}, }
\item[{bool}]{automatic = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classBGPPeer_a28d4914baa7551c82923d99dfac7af35}


move to \hyperlink{protocolthe-p}{the} desired state, plus does some additional work to clean up existing state and possibly retrying to open/connect if restart = true 


\begin{DoxyParams}{Parameters}
{\em restart} & if true and this is a transition to idle restart \hyperlink{protocolthe-p}{the} connection. \\
\hline
{\em automatic} & if \hyperlink{protocolthe-p}{the} transition is to idle and automatic restart has been request. This is not a manual restart. \\
\hline
\end{DoxyParams}
\hypertarget{classBGPPeer_a1ce6751964aa3c5c1c0a2ef9085fde24}{
\index{BGPPeer@{BGPPeer}!swap\_\-peerdata@{swap\_\-peerdata}}
\index{swap\_\-peerdata@{swap\_\-peerdata}!BGPPeer@{BGPPeer}}
\subsubsection[{swap\_\-peerdata}]{\setlength{\rightskip}{0pt plus 5cm}{\bf BGPPeerData}$\ast$ BGPPeer::swap\_\-peerdata (
\begin{DoxyParamCaption}
\item[{{\bf BGPPeerData} $\ast$}]{pd}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classBGPPeer_a1ce6751964aa3c5c1c0a2ef9085fde24}


Replace \hyperlink{protocolthe-p}{the} old peerdata with a new copy. 

It is \hyperlink{protocolthe-p}{the} responsiblity of \hyperlink{protocolthe-p}{the} caller to free \hyperlink{protocolthe-p}{the} memory. 

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