\doxysection{src/mtp\+\_\+pcap.c File Reference}
\label{mtp__pcap_8c}\index{src/mtp\_pcap.c@{src/mtp\_pcap.c}}
{\ttfamily \#include $<$osmocom/mtp/mtp\+\_\+pcap.\+h$>$}\newline
{\ttfamily \#include $<$sys/time.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ pcap\+\_\+hdr}
\item 
struct \textbf{ pcaprec\+\_\+hdr}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ pcap\+\_\+hdr} \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+} ((packed))
\item 
int \textbf{ mtp\+\_\+pcap\+\_\+write\+\_\+header} (int fd)
\item 
int \textbf{ mtp\+\_\+pcap\+\_\+write\+\_\+msu} (int fd, const uint8\+\_\+t $\ast$\textbf{ data}, int length)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
uint32\+\_\+t \textbf{ magic\+\_\+number}
\item 
uint16\+\_\+t \textbf{ version\+\_\+major}
\item 
uint16\+\_\+t \textbf{ version\+\_\+minor}
\item 
int32\+\_\+t \textbf{ thiszone}
\item 
uint32\+\_\+t \textbf{ sigfigs}
\item 
uint32\+\_\+t \textbf{ snaplen}
\item 
uint32\+\_\+t \textbf{ network}
\item 
uint32\+\_\+t \textbf{ ts\+\_\+sec}
\item 
uint32\+\_\+t \textbf{ ts\+\_\+usec}
\item 
uint32\+\_\+t \textbf{ incl\+\_\+len}
\item 
uint32\+\_\+t \textbf{ orig\+\_\+len}
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\label{mtp__pcap_8c_a65818cb5fbd175e46b033ab9743def50}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!\_\_attribute\_\_@{\_\_attribute\_\_}}
\index{\_\_attribute\_\_@{\_\_attribute\_\_}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{\_\_attribute\_\_()}
{\footnotesize\ttfamily struct \textbf{ pcap\+\_\+hdr} \+\_\+\+\_\+attribute\+\_\+\+\_\+ (\begin{DoxyParamCaption}\item[{(packed)}]{ }\end{DoxyParamCaption})}

\mbox{\label{mtp__pcap_8c_a16c01a18801be490efe5eb7969ca45ee}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!mtp\_pcap\_write\_header@{mtp\_pcap\_write\_header}}
\index{mtp\_pcap\_write\_header@{mtp\_pcap\_write\_header}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{mtp\_pcap\_write\_header()}
{\footnotesize\ttfamily int mtp\+\_\+pcap\+\_\+write\+\_\+header (\begin{DoxyParamCaption}\item[{int}]{fd }\end{DoxyParamCaption})}



References \textbf{ pcap\+\_\+hdr\+::magic\+\_\+number}.

\mbox{\label{mtp__pcap_8c_a72520b353fc64f15cab5dfa2c2326e00}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!mtp\_pcap\_write\_msu@{mtp\_pcap\_write\_msu}}
\index{mtp\_pcap\_write\_msu@{mtp\_pcap\_write\_msu}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{mtp\_pcap\_write\_msu()}
{\footnotesize\ttfamily int mtp\+\_\+pcap\+\_\+write\+\_\+msu (\begin{DoxyParamCaption}\item[{int}]{fd,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{int}]{length }\end{DoxyParamCaption})}



References \textbf{ data}, \textbf{ pcaprec\+\_\+hdr\+::ts\+\_\+sec}, and \textbf{ pcaprec\+\_\+hdr\+::ts\+\_\+usec}.



\doxysubsection{Variable Documentation}
\mbox{\label{mtp__pcap_8c_af7ebd1acc88da8d5c4018a9b96e4a231}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!incl\_len@{incl\_len}}
\index{incl\_len@{incl\_len}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{incl\_len}
{\footnotesize\ttfamily uint32\+\_\+t incl\+\_\+len}

\mbox{\label{mtp__pcap_8c_a45eaf7e07ea0226c1328ee7d4a5f7948}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!magic\_number@{magic\_number}}
\index{magic\_number@{magic\_number}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{magic\_number}
{\footnotesize\ttfamily uint32\+\_\+t magic\+\_\+number}

\mbox{\label{mtp__pcap_8c_ae29355b72ee4e48dcf249e0fede0155e}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!network@{network}}
\index{network@{network}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{network}
{\footnotesize\ttfamily uint32\+\_\+t network}

\mbox{\label{mtp__pcap_8c_a6a2f0b2b8c5d6c756e4de119c5fe2fad}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!orig\_len@{orig\_len}}
\index{orig\_len@{orig\_len}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{orig\_len}
{\footnotesize\ttfamily uint32\+\_\+t orig\+\_\+len}

\mbox{\label{mtp__pcap_8c_a73f44d04516e34b9edbbf936f10cb81d}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!sigfigs@{sigfigs}}
\index{sigfigs@{sigfigs}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{sigfigs}
{\footnotesize\ttfamily uint32\+\_\+t sigfigs}

\mbox{\label{mtp__pcap_8c_ac2fbfe5646126df83713fb2d42428ed8}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!snaplen@{snaplen}}
\index{snaplen@{snaplen}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{snaplen}
{\footnotesize\ttfamily uint32\+\_\+t snaplen}

\mbox{\label{mtp__pcap_8c_aeb4fa0ab3357f30ebf3be827f6757958}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!thiszone@{thiszone}}
\index{thiszone@{thiszone}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{thiszone}
{\footnotesize\ttfamily int32\+\_\+t thiszone}

\mbox{\label{mtp__pcap_8c_ae1a4b5cc6cf9132afe4b4d20650bf61b}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!ts\_sec@{ts\_sec}}
\index{ts\_sec@{ts\_sec}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{ts\_sec}
{\footnotesize\ttfamily uint32\+\_\+t ts\+\_\+sec}

\mbox{\label{mtp__pcap_8c_a166096819938ab066cf826f69c9b59df}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!ts\_usec@{ts\_usec}}
\index{ts\_usec@{ts\_usec}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{ts\_usec}
{\footnotesize\ttfamily uint32\+\_\+t ts\+\_\+usec}

\mbox{\label{mtp__pcap_8c_ae45ca4ea27a897d2c46eb088e6b139f8}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!version\_major@{version\_major}}
\index{version\_major@{version\_major}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{version\_major}
{\footnotesize\ttfamily uint16\+\_\+t version\+\_\+major}

\mbox{\label{mtp__pcap_8c_a166f22ce4b25488997425405d2a6e42d}} 
\index{mtp\_pcap.c@{mtp\_pcap.c}!version\_minor@{version\_minor}}
\index{version\_minor@{version\_minor}!mtp\_pcap.c@{mtp\_pcap.c}}
\doxysubsubsection{version\_minor}
{\footnotesize\ttfamily uint16\+\_\+t version\+\_\+minor}

