\hypertarget{classFaceManager}{
\section{FaceManager Class Reference}
\label{classFaceManager}\index{FaceManager@{FaceManager}}
}


Class which manages all interface bindings in \hyperlink{protocolthe-p}{the} OLSR routing process.  




{\ttfamily \#include $<$face\_\-manager.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFaceManager_ae1357cbf6c6dc8062d32f0c8ee3184ad}{
{\bfseries FaceManager} (\hyperlink{classOlsr}{Olsr} \&olsr, \hyperlink{classEventLoop}{EventLoop} \&ev)}
\label{classFaceManager_ae1357cbf6c6dc8062d32f0c8ee3184ad}

\item 
\hypertarget{classFaceManager_a7e917bad97a4775bf9666564981eed30}{
\hyperlink{classMessageDecoder}{MessageDecoder} \& {\bfseries message\_\-decoder} ()}
\label{classFaceManager_a7e917bad97a4775bf9666564981eed30}

\item 
\hypertarget{classFaceManager_a4412fa0008e3f05f3a8cb97055317f9a}{
\hyperlink{classNeighborhood}{Neighborhood} $\ast$ {\bfseries neighborhood} ()}
\label{classFaceManager_a4412fa0008e3f05f3a8cb97055317f9a}

\item 
\hypertarget{classFaceManager_a13144125f75d26cd2426c3ba247532e3}{
void {\bfseries set\_\-neighborhood} (\hyperlink{classNeighborhood}{Neighborhood} $\ast$nh)}
\label{classFaceManager_a13144125f75d26cd2426c3ba247532e3}

\item 
uint32\_\-t \hyperlink{classFaceManager_a20faed5b2eb8af4f717a7e5211066093}{get\_\-face\_\-count} () const 
\item 
const \hyperlink{classFace}{Face} $\ast$ \hyperlink{classFaceManager_a7d90dbf4854aede2ea55bc2dbcb8baf2}{get\_\-face\_\-by\_\-id} (const \hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid) const   throw (BadFace)
\begin{DoxyCompactList}\small\item\em Get a pointer to a \hyperlink{classFace}{Face} given its ID. \item\end{DoxyCompactList}\item 
void \hyperlink{classFaceManager_a0ed1fb8714baa376ec90f507a0dd7ffa}{get\_\-face\_\-list} (list$<$ \hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} $>$ \&face\_\-list) const 
\begin{DoxyCompactList}\small\item\em Fill out a list of all face IDs. \item\end{DoxyCompactList}\item 
\hyperlink{classIPv4}{IPv4} \hyperlink{classFaceManager_a8ce368259fd3bc2f6b7cb3022f978789}{get\_\-main\_\-addr} () const 
\item 
bool \hyperlink{classFaceManager_adc582039445dbbb0fa3f2ea0436f2e47}{set\_\-main\_\-addr} (const \hyperlink{classIPv4}{IPv4} \&addr)
\begin{DoxyCompactList}\small\item\em Attempt to set main address on node. \item\end{DoxyCompactList}\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_a9cf7d3b9d72c156a889686fa861aac92}{get\_\-mid\_\-interval} () const 
\item 
void \hyperlink{classFaceManager_af1d85cfe08134b83632f809537bd955d}{set\_\-mid\_\-interval} (const \hyperlink{classTimeVal}{TimeVal} \&interval)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} MID\_\-INTERVAL protocol variable. \item\end{DoxyCompactList}\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_a2afa1e543992f9ac086b732af625140c}{get\_\-mid\_\-hold\_\-time} () const 
\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_a38f8b0d19c13561e5d89a0cb7ef0b0c1}{get\_\-dup\_\-hold\_\-time} () const 
\item 
void \hyperlink{classFaceManager_aa944216fa0c6aaf881412b5812da950d}{set\_\-dup\_\-hold\_\-time} (const \hyperlink{classTimeVal}{TimeVal} \&dup\_\-hold\_\-time)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} hold time for duplicate messages. \item\end{DoxyCompactList}\item 
void \hyperlink{classFaceManager_a97afa43ccfb4303d31ca07dbe7a68ba5}{receive} (const string \&interface, const string \&vif, const \hyperlink{classIPv4}{IPv4} \&dst, const uint16\_\-t \&dport, const \hyperlink{classIPv4}{IPv4} \&src, const uint16\_\-t \&sport, uint8\_\-t $\ast$data, const uint32\_\-t \&len)
\begin{DoxyCompactList}\small\item\em Process a received datagram. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a498a3212db4c85e4db770172fb003160}{transmit} (const string \&interface, const string \&vif, const \hyperlink{classIPv4}{IPv4} \&dst, const uint16\_\-t \&dport, const \hyperlink{classIPv4}{IPv4} \&src, const uint16\_\-t \&sport, uint8\_\-t $\ast$data, const uint32\_\-t \&len)
\begin{DoxyCompactList}\small\item\em \hyperlink{classTransmit}{Transmit} a datagram. \item\end{DoxyCompactList}\item 
\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} \hyperlink{classFaceManager_a5fbb638b3c99d47f544b1111f9037eb3}{create\_\-face} (const string \&interface, const string \&vif)  throw (BadFace)
\begin{DoxyCompactList}\small\item\em Add a new interface. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a0847775c5642c571ff184a975e512bbc}{
void \hyperlink{classFaceManager_a0847775c5642c571ff184a975e512bbc}{clear\_\-faces} ()}
\label{classFaceManager_a0847775c5642c571ff184a975e512bbc}

\begin{DoxyCompactList}\small\item\em Clear \hyperlink{protocolthe-p}{the} interface list. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a916ccfc229adff9146fcc5c8ab7f784b}{activate\_\-face} (const string \&interface, const string \&vif)
\begin{DoxyCompactList}\small\item\em Activate \hyperlink{protocolthe-p}{the} OLSR binding to \hyperlink{protocolthe-p}{the} given interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a798e30bfc7509ad98ad9943a1878f1a4}{delete\_\-face} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid)
\begin{DoxyCompactList}\small\item\em Delete an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a2e8016021131de28e673b906121c1c6d}{recompute\_\-addresses\_\-face} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid)
\begin{DoxyCompactList}\small\item\em Recompute \hyperlink{protocolthe-p}{the} list of protocol addresses used by OLSR to send and receive protocol control traffic on this \hyperlink{classFace}{Face}. \item\end{DoxyCompactList}\item 
void \hyperlink{classFaceManager_a8eb1a6a1ae855e5132256bfb99a3685f}{vif\_\-status\_\-change} (const string \&interface, const string \&vif, bool state)
\begin{DoxyCompactList}\small\item\em Callback method to: Process a change of vif status from \hyperlink{protocolthe-p}{the} FEA. \item\end{DoxyCompactList}\item 
void \hyperlink{classFaceManager_a7a81941b9415679b34ddaeecdfc9e2fa}{address\_\-status\_\-change} (const string \&interface, const string \&vif, \hyperlink{classIPv4}{IPv4} addr, bool state)
\begin{DoxyCompactList}\small\item\em Callback method to: Process a change of address status from \hyperlink{protocolthe-p}{the} FEA. \item\end{DoxyCompactList}\item 
\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} \hyperlink{classFaceManager_ac1215dade53d133a1e8680f9ab895d04}{get\_\-faceid} (const string \&interface, const string \&vif)  throw (BadFace)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} ID of an interface, given its names as known to \hyperlink{protocolthe-p}{the} FEA. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a555c467018db1af3cb22e24508299b09}{get\_\-interface\_\-vif\_\-by\_\-faceid} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, string \&interface, string \&vif)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} FEA names of an interface, given its OLSR interface ID. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_abfc9f3b4c25e7c85a82a348c2128fb2b}{get\_\-interface\_\-cost} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, int \&cost)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} cost of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a9f8dbcea6a6fd215c1fdbced61f35aa1}{set\_\-face\_\-enabled} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, bool enabled)
\begin{DoxyCompactList}\small\item\em Enable \hyperlink{protocolthe-p}{the} OLSR binding on \hyperlink{protocolthe-p}{the} given interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_abab0b47d9e8be0d6dd3bdf8fb40235ab}{get\_\-face\_\-enabled} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \char`\"{}administratively up\char`\"{} status of an OLSR interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a44f61d7c7bd28ae59cc4c438985a902e}{set\_\-interface\_\-cost} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, const int cost)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} cost of an OLSR interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a7ec8e687dc7405ba2f8860d0497385cb}{set\_\-local\_\-addr} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, const \hyperlink{classIPv4}{IPv4} \&local\_\-addr)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} local address of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_ad09548cfe76ac576908c040971879911}{get\_\-local\_\-addr} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, \hyperlink{classIPv4}{IPv4} \&local\_\-addr)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} local address of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a21a0a7e899ecebf4b3f12e17f0a0122b}{set\_\-local\_\-port} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, const uint16\_\-t local\_\-port)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} UDP local port of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_ab2788eb3f227ba05fbe0999244fc1297}{get\_\-local\_\-port} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, uint16\_\-t \&local\_\-port)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} UDP local port of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_ac568c6b0693e7a887f8413635f50fac1}{set\_\-all\_\-nodes\_\-addr} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, const \hyperlink{classIPv4}{IPv4} \&all\_\-nodes\_\-addr)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} all-\/nodes address of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a73c090e63c6e9015cd51994edc3fbe43}{get\_\-all\_\-nodes\_\-addr} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, \hyperlink{classIPv4}{IPv4} \&all\_\-nodes\_\-addr)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} all-\/nodes address of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a5417375e2d289e765f671a38b2b43926}{set\_\-all\_\-nodes\_\-port} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, const uint16\_\-t all\_\-nodes\_\-port)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} UDP all-\/nodes port of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_ae43aafc81d0605a7f781a629cd1f569f}{get\_\-all\_\-nodes\_\-port} (\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} faceid, uint16\_\-t \&all\_\-nodes\_\-port)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} UDP all-\/nodes port of an interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_abda153b8eb9a126c99ea50cb4fa6fd3f}{flood\_\-message} (\hyperlink{classMessage}{Message} $\ast$message)
\begin{DoxyCompactList}\small\item\em Flood a message on all interfaces, performing appropriate fragmentation for each interface. \item\end{DoxyCompactList}\item 
uint16\_\-t \hyperlink{classFaceManager_a307af9f494462b55a9ac6ac5f1df9971}{get\_\-msg\_\-seqno} ()
\item 
\hypertarget{classFaceManager_aea84929991940ad563a7b208218150e9}{
void \hyperlink{classFaceManager_aea84929991940ad563a7b208218150e9}{stop\_\-all\_\-timers} ()}
\label{classFaceManager_aea84929991940ad563a7b208218150e9}

