\doxysection{include/osmocom/core/byteswap.h File Reference}
\label{byteswap_8h}\index{include/osmocom/core/byteswap.h@{include/osmocom/core/byteswap.h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/endian.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ osmo\+\_\+ntohl}(x)~(x)
\item 
\#define \textbf{ osmo\+\_\+ntohs}(x)~(x)
\item 
\#define \textbf{ osmo\+\_\+htonl}(x)~(x)
\item 
\#define \textbf{ osmo\+\_\+htons}(x)~(x)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static uint32\+\_\+t \textbf{ osmo\+\_\+swab32} (uint32\+\_\+t in)
\begin{DoxyCompactList}\small\item\em byte-\/swap a 32bit word \end{DoxyCompactList}\item 
static uint16\+\_\+t \textbf{ osmo\+\_\+swab16} (uint16\+\_\+t in)
\begin{DoxyCompactList}\small\item\em byte-\/swap a 16bit word \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{byteswap_8h_afabda0c0661d96ff87e119997d5bddd1}} 
\index{byteswap.h@{byteswap.h}!osmo\_htonl@{osmo\_htonl}}
\index{osmo\_htonl@{osmo\_htonl}!byteswap.h@{byteswap.h}}
\doxysubsubsection{osmo\_htonl}
{\footnotesize\ttfamily \#define osmo\+\_\+htonl(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~(x)}

\mbox{\label{byteswap_8h_a621e194c5a89c0c9f0a80168635c8080}} 
\index{byteswap.h@{byteswap.h}!osmo\_htons@{osmo\_htons}}
\index{osmo\_htons@{osmo\_htons}!byteswap.h@{byteswap.h}}
\doxysubsubsection{osmo\_htons}
{\footnotesize\ttfamily \#define osmo\+\_\+htons(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~(x)}

\mbox{\label{byteswap_8h_a0da869fce11ebea3432d08317874f200}} 
\index{byteswap.h@{byteswap.h}!osmo\_ntohl@{osmo\_ntohl}}
\index{osmo\_ntohl@{osmo\_ntohl}!byteswap.h@{byteswap.h}}
\doxysubsubsection{osmo\_ntohl}
{\footnotesize\ttfamily \#define osmo\+\_\+ntohl(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~(x)}

\mbox{\label{byteswap_8h_ab3adb87b4c847819b29c359c19fed0c2}} 
\index{byteswap.h@{byteswap.h}!osmo\_ntohs@{osmo\_ntohs}}
\index{osmo\_ntohs@{osmo\_ntohs}!byteswap.h@{byteswap.h}}
\doxysubsubsection{osmo\_ntohs}
{\footnotesize\ttfamily \#define osmo\+\_\+ntohs(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~(x)}



\doxysubsection{Function Documentation}
\mbox{\label{byteswap_8h_ace04f7608464f154baf391b0930372fb}} 
\index{byteswap.h@{byteswap.h}!osmo\_swab16@{osmo\_swab16}}
\index{osmo\_swab16@{osmo\_swab16}!byteswap.h@{byteswap.h}}
\doxysubsubsection{osmo\_swab16()}
{\footnotesize\ttfamily static uint16\+\_\+t osmo\+\_\+swab16 (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



byte-\/swap a 16bit word 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em in} & to be swapped 16bit word \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
byte-\/swapped 16bit word 
\end{DoxyReturn}
\mbox{\label{byteswap_8h_a6fd5d55d9e5caf60897287cf4b0984d2}} 
\index{byteswap.h@{byteswap.h}!osmo\_swab32@{osmo\_swab32}}
\index{osmo\_swab32@{osmo\_swab32}!byteswap.h@{byteswap.h}}
\doxysubsubsection{osmo\_swab32()}
{\footnotesize\ttfamily static uint32\+\_\+t osmo\+\_\+swab32 (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



byte-\/swap a 32bit word 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em in} & to be swapped 32bit word \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
byte-\/swapped 32bit word 
\end{DoxyReturn}
