\hypertarget{classIpHeader4}{
\section{IpHeader4 Class Reference}
\label{classIpHeader4}\index{IpHeader4@{IpHeader4}}
}


\hyperlink{classIPv4}{IPv4} packet header.  




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

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

\item 
const uint8\_\-t $\ast$ \hyperlink{classIpHeader4_aa227f4c062a5016b1a087981680af616}{data} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} buffer data. \item\end{DoxyCompactList}\item 
\hypertarget{classIpHeader4_abf7c767402b64d32d79df2b6e48fdd4a}{
uint8\_\-t \hyperlink{classIpHeader4_abf7c767402b64d32d79df2b6e48fdd4a}{ip\_\-vhl} () const }
\label{classIpHeader4_abf7c767402b64d32d79df2b6e48fdd4a}

\begin{DoxyCompactList}\small\item\em Methods to get various IP header fields. \item\end{DoxyCompactList}\item 
\hypertarget{classIpHeader4_a10fff6bccaa4fde95557cf97b56c5b6c}{
uint8\_\-t {\bfseries ip\_\-tos} () const }
\label{classIpHeader4_a10fff6bccaa4fde95557cf97b56c5b6c}

\item 
\hypertarget{classIpHeader4_a492c69ccd77198e673881b59294c1596}{
uint16\_\-t {\bfseries ip\_\-len} () const }
\label{classIpHeader4_a492c69ccd77198e673881b59294c1596}

\item 
\hypertarget{classIpHeader4_a211cc51c81aa67f570483581a1bee222}{
uint16\_\-t {\bfseries ip\_\-id} () const }
\label{classIpHeader4_a211cc51c81aa67f570483581a1bee222}

\item 
\hypertarget{classIpHeader4_ae4c985b4198caaed4f35a738b09cd4f8}{
uint16\_\-t {\bfseries ip\_\-off} () const }
\label{classIpHeader4_ae4c985b4198caaed4f35a738b09cd4f8}

\item 
\hypertarget{classIpHeader4_a16293438e7ff097c24ea1a7dfd69d433}{
uint8\_\-t {\bfseries ip\_\-ttl} () const }
\label{classIpHeader4_a16293438e7ff097c24ea1a7dfd69d433}

\item 
\hypertarget{classIpHeader4_a4a91a576f220623d6e027ed9300f90f2}{
uint8\_\-t {\bfseries ip\_\-p} () const }
\label{classIpHeader4_a4a91a576f220623d6e027ed9300f90f2}

\item 
\hypertarget{classIpHeader4_a274fe3539897616f1309d31648588ec8}{
uint16\_\-t {\bfseries ip\_\-sum} () const }
\label{classIpHeader4_a274fe3539897616f1309d31648588ec8}

\item 
\hypertarget{classIpHeader4_a630f8ce5b293f763a3c4283654ff1e37}{
\hyperlink{classIPv4}{IPv4} {\bfseries ip\_\-src} () const }
\label{classIpHeader4_a630f8ce5b293f763a3c4283654ff1e37}

\item 
\hypertarget{classIpHeader4_a03be1e682ce72ed121da3f5a801b5874}{
\hyperlink{classIPv4}{IPv4} {\bfseries ip\_\-dst} () const }
\label{classIpHeader4_a03be1e682ce72ed121da3f5a801b5874}

\item 
\hypertarget{classIpHeader4_a14b62529a41a789117717d90aa307684}{
uint16\_\-t {\bfseries ip\_\-len\_\-host} () const }
\label{classIpHeader4_a14b62529a41a789117717d90aa307684}