\begin{DoxyCompactList}\small\item\em Stop all timers (HELLO and MID). \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_aee0c7575a7fb3e8ab086c2a616d088b0}{
void {\bfseries start\_\-hello\_\-timer} ()}
\label{classFaceManager_aee0c7575a7fb3e8ab086c2a616d088b0}

\item 
\hypertarget{classFaceManager_a1c0ecae233545e7ad2332b91a8f5f728}{
void {\bfseries stop\_\-hello\_\-timer} ()}
\label{classFaceManager_a1c0ecae233545e7ad2332b91a8f5f728}

\item 
\hypertarget{classFaceManager_aa5d780f5aea159d641aff67c56fbaa78}{
void {\bfseries restart\_\-hello\_\-timer} ()}
\label{classFaceManager_aa5d780f5aea159d641aff67c56fbaa78}

\item 
\hypertarget{classFaceManager_abf0a0ab5967c3fd533f355a824a3486a}{
void \hyperlink{classFaceManager_abf0a0ab5967c3fd533f355a824a3486a}{reschedule\_\-hello\_\-timer} ()}
\label{classFaceManager_abf0a0ab5967c3fd533f355a824a3486a}

\begin{DoxyCompactList}\small\item\em Reschedule \hyperlink{protocolthe-p}{the} HELLO protocol timer, if its interval changed. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a44bcf56957e538eb5e48e2a2b3324ed7}{
void \hyperlink{classFaceManager_a44bcf56957e538eb5e48e2a2b3324ed7}{reschedule\_\-immediate\_\-hello\_\-timer} ()}
\label{classFaceManager_a44bcf56957e538eb5e48e2a2b3324ed7}

\begin{DoxyCompactList}\small\item\em Reschedule \hyperlink{protocolthe-p}{the} HELLO protocol timer to fire as soon as possible. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a6031eb022c1123433a9f2153e710173b}{
bool \hyperlink{classFaceManager_a6031eb022c1123433a9f2153e710173b}{event\_\-send\_\-hello} ()}
\label{classFaceManager_a6031eb022c1123433a9f2153e710173b}

\begin{DoxyCompactList}\small\item\em Broadcast a HELLO message on each enabled interface. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a09169d46bf877497d47d09c4bb97099a}{
void {\bfseries start\_\-mid\_\-timer} ()}
\label{classFaceManager_a09169d46bf877497d47d09c4bb97099a}

\item 
\hypertarget{classFaceManager_ad8e226d0eb9873d216cf3e04525653dc}{
void {\bfseries stop\_\-mid\_\-timer} ()}
\label{classFaceManager_ad8e226d0eb9873d216cf3e04525653dc}

\item 
\hypertarget{classFaceManager_ada1db5ae3370c934a4962b91cb3c15e6}{
void {\bfseries restart\_\-mid\_\-timer} ()}
\label{classFaceManager_ada1db5ae3370c934a4962b91cb3c15e6}

\item 
\hypertarget{classFaceManager_a8aca6d1394c7fb681e31f654abbb5e87}{
void \hyperlink{classFaceManager_a8aca6d1394c7fb681e31f654abbb5e87}{reschedule\_\-mid\_\-timer} ()}
\label{classFaceManager_a8aca6d1394c7fb681e31f654abbb5e87}

\begin{DoxyCompactList}\small\item\em Reschedule \hyperlink{protocolthe-p}{the} MID protocol timer, if its interval changed. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a40489219d1637d661e39924bc78e4fdc}{
void \hyperlink{classFaceManager_a40489219d1637d661e39924bc78e4fdc}{reschedule\_\-immediate\_\-mid\_\-timer} ()}
\label{classFaceManager_a40489219d1637d661e39924bc78e4fdc}

\begin{DoxyCompactList}\small\item\em Reschedule \hyperlink{protocolthe-p}{the} MID protocol timer to fire as soon as possible. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_aa0a15217b17dbf93e03c07b81c9742a3}{
bool \hyperlink{classFaceManager_aa0a15217b17dbf93e03c07b81c9742a3}{event\_\-send\_\-mid} ()}
\label{classFaceManager_aa0a15217b17dbf93e03c07b81c9742a3}

\begin{DoxyCompactList}\small\item\em Callback method to: \hyperlink{structSend}{Send} a MID message on each enabled interface. \item\end{DoxyCompactList}\item 
void \hyperlink{classFaceManager_a388d7f1464e783b805ce8c7b58aac7f6}{set\_\-hello\_\-interval} (const \hyperlink{classTimeVal}{TimeVal} \&interval)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} HELLO\_\-INTERVAL protocol variable. \item\end{DoxyCompactList}\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_ab2ffd5bb80d461e592859e8842714cec}{get\_\-hello\_\-interval} ()
\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_a6e9d32d91aa08f3ceb3324013d732219}{get\_\-max\_\-jitter} ()
\item 
uint32\_\-t \hyperlink{classFaceManager_a204c25368a0b45781e2bc3155edcfa0c}{get\_\-enabled\_\-face\_\-count} () const 
\item 
void \hyperlink{classFaceManager_a1647bf1d002e386ff185fc1bff2208de}{add\_\-message\_\-cb} (MessageReceiveCB cb)
\begin{DoxyCompactList}\small\item\em Register an OLSR protocol message handler. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_acffa6db7abb757315c2d0e49696acc16}{delete\_\-message\_\-cb} (MessageReceiveCB cb)
\begin{DoxyCompactList}\small\item\em Deregister an OLSR protocol message handler. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a1ab3940fb63415401e5e2ebafcfad1f1}{
bool \hyperlink{classFaceManager_a1ab3940fb63415401e5e2ebafcfad1f1}{event\_\-receive\_\-unknown} (\hyperlink{classMessage}{Message} $\ast$msg, const \hyperlink{classIPv4}{IPv4} \&remote\_\-addr, const \hyperlink{classIPv4}{IPv4} \&local\_\-addr)}
\label{classFaceManager_a1ab3940fb63415401e5e2ebafcfad1f1}

