\hypertarget{classTlv}{
\section{Tlv Class Reference}
\label{classTlv}\index{Tlv@{Tlv}}
}


$<$Type,Length,Value$>$ Read and Write TLV records.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classTlv_a58b331cc3549a6bb60a2c2383df93fea}{open} (string \&fname, bool read)
\begin{DoxyCompactList}\small\item\em Open file for reading or writing. \item\end{DoxyCompactList}\item 
bool \hyperlink{classTlv_aa6e539c5cd514f9113666455d02d2eca}{read} (uint32\_\-t \&type, vector$<$ uint8\_\-t $>$ \&data)
\begin{DoxyCompactList}\small\item\em Read a TLV entry from \hyperlink{protocolthe-p}{the} file. \item\end{DoxyCompactList}\item 
bool \hyperlink{classTlv_af90355225c84cb0a5fcb2290dd343a79}{write} (uint32\_\-t type, vector$<$ uint8\_\-t $>$ \&data)
\begin{DoxyCompactList}\small\item\em Write a TLV entry to \hyperlink{protocolthe-p}{the} file. \item\end{DoxyCompactList}\item 
bool \hyperlink{classTlv_a7659ad327e02c2ae1cd2936a9898acaa}{close} ()
\begin{DoxyCompactList}\small\item\em Close \hyperlink{protocolthe-p}{the} TLV file. \item\end{DoxyCompactList}\item 
\hypertarget{classTlv_aafd984d97e429f7c0193d39daebc848d}{
bool {\bfseries get32} (vector$<$ uint8\_\-t $>$ \&data, uint32\_\-t offset, uint32\_\-t \&u32)}
\label{classTlv_aafd984d97e429f7c0193d39daebc848d}

\item 
\hypertarget{classTlv_a3790cf47e15c9494169d60cb67051ab7}{
bool {\bfseries put32} (vector$<$ uint8\_\-t $>$ \&data, uint32\_\-t offset, uint32\_\-t u32)}
\label{classTlv_a3790cf47e15c9494169d60cb67051ab7}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTlv_a46817196846ed658e6524dd56d34195f}{
FILE $\ast$ {\bfseries \_\-fp}}
\label{classTlv_a46817196846ed658e6524dd56d34195f}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
$<$Type,Length,Value$>$ Read and Write TLV records. 

\subsection{Member Function Documentation}
\hypertarget{classTlv_a7659ad327e02c2ae1cd2936a9898acaa}{
\index{Tlv@{Tlv}!close@{close}}
\index{close@{close}!Tlv@{Tlv}}
\subsubsection[{close}]{\setlength{\rightskip}{0pt plus 5cm}bool Tlv::close (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTlv_a7659ad327e02c2ae1cd2936a9898acaa}


Close \hyperlink{protocolthe-p}{the} TLV file. 

\begin{DoxyReturn}{Returns}
true on success 
\end{DoxyReturn}
\hypertarget{classTlv_a58b331cc3549a6bb60a2c2383df93fea}{
\index{Tlv@{Tlv}!open@{open}}
\index{open@{open}!Tlv@{Tlv}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool Tlv::open (
\begin{DoxyParamCaption}
\item[{string \&}]{fname, }
\item[{bool}]{read}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTlv_a58b331cc3549a6bb60a2c2383df93fea}


Open file for reading or writing. 


\begin{DoxyParams}{Parameters}
{\em fname} & filename or '-\/' for stdin/stdout. \\
\hline
{\em read} & true if \hyperlink{protocolthe-p}{the} file is to be opened for reading, false if opened for writing.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success 
\end{DoxyReturn}
\hypertarget{classTlv_aa6e539c5cd514f9113666455d02d2eca}{
\index{Tlv@{Tlv}!read@{read}}
\index{read@{read}!Tlv@{Tlv}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}bool Tlv::read (
\begin{DoxyParamCaption}
\item[{uint32\_\-t \&}]{type, }
\item[{vector$<$ uint8\_\-t $>$ \&}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTlv_aa6e539c5cd514f9113666455d02d2eca}


Read a TLV entry from \hyperlink{protocolthe-p}{the} file. 

\begin{DoxyReturn}{Returns}
type of entry. 

data read.

true on success 
\end{DoxyReturn}
\hypertarget{classTlv_af90355225c84cb0a5fcb2290dd343a79}{
\index{Tlv@{Tlv}!write@{write}}
\index{write@{write}!Tlv@{Tlv}}
\subsubsection[{write}]{\setlength{\rightskip}{0pt plus 5cm}bool Tlv::write (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{type, }
\item[{vector$<$ uint8\_\-t $>$ \&}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTlv_af90355225c84cb0a5fcb2290dd343a79}


Write a TLV entry to \hyperlink{protocolthe-p}{the} file. 

\begin{DoxyReturn}{Returns}
type of entry. 

data to be written.

true on success 
\end{DoxyReturn}


The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libxorp/tlv.hh\end{DoxyCompactItemize}