\item 
uint8\_\-t \hyperlink{classIpHeader4_a31a554a0b9f6a3fb6d5692df3c2e11fb}{ip\_\-version} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} IP protocol version of \hyperlink{protocolthe-p}{the} header. \item\end{DoxyCompactList}\item 
uint8\_\-t \hyperlink{classIpHeader4_abf23d34e4104dc807d35fa409ff03e19}{ip\_\-header\_\-len} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size (including any header options). \item\end{DoxyCompactList}\item 
uint16\_\-t \hyperlink{classIpHeader4_ac18b63820eb769559be78973c91b58be}{ip\_\-fragment\_\-offset} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment offset (excluding \hyperlink{protocolthe-p}{the} fragment flags). \item\end{DoxyCompactList}\item 
uint16\_\-t \hyperlink{classIpHeader4_a2f7131a79b801ec5fe8d2aaf80e50973}{ip\_\-fragment\_\-flags} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment flags. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIpHeader4_adfabc6d580a23628fc59d169b10928e4}{is\_\-valid\_\-version} () const 
\begin{DoxyCompactList}\small\item\em Test whether \hyperlink{protocolthe-p}{the} IP header version is valid. \item\end{DoxyCompactList}\item 
int \hyperlink{classIpHeader4_afafeff650d4d3ef7c363fd4d0b039227}{fragment} (size\_\-t mtu, list$<$ vector$<$ uint8\_\-t $>$ $>$ \&fragments, bool do\_\-checksum, string \&error\_\-msg) const 
\begin{DoxyCompactList}\small\item\em Fragment an \hyperlink{classIPv4}{IPv4} packet. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static size\_\-t \hyperlink{classIpHeader4_a18f2f6ee1b7093e1036c068fd6d0f338}{size} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIpHeader4_ae0a8824a2b4a938e93c889bb0b3477a0}{
static const size\_\-t {\bfseries SIZE} = 20}
\label{classIpHeader4_ae0a8824a2b4a938e93c889bb0b3477a0}

\item 
\hypertarget{classIpHeader4_a8501892f37f6a627b52b0b410ac36207}{
static const uint8\_\-t {\bfseries IP\_\-VERSION} = 4}
\label{classIpHeader4_a8501892f37f6a627b52b0b410ac36207}

\end{DoxyCompactItemize}
\subsection*{Static Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIpHeader4_acc492c536336fc62976b97d94fbc7d12}{
static const uint16\_\-t {\bfseries FRAGMENT\_\-OFFSET\_\-MASK} = 0x1fff}
\label{classIpHeader4_acc492c536336fc62976b97d94fbc7d12}

\item 
\hypertarget{classIpHeader4_a35f6a1f207f38c11011a45787a16d583}{
static const uint16\_\-t {\bfseries FRAGMENT\_\-FLAGS\_\-MASK} = 0xe000}
\label{classIpHeader4_a35f6a1f207f38c11011a45787a16d583}

\item 
\hypertarget{classIpHeader4_a973750cc17d6a65bbec3a2d95a8b151d}{
static const uint16\_\-t {\bfseries FRAGMENT\_\-FLAGS\_\-IP\_\-DF} = 0x4000}
\label{classIpHeader4_a973750cc17d6a65bbec3a2d95a8b151d}

\item 
\hypertarget{classIpHeader4_a3d3152f53f90eb4cdbc2ce24d545fb41}{
static const uint16\_\-t {\bfseries FRAGMENT\_\-FLAGS\_\-IP\_\-MF} = 0x2000}
\label{classIpHeader4_a3d3152f53f90eb4cdbc2ce24d545fb41}

\item 
\hypertarget{classIpHeader4_a3a50ccc6d3526ebc4cbac23b15a92be8}{
static const uint8\_\-t {\bfseries OPTIONS\_\-IPOPT\_\-EOL} = 0}
\label{classIpHeader4_a3a50ccc6d3526ebc4cbac23b15a92be8}

\item 
\hypertarget{classIpHeader4_a717d8b8c819cff4154103062a2adb3de}{
static const uint8\_\-t {\bfseries OPTIONS\_\-IPOPT\_\-NOP} = 1}
\label{classIpHeader4_a717d8b8c819cff4154103062a2adb3de}

\item 
\hypertarget{classIpHeader4_afc55c03e5588360a5b3f683f6bc8751c}{
static const size\_\-t {\bfseries OPTIONS\_\-IPOPT\_\-OLEN} = 1}
\label{classIpHeader4_afc55c03e5588360a5b3f683f6bc8751c}

\item 
\hypertarget{classIpHeader4_a58253436adb2f441337e433f2f283f1a}{
static const uint8\_\-t {\bfseries OPTIONS\_\-COPIED\_\-FLAG} = 0x80}
\label{classIpHeader4_a58253436adb2f441337e433f2f283f1a}

\item 
\hypertarget{classIpHeader4_abc8ce81b4cef44424a5ba9fe65bf1daf}{
static const size\_\-t {\bfseries \_\-ip\_\-vhl\_\-sizeof} = 1}
\label{classIpHeader4_abc8ce81b4cef44424a5ba9fe65bf1daf}