\begin{DoxyCompactList}\small\item\em Callback method to: forward a \hyperlink{classMessage}{Message} of unknown type to \hyperlink{protocolthe-p}{the} rest of \hyperlink{protocolthe-p}{the} OLSR topology. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a339f62b8b28cc3fee57d94b202dde268}{forward\_\-message} (const \hyperlink{classIPv4}{IPv4} \&remote\_\-addr, \hyperlink{classMessage}{Message} $\ast$msg)
\begin{DoxyCompactList}\small\item\em Implement \hyperlink{protocolthe-p}{the} Default Forwarding Algorithm (Section 3.4.1). \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_adba44c8535286d8799bd1899dd915644}{is\_\-duplicate\_\-message} (const \hyperlink{classMessage}{Message} $\ast$msg) const 
\begin{DoxyCompactList}\small\item\em Check if a message is a previously seen duplicate. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a4bb129427783171687be1d360c10ab8d}{is\_\-forwarded\_\-message} (const \hyperlink{classMessage}{Message} $\ast$msg) const 
\begin{DoxyCompactList}\small\item\em Check if a message should be forwarded, according to \hyperlink{protocolthe-p}{the} default forwarding rules. \item\end{DoxyCompactList}\item 
\hyperlink{classDupeTuple}{DupeTuple} $\ast$ \hyperlink{classFaceManager_ab2f3e34d6c08b381d763891ce455f694}{get\_\-dupetuple} (const \hyperlink{classIPv4}{IPv4} \&origin\_\-addr, const uint16\_\-t seqno) const 
\begin{DoxyCompactList}\small\item\em Get a pointer to a tuple in \hyperlink{protocolthe-p}{the} duplicate set for a message, given its origin address and sequence number. \item\end{DoxyCompactList}\item 
void \hyperlink{classFaceManager_ad1994646942442a5cd82b79f6fdb70fc}{update\_\-dupetuple} (const \hyperlink{classMessage}{Message} $\ast$msg, const bool is\_\-forwarded)
\begin{DoxyCompactList}\small\item\em Update or create an entry in \hyperlink{protocolthe-p}{the} duplicate message set. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a1bf1d5d3dda45a5b2561ce82754bb36d}{
void \hyperlink{classFaceManager_a1bf1d5d3dda45a5b2561ce82754bb36d}{event\_\-dupetuple\_\-expired} (const \hyperlink{classIPv4}{IPv4} \&origin, const uint16\_\-t seqno)}
\label{classFaceManager_a1bf1d5d3dda45a5b2561ce82754bb36d}

\begin{DoxyCompactList}\small\item\em Delete a duplicate set entry when it expires. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a482d87cff16f9cce541c08899493ef3b}{
void \hyperlink{classFaceManager_a482d87cff16f9cce541c08899493ef3b}{clear\_\-dupetuples} ()}
\label{classFaceManager_a482d87cff16f9cce541c08899493ef3b}

\begin{DoxyCompactList}\small\item\em Clear \hyperlink{protocolthe-p}{the} duplicate set. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFaceManager_a86282fc64646753cb5b2d3150afdc175}{is\_\-local\_\-addr} (const \hyperlink{classIPv4}{IPv4} \&addr)
\item 
bool \hyperlink{classFaceManager_a902a54a131fd3076026ee54a72ff830d}{get\_\-face\_\-stats} (const string \&ifname, const string \&vifname, \hyperlink{classFaceCounters}{FaceCounters} \&stats)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} statistics for \hyperlink{protocolthe-p}{the} given face. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
typedef multimap$<$ \hyperlink{classIPv4}{IPv4}, \hyperlink{classDupeTuple}{DupeTuple} $\ast$ $>$ \hyperlink{classFaceManager_ab0807b82ca641d45777ec1aa8d911e94}{DupeTupleMap}
\begin{DoxyCompactList}\small\item\em Maintain state about messages we may have already processed and/or forwarded. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFaceManager_a441f23b41711ff25af212b5e348d7da0}{
\hyperlink{classOlsr}{Olsr} \& {\bfseries \_\-olsr}}
\label{classFaceManager_a441f23b41711ff25af212b5e348d7da0}

\item 
\hypertarget{classFaceManager_add9d8058caa2249e6b5eb7da00132c00}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-eventloop}}
\label{classFaceManager_add9d8058caa2249e6b5eb7da00132c00}

\item 
\hypertarget{classFaceManager_a0769acab8d4bc381cc73ef3e650a6b30}{
\hyperlink{classMessageDecoder}{MessageDecoder} {\bfseries \_\-md}}
\label{classFaceManager_a0769acab8d4bc381cc73ef3e650a6b30}

\item 
\hypertarget{classFaceManager_a1bafe2a2994ac54bfc19926f8f7cfa5f}{
\hyperlink{classNeighborhood}{Neighborhood} $\ast$ {\bfseries \_\-nh}}
\label{classFaceManager_a1bafe2a2994ac54bfc19926f8f7cfa5f}

\item 
\hypertarget{classFaceManager_a87bd598b13763afb817293806b1690cc}{
\hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} {\bfseries \_\-next\_\-faceid}}
\label{classFaceManager_a87bd598b13763afb817293806b1690cc}

\item 
\hypertarget{classFaceManager_a2b2227d7c991da84d9ae20348e8ead83}{
uint32\_\-t {\bfseries \_\-enabled\_\-face\_\-count}}
\label{classFaceManager_a2b2227d7c991da84d9ae20348e8ead83}

\item 
\hypertarget{classFaceManager_adf0f404756c2a83a8321a2b09337ed19}{
uint16\_\-t \hyperlink{classFaceManager_adf0f404756c2a83a8321a2b09337ed19}{\_\-next\_\-msg\_\-seqno}}
\label{classFaceManager_adf0f404756c2a83a8321a2b09337ed19}

\begin{DoxyCompactList}\small\item\em The next available message sequence number. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a806727838506f8b693b9c3ebc3df9da6}{
\hyperlink{classIPv4}{IPv4} \hyperlink{classFaceManager_a806727838506f8b693b9c3ebc3df9da6}{\_\-main\_\-addr}}
\label{classFaceManager_a806727838506f8b693b9c3ebc3df9da6}

\begin{DoxyCompactList}\small\item\em primary protocol address of this node; used as 'origin' for OLSR control messages. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_afa56987c8f561d63386f64d247f12b28}{
vector$<$ MessageReceiveCB $>$ \hyperlink{classFaceManager_afa56987c8f561d63386f64d247f12b28}{\_\-handlers}}
\label{classFaceManager_afa56987c8f561d63386f64d247f12b28}

\begin{DoxyCompactList}\small\item\em Vector of message handlers. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a951c908b865c49aa478625e50d382055}{
map$<$ string, \hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID} $>$ \hyperlink{classFaceManager_a951c908b865c49aa478625e50d382055}{\_\-faceid\_\-map}}
\label{classFaceManager_a951c908b865c49aa478625e50d382055}

\begin{DoxyCompactList}\small\item\em Map interface/vif to \hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID}. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a7f567b973e2f6e1d5b319707cf53025c}{
map$<$ \hyperlink{structOlsrTypes_a0be5017ad053311658089d9a795c63ac}{OlsrTypes::FaceID}, \hyperlink{classFace}{Face} $\ast$ $>$ \hyperlink{classFaceManager_a7f567b973e2f6e1d5b319707cf53025c}{\_\-faces}}
\label{classFaceManager_a7f567b973e2f6e1d5b319707cf53025c}

\begin{DoxyCompactList}\small\item\em Map FaceID to \hyperlink{classFace}{Face}. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a5c5e6121fd55d31a53a303986d947d62}{
\hyperlink{classFaceManager_ab0807b82ca641d45777ec1aa8d911e94}{DupeTupleMap} {\bfseries \_\-duplicate\_\-set}}
\label{classFaceManager_a5c5e6121fd55d31a53a303986d947d62}

\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_a79016d0ae1bef6d1b067d28b11fc6fbc}{\_\-hello\_\-interval}
\begin{DoxyCompactList}\small\item\em The HELLO\_\-INTERVAL protocol control variable. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a5c20114e0851da5a7c9b3f07ffeb038d}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-hello\_\-timer}}
\label{classFaceManager_a5c20114e0851da5a7c9b3f07ffeb038d}

\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_a6589a4a628082c9955a63a36c8e2cbb8}{\_\-mid\_\-interval}
\begin{DoxyCompactList}\small\item\em The MID\_\-INTERVAL protocol control variable. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_a45eb676d0572cd03fb45181c55065a01}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-mid\_\-timer}}
\label{classFaceManager_a45eb676d0572cd03fb45181c55065a01}

\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classFaceManager_aa2104ba4f68a62fcffcbc99e4e16ecd0}{\_\-dup\_\-hold\_\-time}
\begin{DoxyCompactList}\small\item\em The DUP\_\-HOLD\_\-TIME protocol control variable. \item\end{DoxyCompactList}\item 
\hypertarget{classFaceManager_ad5c56f21ed9a88c493307464b3d7de8c}{
bool \hyperlink{classFaceManager_ad5c56f21ed9a88c493307464b3d7de8c}{\_\-is\_\-early\_\-mid\_\-enabled}}
\label{classFaceManager_ad5c56f21ed9a88c493307464b3d7de8c}

