\hypertarget{classAuth}{
\section{Auth Class Reference}
\label{classAuth}\index{Auth@{Auth}}
}


This is \hyperlink{protocolthe-p}{the} class that should be instantiated to access authentication.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classAuth_a94c5f0c544985bf10f1310183b80145b}{
{\bfseries Auth} (\hyperlink{classEventLoop}{EventLoop} \&eventloop)}
\label{classAuth_a94c5f0c544985bf10f1310183b80145b}

\item 
\hypertarget{classAuth_a8467f81536a814ddf87a68170c59a827}{
bool {\bfseries set\_\-method} (const string \&method)}
\label{classAuth_a8467f81536a814ddf87a68170c59a827}

\item 
\hypertarget{classAuth_a976ad3dbf6a3ae2fdbd70489fec8af5d}{
void \hyperlink{classAuth_a976ad3dbf6a3ae2fdbd70489fec8af5d}{generate} (vector$<$ uint8\_\-t $>$ \&pkt)}
\label{classAuth_a976ad3dbf6a3ae2fdbd70489fec8af5d}

\begin{DoxyCompactList}\small\item\em Apply \hyperlink{protocolthe-p}{the} authentication scheme to \hyperlink{protocolthe-p}{the} packet. \item\end{DoxyCompactList}\item 
\hypertarget{classAuth_ad5d2612aa1dffbb1a740d45a5f007c20}{
bool \hyperlink{classAuth_ad5d2612aa1dffbb1a740d45a5f007c20}{verify} (vector$<$ uint8\_\-t $>$ \&pkt, const \hyperlink{classIPv4}{IPv4} \&src\_\-addr, bool new\_\-peer)}
\label{classAuth_ad5d2612aa1dffbb1a740d45a5f007c20}

\begin{DoxyCompactList}\small\item\em Verify that this packet has passed \hyperlink{protocolthe-p}{the} authentication scheme. \item\end{DoxyCompactList}\item 
\hypertarget{classAuth_a29b7756ada875a430e98c2f312020d67}{
bool {\bfseries verify} (vector$<$ uint8\_\-t $>$ \&pkt, const \hyperlink{classIPv6}{IPv6} \&src\_\-addr, bool new\_\-peer)}
\label{classAuth_a29b7756ada875a430e98c2f312020d67}

\item 
\hypertarget{classAuth_a13bc4ee4790ffafcb45fe193a7f7e942}{
uint32\_\-t \hyperlink{classAuth_a13bc4ee4790ffafcb45fe193a7f7e942}{additional\_\-payload} () const }
\label{classAuth_a13bc4ee4790ffafcb45fe193a7f7e942}

\begin{DoxyCompactList}\small\item\em Additional bytes that will be added to \hyperlink{protocolthe-p}{the} payload. \item\end{DoxyCompactList}\item 
\hypertarget{classAuth_af9a72bbf1dbf10273335817d64689546}{
const string \& {\bfseries error} () const }
\label{classAuth_af9a72bbf1dbf10273335817d64689546}

\item 
\hypertarget{classAuth_a426f6d69c1cc679442add50e0e167030}{
void \hyperlink{classAuth_a426f6d69c1cc679442add50e0e167030}{reset} ()}
\label{classAuth_a426f6d69c1cc679442add50e0e167030}

\begin{DoxyCompactList}\small\item\em Called to notify authentication system to reset. \item\end{DoxyCompactList}\item 
bool \hyperlink{classAuth_a1fb1e4313d826245502c8dc70a4aedd5}{set\_\-simple\_\-authentication\_\-key} (const string \&password, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Set a simple password authentication key. \item\end{DoxyCompactList}\item 
bool \hyperlink{classAuth_a823ee94dbaff571eaf4daef82c2c1fad}{delete\_\-simple\_\-authentication\_\-key} (string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Delete a simple password authentication key. \item\end{DoxyCompactList}\item 
bool \hyperlink{classAuth_a644c0f3dc99d4c7afbb4e67978b84d67}{set\_\-md5\_\-authentication\_\-key} (uint8\_\-t key\_\-id, const string \&password, const \hyperlink{classTimeVal}{TimeVal} \&start\_\-timeval, const \hyperlink{classTimeVal}{TimeVal} \&end\_\-timeval, const \hyperlink{classTimeVal}{TimeVal} \&max\_\-time\_\-drift, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Set an MD5 authentication key. \item\end{DoxyCompactList}\item 
bool \hyperlink{classAuth_a1fce48fcaf0ec944d1d7b32a3e1af560}{delete\_\-md5\_\-authentication\_\-key} (uint8\_\-t key\_\-id, string \&error\_\-msg)
\begin{DoxyCompactList}\small\item\em Delete an MD5 authentication key. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classAuth_a8165575277e1d2035ab9461a42977616}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-eventloop}}
\label{classAuth_a8165575277e1d2035ab9461a42977616}

\item 
\hypertarget{classAuth_a66a5706a991516cff5a51faebca9a11d}{
\hyperlink{classAuthHandlerBase}{AuthHandlerBase} $\ast$ {\bfseries \_\-auth\_\-handler}}
\label{classAuth_a66a5706a991516cff5a51faebca9a11d}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
This is \hyperlink{protocolthe-p}{the} class that should be instantiated to access authentication. 