\item 
\hypertarget{classIpHeader4_a91ae3637ed7b24d86081f0858f7bae46}{
static const size\_\-t {\bfseries \_\-ip\_\-tos\_\-sizeof} = 1}
\label{classIpHeader4_a91ae3637ed7b24d86081f0858f7bae46}

\item 
\hypertarget{classIpHeader4_a2c1804c372743922a08e42e6d098686f}{
static const size\_\-t {\bfseries \_\-ip\_\-len\_\-sizeof} = 2}
\label{classIpHeader4_a2c1804c372743922a08e42e6d098686f}

\item 
\hypertarget{classIpHeader4_a7a5f6831a7ea9ccaf0959207da698e88}{
static const size\_\-t {\bfseries \_\-ip\_\-id\_\-sizeof} = 2}
\label{classIpHeader4_a7a5f6831a7ea9ccaf0959207da698e88}

\item 
\hypertarget{classIpHeader4_aead498cc7948b81fca992803be73912c}{
static const size\_\-t {\bfseries \_\-ip\_\-off\_\-sizeof} = 2}
\label{classIpHeader4_aead498cc7948b81fca992803be73912c}

\item 
\hypertarget{classIpHeader4_a768da457be2c210e1bd84ffc57b8f42b}{
static const size\_\-t {\bfseries \_\-ip\_\-ttl\_\-sizeof} = 1}
\label{classIpHeader4_a768da457be2c210e1bd84ffc57b8f42b}

\item 
\hypertarget{classIpHeader4_a8843d68098b5a3bb6fdc0090a73ffd70}{
static const size\_\-t {\bfseries \_\-ip\_\-p\_\-sizeof} = 1}
\label{classIpHeader4_a8843d68098b5a3bb6fdc0090a73ffd70}

\item 
\hypertarget{classIpHeader4_a44e5e51f171e122ea3ef9b6af0c4a710}{
static const size\_\-t {\bfseries \_\-ip\_\-sum\_\-sizeof} = 2}
\label{classIpHeader4_a44e5e51f171e122ea3ef9b6af0c4a710}

\item 
\hypertarget{classIpHeader4_aae4fb8418536b738fbefddb5a0da624e}{
static const size\_\-t {\bfseries \_\-ip\_\-src\_\-sizeof} = 4}
\label{classIpHeader4_aae4fb8418536b738fbefddb5a0da624e}

\item 
\hypertarget{classIpHeader4_aa51322eb8c4166c3d3c19f5513e040eb}{
static const size\_\-t {\bfseries \_\-ip\_\-dst\_\-sizeof} = 4}
\label{classIpHeader4_aa51322eb8c4166c3d3c19f5513e040eb}

\item 
\hypertarget{classIpHeader4_a2a0a87a4d808573b25d89fefa2df0669}{
static const size\_\-t {\bfseries \_\-ip\_\-vhl\_\-offset} = 0}
\label{classIpHeader4_a2a0a87a4d808573b25d89fefa2df0669}

\item 
\hypertarget{classIpHeader4_a3fe335245e28c84ed627329b122a80c6}{
static const size\_\-t {\bfseries \_\-ip\_\-tos\_\-offset} = \_\-ip\_\-vhl\_\-offset + \_\-ip\_\-vhl\_\-sizeof}
\label{classIpHeader4_a3fe335245e28c84ed627329b122a80c6}

\item 
\hypertarget{classIpHeader4_a0aa15ac1f86247ac0991952c9c41aae3}{
static const size\_\-t {\bfseries \_\-ip\_\-len\_\-offset} = \_\-ip\_\-tos\_\-offset + \_\-ip\_\-tos\_\-sizeof}
\label{classIpHeader4_a0aa15ac1f86247ac0991952c9c41aae3}

\item 
\hypertarget{classIpHeader4_aeb4a9493e057742e82f38073679530ba}{
static const size\_\-t {\bfseries \_\-ip\_\-id\_\-offset} = \_\-ip\_\-len\_\-offset + \_\-ip\_\-len\_\-sizeof}
\label{classIpHeader4_aeb4a9493e057742e82f38073679530ba}

\item 
\hypertarget{classIpHeader4_aef210313dae4a5f0db8c49ce271dee89}{
static const size\_\-t {\bfseries \_\-ip\_\-off\_\-offset} = \_\-ip\_\-id\_\-offset + \_\-ip\_\-id\_\-sizeof}
\label{classIpHeader4_aef210313dae4a5f0db8c49ce271dee89}