\begin{DoxyCompactList}\small\item\em true if a MID message should be queued as soon as \hyperlink{protocolthe-p}{the} set of configured interfaces changes. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class which manages all interface bindings in \hyperlink{protocolthe-p}{the} OLSR routing process. 

\subsection{Member Typedef Documentation}
\hypertarget{classFaceManager_ab0807b82ca641d45777ec1aa8d911e94}{
\index{FaceManager@{FaceManager}!DupeTupleMap@{DupeTupleMap}}
\index{DupeTupleMap@{DupeTupleMap}!FaceManager@{FaceManager}}
\subsubsection[{DupeTupleMap}]{\setlength{\rightskip}{0pt plus 5cm}typedef multimap$<${\bf IPv4}, {\bf DupeTuple}$\ast$$>$ {\bf FaceManager::DupeTupleMap}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFaceManager_ab0807b82ca641d45777ec1aa8d911e94}


Maintain state about messages we may have already processed and/or forwarded. 

HELLO messages are specifically excluded. Section 3.4: Duplicate Tuple. 

\subsection{Member Function Documentation}
\hypertarget{classFaceManager_a916ccfc229adff9146fcc5c8ab7f784b}{
\index{FaceManager@{FaceManager}!activate\_\-face@{activate\_\-face}}
\index{activate\_\-face@{activate\_\-face}!FaceManager@{FaceManager}}
\subsubsection[{activate\_\-face}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::activate\_\-face (
\begin{DoxyParamCaption}
\item[{const string \&}]{interface, }
\item[{const string \&}]{vif}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a916ccfc229adff9146fcc5c8ab7f784b}


Activate \hyperlink{protocolthe-p}{the} OLSR binding to \hyperlink{protocolthe-p}{the} given interface. 

This means recomputing address lists and choosing \hyperlink{protocolthe-p}{the} primary address on that interface; we do not yet support changing \hyperlink{protocolthe-p}{the} address used.

We do not bring up any sockets until \hyperlink{classFaceManager_a9f8dbcea6a6fd215c1fdbced61f35aa1}{set\_\-face\_\-enabled()}. \hypertarget{classFaceManager_a1647bf1d002e386ff185fc1bff2208de}{
\index{FaceManager@{FaceManager}!add\_\-message\_\-cb@{add\_\-message\_\-cb}}
\index{add\_\-message\_\-cb@{add\_\-message\_\-cb}!FaceManager@{FaceManager}}
\subsubsection[{add\_\-message\_\-cb}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::add\_\-message\_\-cb (
\begin{DoxyParamCaption}
\item[{MessageReceiveCB}]{cb}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a1647bf1d002e386ff185fc1bff2208de}


Register an OLSR protocol message handler. 

MessageReceiveCBs are invoked in reverse order to which they have been registered. The \hyperlink{classFaceManager}{FaceManager} always registers a handler for unknown message types first, so that such messages will be forwarded, even if XORP has no handler for it. Each handler thus registered is given an opportunity to claim \hyperlink{protocolthe-p}{the} message as its own, by returning true.

C++ dynamic casts are used at runtime by each MessageReceiveCB to determine if it should consume \hyperlink{protocolthe-p}{the} message.


\begin{DoxyParams}{Parameters}
{\em cb} & \hyperlink{protocolthe-p}{the} message receive callback function to register. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a7a81941b9415679b34ddaeecdfc9e2fa}{
\index{FaceManager@{FaceManager}!address\_\-status\_\-change@{address\_\-status\_\-change}}
\index{address\_\-status\_\-change@{address\_\-status\_\-change}!FaceManager@{FaceManager}}
\subsubsection[{address\_\-status\_\-change}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::address\_\-status\_\-change (
\begin{DoxyParamCaption}
\item[{const string \&}]{interface, }
\item[{const string \&}]{vif, }
\item[{{\bf IPv4}}]{addr, }
\item[{bool}]{state}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a7a81941b9415679b34ddaeecdfc9e2fa}


Callback method to: Process a change of address status from \hyperlink{protocolthe-p}{the} FEA. 


\begin{DoxyParams}{Parameters}
{\em interface} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} affected interface. \\
\hline
{\em vif} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} affected vif. \\
\hline
{\em addr} & \hyperlink{protocolthe-p}{the} affected \hyperlink{classIPv4}{IPv4} interface address. \\
\hline
{\em state} & \hyperlink{protocolthe-p}{the} new state of \hyperlink{protocolthe-p}{the} address. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a5fbb638b3c99d47f544b1111f9037eb3}{
\index{FaceManager@{FaceManager}!create\_\-face@{create\_\-face}}
\index{create\_\-face@{create\_\-face}!FaceManager@{FaceManager}}
\subsubsection[{create\_\-face}]{\setlength{\rightskip}{0pt plus 5cm}{\bf OlsrTypes::FaceID} FaceManager::create\_\-face (
\begin{DoxyParamCaption}
\item[{const string \&}]{interface, }
\item[{const string \&}]{vif}
\end{DoxyParamCaption}
)  throw ({\bf BadFace})}}
\label{classFaceManager_a5fbb638b3c99d47f544b1111f9037eb3}


Add a new interface. 


\begin{DoxyParams}{Parameters}
{\em interface} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} interface as known to \hyperlink{protocolthe-p}{the} FEA. \\
\hline
{\em vif} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif as known to \hyperlink{protocolthe-p}{the} FEA. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} new interface. 
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classBadFace}{BadFace}} & if \hyperlink{protocolthe-p}{the} interface could not be added. \\
\hline
\end{DoxyExceptions}
\hypertarget{classFaceManager_a798e30bfc7509ad98ad9943a1878f1a4}{
\index{FaceManager@{FaceManager}!delete\_\-face@{delete\_\-face}}
\index{delete\_\-face@{delete\_\-face}!FaceManager@{FaceManager}}
\subsubsection[{delete\_\-face}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::delete\_\-face (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a798e30bfc7509ad98ad9943a1878f1a4}


Delete an interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} \hyperlink{classFace}{Face} to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} interface was deleted. 
\end{DoxyReturn}
\hypertarget{classFaceManager_acffa6db7abb757315c2d0e49696acc16}{
\index{FaceManager@{FaceManager}!delete\_\-message\_\-cb@{delete\_\-message\_\-cb}}
\index{delete\_\-message\_\-cb@{delete\_\-message\_\-cb}!FaceManager@{FaceManager}}
\subsubsection[{delete\_\-message\_\-cb}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::delete\_\-message\_\-cb (
\begin{DoxyParamCaption}
\item[{MessageReceiveCB}]{cb}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_acffa6db7abb757315c2d0e49696acc16}


Deregister an OLSR protocol message handler. 


\begin{DoxyParams}{Parameters}
{\em cb} & \hyperlink{protocolthe-p}{the} message receive callback function to deregister. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if cb was deregistered, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_abda153b8eb9a126c99ea50cb4fa6fd3f}{
\index{FaceManager@{FaceManager}!flood\_\-message@{flood\_\-message}}
\index{flood\_\-message@{flood\_\-message}!FaceManager@{FaceManager}}
\subsubsection[{flood\_\-message}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::flood\_\-message (
\begin{DoxyParamCaption}
\item[{{\bf Message} $\ast$}]{message}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_abda153b8eb9a126c99ea50cb4fa6fd3f}


Flood a message on all interfaces, performing appropriate fragmentation for each interface. 


\begin{DoxyParams}{Parameters}
{\em message} & The message to flood, will be deleted by this method. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a339f62b8b28cc3fee57d94b202dde268}{
\index{FaceManager@{FaceManager}!forward\_\-message@{forward\_\-message}}
\index{forward\_\-message@{forward\_\-message}!FaceManager@{FaceManager}}
\subsubsection[{forward\_\-message}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::forward\_\-message (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{remote\_\-addr, }
\item[{{\bf Message} $\ast$}]{msg}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a339f62b8b28cc3fee57d94b202dde268}


Implement \hyperlink{protocolthe-p}{the} Default Forwarding Algorithm (Section 3.4.1). 


\begin{DoxyParams}{Parameters}
{\em remote\_\-addr} & \hyperlink{protocolthe-p}{the} interface address of \hyperlink{protocolthe-p}{the} node which sent or forwarded this message to us. Note: This may not be \hyperlink{protocolthe-p}{the} origin if \hyperlink{protocolthe-p}{the} message has previously been forwarded. \\
\hline
{\em msg} & \hyperlink{protocolthe-p}{the} message itself. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} message will be forwarded to other nodes. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a73c090e63c6e9015cd51994edc3fbe43}{
\index{FaceManager@{FaceManager}!get\_\-all\_\-nodes\_\-addr@{get\_\-all\_\-nodes\_\-addr}}
\index{get\_\-all\_\-nodes\_\-addr@{get\_\-all\_\-nodes\_\-addr}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-all\_\-nodes\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-all\_\-nodes\_\-addr (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{{\bf IPv4} \&}]{all\_\-nodes\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a73c090e63c6e9015cd51994edc3fbe43}


Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} all-\/nodes address of an interface. 

Uses \mbox{[}\mbox{]} so can't be declared const.


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to get all-\/nodes address for. \\
\hline
{\em all\_\-nodes\_\-addr} & output variable which will contain \hyperlink{protocolthe-p}{the} all-\/nodes address. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} all-\/nodes address was retrieved successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_ae43aafc81d0605a7f781a629cd1f569f}{
\index{FaceManager@{FaceManager}!get\_\-all\_\-nodes\_\-port@{get\_\-all\_\-nodes\_\-port}}
\index{get\_\-all\_\-nodes\_\-port@{get\_\-all\_\-nodes\_\-port}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-all\_\-nodes\_\-port}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-all\_\-nodes\_\-port (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{uint16\_\-t \&}]{all\_\-nodes\_\-port}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_ae43aafc81d0605a7f781a629cd1f569f}


Get \hyperlink{protocolthe-p}{the} UDP all-\/nodes port of an interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to get \hyperlink{protocolthe-p}{the} all-\/nodes port for. \\
\hline
{\em all\_\-nodes\_\-port} & output variable which will contain \hyperlink{protocolthe-p}{the} all-\/nodes port. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} all-\/nodes port was retrieved successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a38f8b0d19c13561e5d89a0cb7ef0b0c1}{
\index{FaceManager@{FaceManager}!get\_\-dup\_\-hold\_\-time@{get\_\-dup\_\-hold\_\-time}}
\index{get\_\-dup\_\-hold\_\-time@{get\_\-dup\_\-hold\_\-time}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-dup\_\-hold\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} FaceManager::get\_\-dup\_\-hold\_\-time (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a38f8b0d19c13561e5d89a0cb7ef0b0c1}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} DUP\_\-HOLD\_\-TIME protocol variable. 
\end{DoxyReturn}
\hypertarget{classFaceManager_ab2f3e34d6c08b381d763891ce455f694}{
\index{FaceManager@{FaceManager}!get\_\-dupetuple@{get\_\-dupetuple}}
\index{get\_\-dupetuple@{get\_\-dupetuple}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-dupetuple}]{\setlength{\rightskip}{0pt plus 5cm}{\bf DupeTuple} $\ast$ FaceManager::get\_\-dupetuple (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{origin\_\-addr, }
\item[{const uint16\_\-t}]{seqno}
\end{DoxyParamCaption}
) const}}
\label{classFaceManager_ab2f3e34d6c08b381d763891ce455f694}


