\hypertarget{classIpHeader4Writer}{
\section{IpHeader4Writer Class Reference}
\label{classIpHeader4Writer}\index{IpHeader4Writer@{IpHeader4Writer}}
}


Class for writing data to \hyperlink{classIPv4}{IPv4} packet header.  




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

Inheritance diagram for IpHeader4Writer:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classIpHeader4Writer}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIpHeader4Writer_a6ebc169df186782d477bb4cf70ce9015}{
{\bfseries IpHeader4Writer} (uint8\_\-t $\ast$data)}
\label{classIpHeader4Writer_a6ebc169df186782d477bb4cf70ce9015}

\item 
uint8\_\-t $\ast$ \hyperlink{classIpHeader4Writer_a164c620fed20cd60f7dccb24f39d1ddc}{data} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} buffer data. \item\end{DoxyCompactList}\item 
\hypertarget{classIpHeader4Writer_a434d19843d15bb131274f07a6881d326}{
void \hyperlink{classIpHeader4Writer_a434d19843d15bb131274f07a6881d326}{set\_\-ip\_\-vhl} (uint8\_\-t v)}
\label{classIpHeader4Writer_a434d19843d15bb131274f07a6881d326}

\begin{DoxyCompactList}\small\item\em Methods to set various IP header fields. \item\end{DoxyCompactList}\item 
\hypertarget{classIpHeader4Writer_aa4fd1538daae59b2c6a54ea750cd3ab2}{
void {\bfseries set\_\-ip\_\-tos} (uint8\_\-t v)}
\label{classIpHeader4Writer_aa4fd1538daae59b2c6a54ea750cd3ab2}

\item 
\hypertarget{classIpHeader4Writer_a194e75beabe394ae5a28ddd0ab5070b3}{
void {\bfseries set\_\-ip\_\-len} (uint16\_\-t v)}
\label{classIpHeader4Writer_a194e75beabe394ae5a28ddd0ab5070b3}

\item 
\hypertarget{classIpHeader4Writer_abe111b7e045bcb95527df08e39ea1f6f}{
void {\bfseries set\_\-ip\_\-id} (uint16\_\-t v)}
\label{classIpHeader4Writer_abe111b7e045bcb95527df08e39ea1f6f}

\item 
\hypertarget{classIpHeader4Writer_a07bc9915a685fb7f6ebfd98d1373c6e9}{
void {\bfseries set\_\-ip\_\-off} (uint16\_\-t v)}
\label{classIpHeader4Writer_a07bc9915a685fb7f6ebfd98d1373c6e9}

\item 
\hypertarget{classIpHeader4Writer_ae7c886e6a2d6ea193d61044100517f2e}{
void {\bfseries set\_\-ip\_\-ttl} (uint8\_\-t v)}
\label{classIpHeader4Writer_ae7c886e6a2d6ea193d61044100517f2e}

\item 
\hypertarget{classIpHeader4Writer_afa69c17fc92e8b33761cd485a6aadb86}{
void {\bfseries set\_\-ip\_\-p} (uint8\_\-t v)}
\label{classIpHeader4Writer_afa69c17fc92e8b33761cd485a6aadb86}

\item 
\hypertarget{classIpHeader4Writer_ae7a69aaa357d788709310812eda837e7}{
void {\bfseries set\_\-ip\_\-sum} (uint16\_\-t v)}
\label{classIpHeader4Writer_ae7a69aaa357d788709310812eda837e7}

\item 
\hypertarget{classIpHeader4Writer_a08fc8224745eddb03aa57e89fae6cac8}{
void {\bfseries set\_\-ip\_\-src} (const \hyperlink{classIPv4}{IPv4} \&v)}
\label{classIpHeader4Writer_a08fc8224745eddb03aa57e89fae6cac8}

\item 
\hypertarget{classIpHeader4Writer_a3da911f49aca978631ae29fb10621767}{
void {\bfseries set\_\-ip\_\-dst} (const \hyperlink{classIPv4}{IPv4} \&v)}
\label{classIpHeader4Writer_a3da911f49aca978631ae29fb10621767}

\item 
\hypertarget{classIpHeader4Writer_a3c8a8b395d35bc7c23702136b0b89ef2}{
void \hyperlink{classIpHeader4Writer_a3c8a8b395d35bc7c23702136b0b89ef2}{compute\_\-checksum} ()}
\label{classIpHeader4Writer_a3c8a8b395d35bc7c23702136b0b89ef2}