\item 
\hypertarget{classIpHeader4_aaa237ce20e2171205c0f06d0b0a3a148}{
static const size\_\-t {\bfseries \_\-ip\_\-ttl\_\-offset} = \_\-ip\_\-off\_\-offset + \_\-ip\_\-off\_\-sizeof}
\label{classIpHeader4_aaa237ce20e2171205c0f06d0b0a3a148}

\item 
\hypertarget{classIpHeader4_a3b3e7da8aabca1158c93e95ab6b5af64}{
static const size\_\-t {\bfseries \_\-ip\_\-p\_\-offset} = \_\-ip\_\-ttl\_\-offset + \_\-ip\_\-ttl\_\-sizeof}
\label{classIpHeader4_a3b3e7da8aabca1158c93e95ab6b5af64}

\item 
\hypertarget{classIpHeader4_a4767d005de37c9a1ba516a656266f3b7}{
static const size\_\-t {\bfseries \_\-ip\_\-sum\_\-offset} = \_\-ip\_\-p\_\-offset + \_\-ip\_\-p\_\-sizeof}
\label{classIpHeader4_a4767d005de37c9a1ba516a656266f3b7}

\item 
\hypertarget{classIpHeader4_ada2e5a29d5a352eabf71d3f66e0ff43a}{
static const size\_\-t {\bfseries \_\-ip\_\-src\_\-offset} = \_\-ip\_\-sum\_\-offset + \_\-ip\_\-sum\_\-sizeof}
\label{classIpHeader4_ada2e5a29d5a352eabf71d3f66e0ff43a}

\item 
\hypertarget{classIpHeader4_af6ab7090c8b143ac4ba0ca5e17905935}{
static const size\_\-t {\bfseries \_\-ip\_\-dst\_\-offset} = \_\-ip\_\-src\_\-offset + \_\-ip\_\-src\_\-sizeof}
\label{classIpHeader4_af6ab7090c8b143ac4ba0ca5e17905935}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIpHeader4_acf813ec2eee94ef14586bb2d9e43d4d7}{
const uint8\_\-t $\ast$ {\bfseries \_\-data}}
\label{classIpHeader4_acf813ec2eee94ef14586bb2d9e43d4d7}

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

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

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

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

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

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

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

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

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

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

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classIPv4}{IPv4} packet header. The \hyperlink{classIPv4}{IPv4} packet header has \hyperlink{protocolthe-p}{the} following content:

ip\_\-vhl (1 byte): // IP ver/hdrlen (version $<$$<$ 4 $|$ header length $>$$>$ 2) ip\_\-tos (1 byte): // Type of service ip\_\-len (2 bytes): // Total length ip\_\-id (2 bytes): // Identification ip\_\-off (2 bytes): // Fragment offset field (least-\/significant 13 bits) ip\_\-ttl (1 byte): // Time to live ip\_\-p (1 byte): // \hyperlink{classProtocol}{Protocol} ip\_\-sum (2 bytes): // Checksum ip\_\-src (4 bytes): // Source address ip\_\-dst (4 bytes): // Destination address 

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


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} buffer data. 
\end{DoxyReturn}
\hypertarget{classIpHeader4_afafeff650d4d3ef7c363fd4d0b039227}{
\index{IpHeader4@{IpHeader4}!fragment@{fragment}}
\index{fragment@{fragment}!IpHeader4@{IpHeader4}}
\subsubsection[{fragment}]{\setlength{\rightskip}{0pt plus 5cm}int IpHeader4::fragment (
\begin{DoxyParamCaption}
\item[{size\_\-t}]{mtu, }
\item[{list$<$ vector$<$ uint8\_\-t $>$ $>$ \&}]{fragments, }
\item[{bool}]{do\_\-checksum, }
\item[{string \&}]{error\_\-msg}
\end{DoxyParamCaption}
) const}}
\label{classIpHeader4_afafeff650d4d3ef7c363fd4d0b039227}


Fragment an \hyperlink{classIPv4}{IPv4} packet. 

Note: If \hyperlink{protocolthe-p}{the} original packet is not larger than \hyperlink{protocolthe-p}{the} MTU, then \hyperlink{protocolthe-p}{the} packet is not fragmented (i.e., fragments is empty), and \hyperlink{protocolthe-p}{the} return value is XORP\_\-OK.