Get a pointer to a tuple in \hyperlink{protocolthe-p}{the} duplicate set for a message, given its origin address and sequence number. 

Avoid throwing an exception as this path may be called very frequently when forwarding or flooding messages. This however means we return a pointer.


\begin{DoxyParams}{Parameters}
{\em origin\_\-addr} & \hyperlink{protocolthe-p}{the} protocol address of \hyperlink{protocolthe-p}{the} message origin. \\
\hline
{\em seqno} & \hyperlink{protocolthe-p}{the} sequence number of \hyperlink{protocolthe-p}{the} message. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} pointer to \hyperlink{protocolthe-p}{the} duplicate set entry, or 0 if none exists. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a204c25368a0b45781e2bc3155edcfa0c}{
\index{FaceManager@{FaceManager}!get\_\-enabled\_\-face\_\-count@{get\_\-enabled\_\-face\_\-count}}
\index{get\_\-enabled\_\-face\_\-count@{get\_\-enabled\_\-face\_\-count}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-enabled\_\-face\_\-count}]{\setlength{\rightskip}{0pt plus 5cm}uint32\_\-t FaceManager::get\_\-enabled\_\-face\_\-count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a204c25368a0b45781e2bc3155edcfa0c}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of interfaces enabled for OLSR. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a7d90dbf4854aede2ea55bc2dbcb8baf2}{
\index{FaceManager@{FaceManager}!get\_\-face\_\-by\_\-id@{get\_\-face\_\-by\_\-id}}
\index{get\_\-face\_\-by\_\-id@{get\_\-face\_\-by\_\-id}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-face\_\-by\_\-id}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Face} $\ast$ FaceManager::get\_\-face\_\-by\_\-id (
\begin{DoxyParamCaption}
\item[{const {\bf OlsrTypes::FaceID}}]{faceid}
\end{DoxyParamCaption}
) const  throw ({\bf BadFace})}}
\label{classFaceManager_a7d90dbf4854aede2ea55bc2dbcb8baf2}


Get a pointer to a \hyperlink{classFace}{Face} given its ID. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} face ID. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to \hyperlink{protocolthe-p}{the} face. 
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classBadFace}{BadFace}} & if \hyperlink{protocolthe-p}{the} face ID cannot be found. \\
\hline
\end{DoxyExceptions}
\hypertarget{classFaceManager_a20faed5b2eb8af4f717a7e5211066093}{
\index{FaceManager@{FaceManager}!get\_\-face\_\-count@{get\_\-face\_\-count}}
\index{get\_\-face\_\-count@{get\_\-face\_\-count}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-face\_\-count}]{\setlength{\rightskip}{0pt plus 5cm}uint32\_\-t FaceManager::get\_\-face\_\-count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a20faed5b2eb8af4f717a7e5211066093}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of interfaces known to \hyperlink{classFaceManager}{FaceManager}. 
\end{DoxyReturn}
\hypertarget{classFaceManager_abab0b47d9e8be0d6dd3bdf8fb40235ab}{
\index{FaceManager@{FaceManager}!get\_\-face\_\-enabled@{get\_\-face\_\-enabled}}
\index{get\_\-face\_\-enabled@{get\_\-face\_\-enabled}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-face\_\-enabled}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-face\_\-enabled (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_abab0b47d9e8be0d6dd3bdf8fb40235ab}


Get \hyperlink{protocolthe-p}{the} \char`\"{}administratively up\char`\"{} status of an OLSR interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to query enabled state for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if faceid is enabled. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a0ed1fb8714baa376ec90f507a0dd7ffa}{
\index{FaceManager@{FaceManager}!get\_\-face\_\-list@{get\_\-face\_\-list}}
\index{get\_\-face\_\-list@{get\_\-face\_\-list}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-face\_\-list}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::get\_\-face\_\-list (
\begin{DoxyParamCaption}
\item[{list$<$ {\bf OlsrTypes::FaceID} $>$ \&}]{face\_\-list}
\end{DoxyParamCaption}
) const}}
\label{classFaceManager_a0ed1fb8714baa376ec90f507a0dd7ffa}


Fill out a list of all face IDs. 


\begin{DoxyParams}{Parameters}
{\em face\_\-list} & \hyperlink{protocolthe-p}{the} list to fill out. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a902a54a131fd3076026ee54a72ff830d}{
\index{FaceManager@{FaceManager}!get\_\-face\_\-stats@{get\_\-face\_\-stats}}
\index{get\_\-face\_\-stats@{get\_\-face\_\-stats}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-face\_\-stats}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-face\_\-stats (
\begin{DoxyParamCaption}
\item[{const string \&}]{ifname, }
\item[{const string \&}]{vifname, }
\item[{{\bf FaceCounters} \&}]{stats}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a902a54a131fd3076026ee54a72ff830d}


Get \hyperlink{protocolthe-p}{the} statistics for \hyperlink{protocolthe-p}{the} given face. 


\begin{DoxyParams}{Parameters}
{\em ifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} interface to retrieve stats for. \\
\hline
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif to retrieve stats for. \\
\hline
{\em stats} & output; reference to an empty \hyperlink{classFaceCounters}{FaceCounters} object. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} stats were retrieved, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_ac1215dade53d133a1e8680f9ab895d04}{
\index{FaceManager@{FaceManager}!get\_\-faceid@{get\_\-faceid}}
\index{get\_\-faceid@{get\_\-faceid}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-faceid}]{\setlength{\rightskip}{0pt plus 5cm}{\bf OlsrTypes::FaceID} FaceManager::get\_\-faceid (
\begin{DoxyParamCaption}
\item[{const string \&}]{interface, }
\item[{const string \&}]{vif}
\end{DoxyParamCaption}
)  throw ({\bf BadFace})}}
\label{classFaceManager_ac1215dade53d133a1e8680f9ab895d04}