\begin{DoxyCompactList}\small\item\em A method to compute and set \hyperlink{protocolthe-p}{the} IP checksum. \item\end{DoxyCompactList}\item 
\hypertarget{classIpHeader4Writer_a32bf27ce31841b9161a7b01c019c617b}{
void {\bfseries set\_\-ip\_\-len\_\-host} (uint16\_\-t v)}
\label{classIpHeader4Writer_a32bf27ce31841b9161a7b01c019c617b}

\item 
void \hyperlink{classIpHeader4Writer_adceb290ac5144f2511320ccfda265870}{set\_\-ip\_\-version} (uint8\_\-t v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} IP protocol version of \hyperlink{protocolthe-p}{the} header. \item\end{DoxyCompactList}\item 
void \hyperlink{classIpHeader4Writer_a28f9bad6e6a2917d47dae1f607a77d97}{set\_\-ip\_\-header\_\-len} (uint8\_\-t v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size (including any header options). \item\end{DoxyCompactList}\item 
void \hyperlink{classIpHeader4Writer_a2b18ec99a9d12e90bed3485950f74b38}{set\_\-ip\_\-fragment\_\-offset} (uint16\_\-t v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment offset (excluding \hyperlink{protocolthe-p}{the} fragment flags). \item\end{DoxyCompactList}\item 
void \hyperlink{classIpHeader4Writer_af36f98db02dcd6ec688c23ec065e3266}{set\_\-ip\_\-fragment\_\-flags} (uint16\_\-t v)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment flags. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIpHeader4Writer_adffdeb26e31e72e929ee5bdd0c4ac952}{
uint8\_\-t $\ast$ {\bfseries \_\-data}}
\label{classIpHeader4Writer_adffdeb26e31e72e929ee5bdd0c4ac952}

\item 
\hypertarget{classIpHeader4Writer_a07a91468230484afa51ab87254f44ad6}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-vhl}}
\label{classIpHeader4Writer_a07a91468230484afa51ab87254f44ad6}

\item 
\hypertarget{classIpHeader4Writer_a0546601b1306ecbd68adb11a640c84e8}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-tos}}
\label{classIpHeader4Writer_a0546601b1306ecbd68adb11a640c84e8}

\item 
\hypertarget{classIpHeader4Writer_adac8de3ae60740ab64e4eb03eb87002c}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-len}}
\label{classIpHeader4Writer_adac8de3ae60740ab64e4eb03eb87002c}

\item 
\hypertarget{classIpHeader4Writer_aaec96a8b303f04ccc6ad749972a4eea2}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-id}}
\label{classIpHeader4Writer_aaec96a8b303f04ccc6ad749972a4eea2}

\item 
\hypertarget{classIpHeader4Writer_aac13287d2d93642ce467e90c7ba0e5e9}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-off}}
\label{classIpHeader4Writer_aac13287d2d93642ce467e90c7ba0e5e9}

\item 
\hypertarget{classIpHeader4Writer_ae7c7f4783a80d291202e1388ee8ba804}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-ttl}}
\label{classIpHeader4Writer_ae7c7f4783a80d291202e1388ee8ba804}

\item 
\hypertarget{classIpHeader4Writer_a79fc2ed7aa3dee70556f10fda875c731}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-p}}
\label{classIpHeader4Writer_a79fc2ed7aa3dee70556f10fda875c731}

\item 
\hypertarget{classIpHeader4Writer_a0739708764fd26366cf739cb5af888a5}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-sum}}
\label{classIpHeader4Writer_a0739708764fd26366cf739cb5af888a5}

\item 
\hypertarget{classIpHeader4Writer_ad540a98c15e31bae8d6ed3fe8653b8c1}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-src}}
\label{classIpHeader4Writer_ad540a98c15e31bae8d6ed3fe8653b8c1}

\item 
\hypertarget{classIpHeader4Writer_a30773e9174136a61c354db4143d3fff0}{
uint8\_\-t $\ast$ {\bfseries \_\-ip\_\-dst}}
\label{classIpHeader4Writer_a30773e9174136a61c354db4143d3fff0}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class for writing data to \hyperlink{classIPv4}{IPv4} packet header. 