\begin{DoxyParams}{Parameters}
{\em mtu} & \hyperlink{protocolthe-p}{the} MTU for fragmenting \hyperlink{protocolthe-p}{the} packet. \\
\hline
{\em fragments} & \hyperlink{protocolthe-p}{the} return-\/by-\/reference fragments of \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet. \\
\hline
{\em do\_\-checksum} & if true, compute and set \hyperlink{protocolthe-p}{the} checksum in \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} header, otherwise reset it to zero. \\
\hline
{\em error\_\-msg} & \hyperlink{protocolthe-p}{the} error message (if error). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classIpHeader4_a2f7131a79b801ec5fe8d2aaf80e50973}{
\index{IpHeader4@{IpHeader4}!ip\_\-fragment\_\-flags@{ip\_\-fragment\_\-flags}}
\index{ip\_\-fragment\_\-flags@{ip\_\-fragment\_\-flags}!IpHeader4@{IpHeader4}}
\subsubsection[{ip\_\-fragment\_\-flags}]{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t IpHeader4::ip\_\-fragment\_\-flags (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4_a2f7131a79b801ec5fe8d2aaf80e50973}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment flags. 
\end{DoxyReturn}
\hypertarget{classIpHeader4_ac18b63820eb769559be78973c91b58be}{
\index{IpHeader4@{IpHeader4}!ip\_\-fragment\_\-offset@{ip\_\-fragment\_\-offset}}
\index{ip\_\-fragment\_\-offset@{ip\_\-fragment\_\-offset}!IpHeader4@{IpHeader4}}
\subsubsection[{ip\_\-fragment\_\-offset}]{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t IpHeader4::ip\_\-fragment\_\-offset (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4_ac18b63820eb769559be78973c91b58be}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} fragment offset (excluding \hyperlink{protocolthe-p}{the} fragment flags). 
\end{DoxyReturn}
\hypertarget{classIpHeader4_abf23d34e4104dc807d35fa409ff03e19}{
\index{IpHeader4@{IpHeader4}!ip\_\-header\_\-len@{ip\_\-header\_\-len}}
\index{ip\_\-header\_\-len@{ip\_\-header\_\-len}!IpHeader4@{IpHeader4}}
\subsubsection[{ip\_\-header\_\-len}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t IpHeader4::ip\_\-header\_\-len (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4_abf23d34e4104dc807d35fa409ff03e19}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size (including any header options). 
\end{DoxyReturn}
\hypertarget{classIpHeader4_a31a554a0b9f6a3fb6d5692df3c2e11fb}{
\index{IpHeader4@{IpHeader4}!ip\_\-version@{ip\_\-version}}
\index{ip\_\-version@{ip\_\-version}!IpHeader4@{IpHeader4}}
\subsubsection[{ip\_\-version}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t IpHeader4::ip\_\-version (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4_a31a554a0b9f6a3fb6d5692df3c2e11fb}


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

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} IP protocol version of \hyperlink{protocolthe-p}{the} header. 
\end{DoxyReturn}
\hypertarget{classIpHeader4_adfabc6d580a23628fc59d169b10928e4}{
\index{IpHeader4@{IpHeader4}!is\_\-valid\_\-version@{is\_\-valid\_\-version}}
\index{is\_\-valid\_\-version@{is\_\-valid\_\-version}!IpHeader4@{IpHeader4}}
\subsubsection[{is\_\-valid\_\-version}]{\setlength{\rightskip}{0pt plus 5cm}bool IpHeader4::is\_\-valid\_\-version (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIpHeader4_adfabc6d580a23628fc59d169b10928e4}


Test whether \hyperlink{protocolthe-p}{the} IP header version is valid. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} IP header version is valid, otherwise false. 
\end{DoxyReturn}
\hypertarget{classIpHeader4_a18f2f6ee1b7093e1036c068fd6d0f338}{
\index{IpHeader4@{IpHeader4}!size@{size}}
\index{size@{size}!IpHeader4@{IpHeader4}}
\subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}static size\_\-t IpHeader4::size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{classIpHeader4_a18f2f6ee1b7093e1036c068fd6d0f338}


Get \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size. 

Note that this is \hyperlink{protocolthe-p}{the} header size only without any header options.

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} packet header size. 
\end{DoxyReturn}


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}