Get \hyperlink{protocolthe-p}{the} ID of an interface, given its names as known to \hyperlink{protocolthe-p}{the} FEA. 


\begin{DoxyParams}{Parameters}
{\em interface} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} interface to look up. \\
\hline
{\em vif} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif to look up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} face. 
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classBadFace}{BadFace}} & if \hyperlink{protocolthe-p}{the} interface was not found. \\
\hline
\end{DoxyExceptions}
\hypertarget{classFaceManager_ab2ffd5bb80d461e592859e8842714cec}{
\index{FaceManager@{FaceManager}!get\_\-hello\_\-interval@{get\_\-hello\_\-interval}}
\index{get\_\-hello\_\-interval@{get\_\-hello\_\-interval}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-hello\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} FaceManager::get\_\-hello\_\-interval (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_ab2ffd5bb80d461e592859e8842714cec}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} HELLO\_\-INTERVAL protocol variable. 
\end{DoxyReturn}
\hypertarget{classFaceManager_abfc9f3b4c25e7c85a82a348c2128fb2b}{
\index{FaceManager@{FaceManager}!get\_\-interface\_\-cost@{get\_\-interface\_\-cost}}
\index{get\_\-interface\_\-cost@{get\_\-interface\_\-cost}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-interface\_\-cost}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-interface\_\-cost (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{int \&}]{cost}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_abfc9f3b4c25e7c85a82a348c2128fb2b}


Set \hyperlink{protocolthe-p}{the} cost of an interface. 

Used by shortest path calculation.


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} interface to set cost for. \\
\hline
{\em cost} & \hyperlink{protocolthe-p}{the} interface cost to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} interface cost was set, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a555c467018db1af3cb22e24508299b09}{
\index{FaceManager@{FaceManager}!get\_\-interface\_\-vif\_\-by\_\-faceid@{get\_\-interface\_\-vif\_\-by\_\-faceid}}
\index{get\_\-interface\_\-vif\_\-by\_\-faceid@{get\_\-interface\_\-vif\_\-by\_\-faceid}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-interface\_\-vif\_\-by\_\-faceid}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-interface\_\-vif\_\-by\_\-faceid (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{string \&}]{interface, }
\item[{string \&}]{vif}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a555c467018db1af3cb22e24508299b09}


Get \hyperlink{protocolthe-p}{the} FEA names of an interface, given its OLSR interface ID. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} interface to look up. \\
\hline
{\em interface} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} interface if found. \\
\hline
{\em vif} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif if found. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} interface was found, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_ad09548cfe76ac576908c040971879911}{
\index{FaceManager@{FaceManager}!get\_\-local\_\-addr@{get\_\-local\_\-addr}}
\index{get\_\-local\_\-addr@{get\_\-local\_\-addr}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-local\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-local\_\-addr (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{{\bf IPv4} \&}]{local\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_ad09548cfe76ac576908c040971879911}


Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} local address of an interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to get local address for. \\
\hline
{\em local\_\-addr} & \hyperlink{protocolthe-p}{the} local address, if interface was found. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} local address was retrieved successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_ab2788eb3f227ba05fbe0999244fc1297}{
\index{FaceManager@{FaceManager}!get\_\-local\_\-port@{get\_\-local\_\-port}}
\index{get\_\-local\_\-port@{get\_\-local\_\-port}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-local\_\-port}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::get\_\-local\_\-port (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{uint16\_\-t \&}]{local\_\-port}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_ab2788eb3f227ba05fbe0999244fc1297}


Get \hyperlink{protocolthe-p}{the} UDP local port of an interface. 

Uses \mbox{[}\mbox{]} so can't be declared const.


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to get local port for. \\
\hline
{\em local\_\-port} & \hyperlink{protocolthe-p}{the} UDP local port, if interface was found. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} local port was retrieved successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a8ce368259fd3bc2f6b7cb3022f978789}{
\index{FaceManager@{FaceManager}!get\_\-main\_\-addr@{get\_\-main\_\-addr}}
\index{get\_\-main\_\-addr@{get\_\-main\_\-addr}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-main\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IPv4} FaceManager::get\_\-main\_\-addr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a8ce368259fd3bc2f6b7cb3022f978789}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} OLSR main address of this node. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a6e9d32d91aa08f3ceb3324013d732219}{
\index{FaceManager@{FaceManager}!get\_\-max\_\-jitter@{get\_\-max\_\-jitter}}
\index{get\_\-max\_\-jitter@{get\_\-max\_\-jitter}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-max\_\-jitter}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} FaceManager::get\_\-max\_\-jitter (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a6e9d32d91aa08f3ceb3324013d732219}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} MAX\_\-JITTER protocol variable. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a2afa1e543992f9ac086b732af625140c}{
\index{FaceManager@{FaceManager}!get\_\-mid\_\-hold\_\-time@{get\_\-mid\_\-hold\_\-time}}
\index{get\_\-mid\_\-hold\_\-time@{get\_\-mid\_\-hold\_\-time}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-mid\_\-hold\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} FaceManager::get\_\-mid\_\-hold\_\-time (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a2afa1e543992f9ac086b732af625140c}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} MID\_\-HOLD\_\-TIME protocol variable. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a9cf7d3b9d72c156a889686fa861aac92}{
\index{FaceManager@{FaceManager}!get\_\-mid\_\-interval@{get\_\-mid\_\-interval}}
\index{get\_\-mid\_\-interval@{get\_\-mid\_\-interval}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-mid\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} FaceManager::get\_\-mid\_\-interval (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a9cf7d3b9d72c156a889686fa861aac92}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} MID\_\-INTERVAL protocol variable. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a307af9f494462b55a9ac6ac5f1df9971}{
\index{FaceManager@{FaceManager}!get\_\-msg\_\-seqno@{get\_\-msg\_\-seqno}}
\index{get\_\-msg\_\-seqno@{get\_\-msg\_\-seqno}!FaceManager@{FaceManager}}
\subsubsection[{get\_\-msg\_\-seqno}]{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t FaceManager::get\_\-msg\_\-seqno (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFaceManager_a307af9f494462b55a9ac6ac5f1df9971}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} next sequence number to use for a transmitted \hyperlink{classMessage}{Message}. 
\end{DoxyReturn}
\hypertarget{classFaceManager_adba44c8535286d8799bd1899dd915644}{
\index{FaceManager@{FaceManager}!is\_\-duplicate\_\-message@{is\_\-duplicate\_\-message}}
\index{is\_\-duplicate\_\-message@{is\_\-duplicate\_\-message}!FaceManager@{FaceManager}}
\subsubsection[{is\_\-duplicate\_\-message}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::is\_\-duplicate\_\-message (
\begin{DoxyParamCaption}
\item[{const {\bf Message} $\ast$}]{msg}
\end{DoxyParamCaption}
) const}}
\label{classFaceManager_adba44c8535286d8799bd1899dd915644}


Check if a message is a previously seen duplicate. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} message is a duplicate and should neither be processed or forwarded. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a4bb129427783171687be1d360c10ab8d}{
\index{FaceManager@{FaceManager}!is\_\-forwarded\_\-message@{is\_\-forwarded\_\-message}}
\index{is\_\-forwarded\_\-message@{is\_\-forwarded\_\-message}!FaceManager@{FaceManager}}
\subsubsection[{is\_\-forwarded\_\-message}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::is\_\-forwarded\_\-message (
\begin{DoxyParamCaption}
\item[{const {\bf Message} $\ast$}]{msg}
\end{DoxyParamCaption}
) const}}
\label{classFaceManager_a4bb129427783171687be1d360c10ab8d}


Check if a message should be forwarded, according to \hyperlink{protocolthe-p}{the} default forwarding rules. 