\subsection{Member Function Documentation}
\hypertarget{classIpHeader4Writer_a164c620fed20cd60f7dccb24f39d1ddc}{
\index{IpHeader4Writer@{IpHeader4Writer}!data@{data}}
\index{data@{data}!IpHeader4Writer@{IpHeader4Writer}}
\subsubsection[{data}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t$\ast$ IpHeader4Writer::data (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4Writer_a164c620fed20cd60f7dccb24f39d1ddc}


Get \hyperlink{protocolthe-p}{the} buffer data. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} buffer data. 
\end{DoxyReturn}
\hypertarget{classIpHeader4Writer_af36f98db02dcd6ec688c23ec065e3266}{
\index{IpHeader4Writer@{IpHeader4Writer}!set\_\-ip\_\-fragment\_\-flags@{set\_\-ip\_\-fragment\_\-flags}}
\index{set\_\-ip\_\-fragment\_\-flags@{set\_\-ip\_\-fragment\_\-flags}!IpHeader4Writer@{IpHeader4Writer}}
\subsubsection[{set\_\-ip\_\-fragment\_\-flags}]{\setlength{\rightskip}{0pt plus 5cm}void IpHeader4Writer::set\_\-ip\_\-fragment\_\-flags (
\begin{DoxyParamCaption}
\item[{uint16\_\-t}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4Writer_af36f98db02dcd6ec688c23ec065e3266}


Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment flags. 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment flags. \\
\hline
\end{DoxyParams}
\hypertarget{classIpHeader4Writer_a2b18ec99a9d12e90bed3485950f74b38}{
\index{IpHeader4Writer@{IpHeader4Writer}!set\_\-ip\_\-fragment\_\-offset@{set\_\-ip\_\-fragment\_\-offset}}
\index{set\_\-ip\_\-fragment\_\-offset@{set\_\-ip\_\-fragment\_\-offset}!IpHeader4Writer@{IpHeader4Writer}}
\subsubsection[{set\_\-ip\_\-fragment\_\-offset}]{\setlength{\rightskip}{0pt plus 5cm}void IpHeader4Writer::set\_\-ip\_\-fragment\_\-offset (
\begin{DoxyParamCaption}
\item[{uint16\_\-t}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4Writer_a2b18ec99a9d12e90bed3485950f74b38}


Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment offset (excluding \hyperlink{protocolthe-p}{the} fragment flags). 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment offset (excluding \hyperlink{protocolthe-p}{the} fragment flags). \\
\hline
\end{DoxyParams}
\hypertarget{classIpHeader4Writer_a28f9bad6e6a2917d47dae1f607a77d97}{
\index{IpHeader4Writer@{IpHeader4Writer}!set\_\-ip\_\-header\_\-len@{set\_\-ip\_\-header\_\-len}}
\index{set\_\-ip\_\-header\_\-len@{set\_\-ip\_\-header\_\-len}!IpHeader4Writer@{IpHeader4Writer}}
\subsubsection[{set\_\-ip\_\-header\_\-len}]{\setlength{\rightskip}{0pt plus 5cm}void IpHeader4Writer::set\_\-ip\_\-header\_\-len (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4Writer_a28f9bad6e6a2917d47dae1f607a77d97}


Set \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size (including any header options). 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size (including any header options). \\
\hline
\end{DoxyParams}
\hypertarget{classIpHeader4Writer_adceb290ac5144f2511320ccfda265870}{
\index{IpHeader4Writer@{IpHeader4Writer}!set\_\-ip\_\-version@{set\_\-ip\_\-version}}
\index{set\_\-ip\_\-version@{set\_\-ip\_\-version}!IpHeader4Writer@{IpHeader4Writer}}
\subsubsection[{set\_\-ip\_\-version}]{\setlength{\rightskip}{0pt plus 5cm}void IpHeader4Writer::set\_\-ip\_\-version (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4Writer_adceb290ac5144f2511320ccfda265870}


Set \hyperlink{protocolthe-p}{the} IP protocol version of \hyperlink{protocolthe-p}{the} header. 


\begin{DoxyParams}{Parameters}
{\em v} & \hyperlink{protocolthe-p}{the} IP protocol version of \hyperlink{protocolthe-p}{the} header. \\
\hline
\end{DoxyParams}


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