\subsection{Member Function Documentation}
\hypertarget{classAuth_a1fce48fcaf0ec944d1d7b32a3e1af560}{
\index{Auth@{Auth}!delete\_\-md5\_\-authentication\_\-key@{delete\_\-md5\_\-authentication\_\-key}}
\index{delete\_\-md5\_\-authentication\_\-key@{delete\_\-md5\_\-authentication\_\-key}!Auth@{Auth}}
\subsubsection[{delete\_\-md5\_\-authentication\_\-key}]{\setlength{\rightskip}{0pt plus 5cm}bool Auth::delete\_\-md5\_\-authentication\_\-key (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{key\_\-id, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classAuth_a1fce48fcaf0ec944d1d7b32a3e1af560}


Delete an MD5 authentication key. 

Note that after \hyperlink{protocolthe-p}{the} deletion if there are no more valid MD5 keys, \hyperlink{protocolthe-p}{the} MD5 authentication handler is replaced with a Null authentication handler.


\begin{DoxyParams}{Parameters}
{\em key\_\-id} & \hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} key to delete. \\
\hline
{\em \hyperlink{protocolthe-p}{the}} & error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, otherwise false. 
\end{DoxyReturn}
\hypertarget{classAuth_a823ee94dbaff571eaf4daef82c2c1fad}{
\index{Auth@{Auth}!delete\_\-simple\_\-authentication\_\-key@{delete\_\-simple\_\-authentication\_\-key}}
\index{delete\_\-simple\_\-authentication\_\-key@{delete\_\-simple\_\-authentication\_\-key}!Auth@{Auth}}
\subsubsection[{delete\_\-simple\_\-authentication\_\-key}]{\setlength{\rightskip}{0pt plus 5cm}bool Auth::delete\_\-simple\_\-authentication\_\-key (
\begin{DoxyParamCaption}
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classAuth_a823ee94dbaff571eaf4daef82c2c1fad}


Delete a simple password authentication key. 

Note that after \hyperlink{protocolthe-p}{the} deletion \hyperlink{protocolthe-p}{the} simple password authentication handler is replaced with a Null authentication handler.


\begin{DoxyParams}{Parameters}
{\em \hyperlink{protocolthe-p}{the}} & error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, otherwise false. 
\end{DoxyReturn}
\hypertarget{classAuth_a644c0f3dc99d4c7afbb4e67978b84d67}{
\index{Auth@{Auth}!set\_\-md5\_\-authentication\_\-key@{set\_\-md5\_\-authentication\_\-key}}
\index{set\_\-md5\_\-authentication\_\-key@{set\_\-md5\_\-authentication\_\-key}!Auth@{Auth}}
\subsubsection[{set\_\-md5\_\-authentication\_\-key}]{\setlength{\rightskip}{0pt plus 5cm}bool Auth::set\_\-md5\_\-authentication\_\-key (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{key\_\-id, }
\item[{const string \&}]{password, }
\item[{const {\bf TimeVal} \&}]{start\_\-timeval, }
\item[{const {\bf TimeVal} \&}]{end\_\-timeval, }
\item[{const {\bf TimeVal} \&}]{max\_\-time\_\-drift, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classAuth_a644c0f3dc99d4c7afbb4e67978b84d67}


Set an MD5 authentication key. 

Note that \hyperlink{protocolthe-p}{the} current authentication handler is replaced with an MD5 authentication handler.


\begin{DoxyParams}{Parameters}
{\em key\_\-id} & unique ID associated with key. \\
\hline
{\em password} & phrase used for MD5 digest computation. \\
\hline
{\em start\_\-timeval} & start time when key becomes valid. \\
\hline
{\em end\_\-timeval} & end time when key becomes invalid. \\
\hline
{\em max\_\-time\_\-drift} & \hyperlink{protocolthe-p}{the} maximum time drift among all routers. \\
\hline
{\em \hyperlink{protocolthe-p}{the}} & error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, otherwise false. 
\end{DoxyReturn}
\hypertarget{classAuth_a1fb1e4313d826245502c8dc70a4aedd5}{
\index{Auth@{Auth}!set\_\-simple\_\-authentication\_\-key@{set\_\-simple\_\-authentication\_\-key}}
\index{set\_\-simple\_\-authentication\_\-key@{set\_\-simple\_\-authentication\_\-key}!Auth@{Auth}}
\subsubsection[{set\_\-simple\_\-authentication\_\-key}]{\setlength{\rightskip}{0pt plus 5cm}bool Auth::set\_\-simple\_\-authentication\_\-key (
\begin{DoxyParamCaption}
\item[{const string \&}]{password, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
)}}
\label{classAuth_a1fb1e4313d826245502c8dc70a4aedd5}


Set a simple password authentication key. 

Note that \hyperlink{protocolthe-p}{the} current authentication handler is replaced with a simple password authentication handler.


\begin{DoxyParams}{Parameters}
{\em password} & \hyperlink{protocolthe-p}{the} password to set. \\
\hline
{\em \hyperlink{protocolthe-p}{the}} & error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, otherwise false. 
\end{DoxyReturn}


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