\begin{DoxyParams}{Parameters}
{\em msg} & \hyperlink{protocolthe-p}{the} message to check. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} message SHOULD NOT be forwarded, false if it is OK to forward \hyperlink{protocolthe-p}{the} message. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a86282fc64646753cb5b2d3150afdc175}{
\index{FaceManager@{FaceManager}!is\_\-local\_\-addr@{is\_\-local\_\-addr}}
\index{is\_\-local\_\-addr@{is\_\-local\_\-addr}!FaceManager@{FaceManager}}
\subsubsection[{is\_\-local\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::is\_\-local\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{addr}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a86282fc64646753cb5b2d3150afdc175}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} given address belongs to any locally configured interface. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a97afa43ccfb4303d31ca07dbe7a68ba5}{
\index{FaceManager@{FaceManager}!receive@{receive}}
\index{receive@{receive}!FaceManager@{FaceManager}}
\subsubsection[{receive}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::receive (
\begin{DoxyParamCaption}
\item[{const string \&}]{interface, }
\item[{const string \&}]{vif, }
\item[{const {\bf IPv4} \&}]{dst, }
\item[{const uint16\_\-t \&}]{dport, }
\item[{const {\bf IPv4} \&}]{src, }
\item[{const uint16\_\-t \&}]{sport, }
\item[{uint8\_\-t $\ast$}]{data, }
\item[{const uint32\_\-t \&}]{len}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a97afa43ccfb4303d31ca07dbe7a68ba5}


Process a received datagram. 


\begin{DoxyParams}{Parameters}
{\em interface} & \hyperlink{protocolthe-p}{the} interface where \hyperlink{protocolthe-p}{the} datagram was received. \\
\hline
{\em vif} & \hyperlink{protocolthe-p}{the} vif where \hyperlink{protocolthe-p}{the} datagram was received. \\
\hline
{\em dst} & \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} destination address of \hyperlink{protocolthe-p}{the} datagram. \\
\hline
{\em dport} & \hyperlink{protocolthe-p}{the} UDP destination port of \hyperlink{protocolthe-p}{the} datagram. \\
\hline
{\em src} & \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} source address of \hyperlink{protocolthe-p}{the} datagram. \\
\hline
{\em sport} & \hyperlink{protocolthe-p}{the} UDP source port of \hyperlink{protocolthe-p}{the} datagram. \\
\hline
{\em data} & \hyperlink{protocolthe-p}{the} received datagram. \\
\hline
{\em len} & \hyperlink{protocolthe-p}{the} length of \hyperlink{protocolthe-p}{the} received datagram. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a2e8016021131de28e673b906121c1c6d}{
\index{FaceManager@{FaceManager}!recompute\_\-addresses\_\-face@{recompute\_\-addresses\_\-face}}
\index{recompute\_\-addresses\_\-face@{recompute\_\-addresses\_\-face}!FaceManager@{FaceManager}}
\subsubsection[{recompute\_\-addresses\_\-face}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::recompute\_\-addresses\_\-face (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a2e8016021131de28e673b906121c1c6d}


Recompute \hyperlink{protocolthe-p}{the} list of protocol addresses used by OLSR to send and receive protocol control traffic on this \hyperlink{classFace}{Face}. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} \hyperlink{classFace}{Face} to recompute addresses on. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} address lists were recomputed successfully.
\end{DoxyReturn}
This method works significantly differently than in OSPF. In OLSR, we need to recompute \hyperlink{protocolthe-p}{the} list of addresses to which OLSR control traffic may originate from or be received on whenever \hyperlink{protocolthe-p}{the} configured addresses on an interface change.

This relates only to \hyperlink{protocolthe-p}{the} MID message; there is no strict parallel to \hyperlink{protocolthe-p}{the} network LSA in OSPF. \hypertarget{classFaceManager_ac568c6b0693e7a887f8413635f50fac1}{
\index{FaceManager@{FaceManager}!set\_\-all\_\-nodes\_\-addr@{set\_\-all\_\-nodes\_\-addr}}
\index{set\_\-all\_\-nodes\_\-addr@{set\_\-all\_\-nodes\_\-addr}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-all\_\-nodes\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::set\_\-all\_\-nodes\_\-addr (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{const {\bf IPv4} \&}]{all\_\-nodes\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_ac568c6b0693e7a887f8413635f50fac1}


Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} all-\/nodes address of an interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to set all-\/nodes address for. \\
\hline
{\em all\_\-nodes\_\-addr} & \hyperlink{protocolthe-p}{the} all-\/nodes address to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} all-\/nodes address was set successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a5417375e2d289e765f671a38b2b43926}{
\index{FaceManager@{FaceManager}!set\_\-all\_\-nodes\_\-port@{set\_\-all\_\-nodes\_\-port}}
\index{set\_\-all\_\-nodes\_\-port@{set\_\-all\_\-nodes\_\-port}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-all\_\-nodes\_\-port}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::set\_\-all\_\-nodes\_\-port (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{const uint16\_\-t}]{all\_\-nodes\_\-port}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a5417375e2d289e765f671a38b2b43926}


Set \hyperlink{protocolthe-p}{the} UDP all-\/nodes port of an interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to set \hyperlink{protocolthe-p}{the} all-\/nodes port for. \\
\hline
{\em all\_\-nodes\_\-port} & \hyperlink{protocolthe-p}{the} all-\/nodes port to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} all-\/nodes port was set successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_aa944216fa0c6aaf881412b5812da950d}{
\index{FaceManager@{FaceManager}!set\_\-dup\_\-hold\_\-time@{set\_\-dup\_\-hold\_\-time}}
\index{set\_\-dup\_\-hold\_\-time@{set\_\-dup\_\-hold\_\-time}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-dup\_\-hold\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::set\_\-dup\_\-hold\_\-time (
\begin{DoxyParamCaption}
\item[{const {\bf TimeVal} \&}]{dup\_\-hold\_\-time}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_aa944216fa0c6aaf881412b5812da950d}


Set \hyperlink{protocolthe-p}{the} hold time for duplicate messages. 

Note: This does not affect messages which are currently being tracked in \hyperlink{protocolthe-p}{the} duplicate set.


\begin{DoxyParams}{Parameters}
{\em dup\_\-hold\_\-time} & \hyperlink{protocolthe-p}{the} new hold time for duplicate messages. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a9f8dbcea6a6fd215c1fdbced61f35aa1}{
\index{FaceManager@{FaceManager}!set\_\-face\_\-enabled@{set\_\-face\_\-enabled}}
\index{set\_\-face\_\-enabled@{set\_\-face\_\-enabled}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-face\_\-enabled}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::set\_\-face\_\-enabled (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{bool}]{enabled}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a9f8dbcea6a6fd215c1fdbced61f35aa1}


Enable \hyperlink{protocolthe-p}{the} OLSR binding on \hyperlink{protocolthe-p}{the} given interface. 

This method is responsible for realizing \hyperlink{protocolthe-p}{the} socket needed by \hyperlink{protocolthe-p}{the} \hyperlink{classFace}{Face}. If more than one interface is enabled, this method MAY start \hyperlink{protocolthe-p}{the} MID protocol t imer. \hypertarget{classFaceManager_a388d7f1464e783b805ce8c7b58aac7f6}{
\index{FaceManager@{FaceManager}!set\_\-hello\_\-interval@{set\_\-hello\_\-interval}}
\index{set\_\-hello\_\-interval@{set\_\-hello\_\-interval}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-hello\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::set\_\-hello\_\-interval (
\begin{DoxyParamCaption}
\item[{const {\bf TimeVal} \&}]{interval}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a388d7f1464e783b805ce8c7b58aac7f6}


Set \hyperlink{protocolthe-p}{the} HELLO\_\-INTERVAL protocol variable. 

The HELLO timer will be rescheduled if running. \hypertarget{classFaceManager_a44f61d7c7bd28ae59cc4c438985a902e}{
\index{FaceManager@{FaceManager}!set\_\-interface\_\-cost@{set\_\-interface\_\-cost}}
\index{set\_\-interface\_\-cost@{set\_\-interface\_\-cost}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-interface\_\-cost}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::set\_\-interface\_\-cost (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{const int}]{cost}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a44f61d7c7bd28ae59cc4c438985a902e}


Set \hyperlink{protocolthe-p}{the} cost of an OLSR interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to set cost for. \\
\hline
{\em cost} & \hyperlink{protocolthe-p}{the} cost to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} cost was set successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a7ec8e687dc7405ba2f8860d0497385cb}{
\index{FaceManager@{FaceManager}!set\_\-local\_\-addr@{set\_\-local\_\-addr}}
\index{set\_\-local\_\-addr@{set\_\-local\_\-addr}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-local\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::set\_\-local\_\-addr (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{const {\bf IPv4} \&}]{local\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a7ec8e687dc7405ba2f8860d0497385cb}


Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} local address of an interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to set local address for. \\
\hline
{\em local\_\-addr} & \hyperlink{protocolthe-p}{the} local address to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} local address was set successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_a21a0a7e899ecebf4b3f12e17f0a0122b}{
\index{FaceManager@{FaceManager}!set\_\-local\_\-port@{set\_\-local\_\-port}}
\index{set\_\-local\_\-port@{set\_\-local\_\-port}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-local\_\-port}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::set\_\-local\_\-port (
\begin{DoxyParamCaption}
\item[{{\bf OlsrTypes::FaceID}}]{faceid, }
\item[{const uint16\_\-t}]{local\_\-port}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a21a0a7e899ecebf4b3f12e17f0a0122b}


Set \hyperlink{protocolthe-p}{the} UDP local port of an interface. 


\begin{DoxyParams}{Parameters}
{\em faceid} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{classFace}{Face} to set local port for. \\
\hline
{\em local\_\-port} & \hyperlink{protocolthe-p}{the} local port to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} local port was set successfully, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_adc582039445dbbb0fa3f2ea0436f2e47}{
\index{FaceManager@{FaceManager}!set\_\-main\_\-addr@{set\_\-main\_\-addr}}
\index{set\_\-main\_\-addr@{set\_\-main\_\-addr}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-main\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::set\_\-main\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{addr}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_adc582039445dbbb0fa3f2ea0436f2e47}


Attempt to set main address on node. 

TODO: Track address changes on interfaces. TODO: Add a flag which does NOT allow \hyperlink{protocolthe-p}{the} main address to automatically change when interfaces change.

This will fulfil \hyperlink{protocolthe-p}{the} RFC requirement that \hyperlink{protocolthe-p}{the} main address may never change, but will effectively halt olsr when \hyperlink{protocolthe-p}{the} main address is set to an address we are not configured for. \hypertarget{classFaceManager_af1d85cfe08134b83632f809537bd955d}{
\index{FaceManager@{FaceManager}!set\_\-mid\_\-interval@{set\_\-mid\_\-interval}}
\index{set\_\-mid\_\-interval@{set\_\-mid\_\-interval}!FaceManager@{FaceManager}}
\subsubsection[{set\_\-mid\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::set\_\-mid\_\-interval (
\begin{DoxyParamCaption}
\item[{const {\bf TimeVal} \&}]{interval}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_af1d85cfe08134b83632f809537bd955d}


Set \hyperlink{protocolthe-p}{the} MID\_\-INTERVAL protocol variable. 

The timer will be rescheduled if it is running.


\begin{DoxyParams}{Parameters}
{\em interval} & \hyperlink{protocolthe-p}{the} new MID\_\-INTERVAL. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a498a3212db4c85e4db770172fb003160}{
\index{FaceManager@{FaceManager}!transmit@{transmit}}
\index{transmit@{transmit}!FaceManager@{FaceManager}}
\subsubsection[{transmit}]{\setlength{\rightskip}{0pt plus 5cm}bool FaceManager::transmit (
\begin{DoxyParamCaption}
\item[{const string \&}]{interface, }
\item[{const string \&}]{vif, }
\item[{const {\bf IPv4} \&}]{dst, }
\item[{const uint16\_\-t \&}]{dport, }
\item[{const {\bf IPv4} \&}]{src, }
\item[{const uint16\_\-t \&}]{sport, }
\item[{uint8\_\-t $\ast$}]{data, }
\item[{const uint32\_\-t \&}]{len}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a498a3212db4c85e4db770172fb003160}


\hyperlink{classTransmit}{Transmit} a datagram. 


\begin{DoxyParams}{Parameters}
{\em interface} & \hyperlink{protocolthe-p}{the} interface to transmit from. \\
\hline
{\em vif} & \hyperlink{protocolthe-p}{the} vif to transmit from. \\
\hline
{\em dst} & \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} destination address to send to. \\
\hline
{\em dport} & \hyperlink{protocolthe-p}{the} UDP destination port to send to. \\
\hline
{\em src} & \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} source address to transmit from. \\
\hline
{\em sport} & \hyperlink{protocolthe-p}{the} UDP source port to transmit from. \\
\hline
{\em data} & \hyperlink{protocolthe-p}{the} datagram to transmit. \\
\hline
{\em len} & \hyperlink{protocolthe-p}{the} length of \hyperlink{protocolthe-p}{the} datagram to transmit. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} datagram was sent OK, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFaceManager_ad1994646942442a5cd82b79f6fdb70fc}{
\index{FaceManager@{FaceManager}!update\_\-dupetuple@{update\_\-dupetuple}}
\index{update\_\-dupetuple@{update\_\-dupetuple}!FaceManager@{FaceManager}}
\subsubsection[{update\_\-dupetuple}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::update\_\-dupetuple (
\begin{DoxyParamCaption}
\item[{const {\bf Message} $\ast$}]{msg, }
\item[{const bool}]{is\_\-forwarded}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_ad1994646942442a5cd82b79f6fdb70fc}


Update or create an entry in \hyperlink{protocolthe-p}{the} duplicate message set. 

Given a message, update or create its duplicate set tuple in order that we can detect if other nodes in \hyperlink{protocolthe-p}{the} OLSR domain loop a message back to us. OLSR uses histogram based message loop detection, as \hyperlink{protocolthe-p}{the} shortest path tree may be out of phase with \hyperlink{protocolthe-p}{the} real network topology.


\begin{DoxyParams}{Parameters}
{\em msg} & \hyperlink{protocolthe-p}{the} message itself. \\
\hline
{\em is\_\-forwarded} & true if \hyperlink{protocolthe-p}{the} message will be forwarded. \\
\hline
\end{DoxyParams}
\hypertarget{classFaceManager_a8eb1a6a1ae855e5132256bfb99a3685f}{
\index{FaceManager@{FaceManager}!vif\_\-status\_\-change@{vif\_\-status\_\-change}}
\index{vif\_\-status\_\-change@{vif\_\-status\_\-change}!FaceManager@{FaceManager}}
\subsubsection[{vif\_\-status\_\-change}]{\setlength{\rightskip}{0pt plus 5cm}void FaceManager::vif\_\-status\_\-change (
\begin{DoxyParamCaption}
\item[{const string \&}]{interface, }
\item[{const string \&}]{vif, }
\item[{bool}]{state}
\end{DoxyParamCaption}
)}}
\label{classFaceManager_a8eb1a6a1ae855e5132256bfb99a3685f}


Callback method to: Process a change of vif status from \hyperlink{protocolthe-p}{the} FEA. 


\begin{DoxyParams}{Parameters}
{\em interface} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} affected interface. \\
\hline
{\em vif} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} affected vif. \\
\hline
{\em state} & \hyperlink{protocolthe-p}{the} new state of \hyperlink{protocolthe-p}{the} vif. \\
\hline
\end{DoxyParams}


\subsection{Member Data Documentation}
\hypertarget{classFaceManager_aa2104ba4f68a62fcffcbc99e4e16ecd0}{
\index{FaceManager@{FaceManager}!\_\-dup\_\-hold\_\-time@{\_\-dup\_\-hold\_\-time}}
\index{\_\-dup\_\-hold\_\-time@{\_\-dup\_\-hold\_\-time}!FaceManager@{FaceManager}}
\subsubsection[{\_\-dup\_\-hold\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} {\bf FaceManager::\_\-dup\_\-hold\_\-time}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFaceManager_aa2104ba4f68a62fcffcbc99e4e16ecd0}


The DUP\_\-HOLD\_\-TIME protocol control variable. 

Section 3.4.1: Default Forwarding Algorithm. \hypertarget{classFaceManager_a79016d0ae1bef6d1b067d28b11fc6fbc}{
\index{FaceManager@{FaceManager}!\_\-hello\_\-interval@{\_\-hello\_\-interval}}
\index{\_\-hello\_\-interval@{\_\-hello\_\-interval}!FaceManager@{FaceManager}}
\subsubsection[{\_\-hello\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} {\bf FaceManager::\_\-hello\_\-interval}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFaceManager_a79016d0ae1bef6d1b067d28b11fc6fbc}


The HELLO\_\-INTERVAL protocol control variable. 

RFC 3626 Section 18.2. \hypertarget{classFaceManager_a6589a4a628082c9955a63a36c8e2cbb8}{
\index{FaceManager@{FaceManager}!\_\-mid\_\-interval@{\_\-mid\_\-interval}}
\index{\_\-mid\_\-interval@{\_\-mid\_\-interval}!FaceManager@{FaceManager}}
\subsubsection[{\_\-mid\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} {\bf FaceManager::\_\-mid\_\-interval}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFaceManager_a6589a4a628082c9955a63a36c8e2cbb8}


The MID\_\-INTERVAL protocol control variable. 

RFC 3626 Section 18.2. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/contrib/olsr/face\_\-manager.hh\item 
/home/greearb/git/xorp.ct.github/xorp/contrib/olsr/face\_\-manager.cc\end{DoxyCompactItemize}
