\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h}{\section{opal/mca/event/libevent2013/libevent/include/event2/util.h File Reference}
\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h}\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
}


Common convenience functions for cross-\/platform portability and related socket manipulations.  


{\ttfamily \#include \char`\"{}opal\+\_\+rename.\+h\char`\"{}}\\*
{\ttfamily \#include $<$event2/event-\/config.\+h$>$}\\*
{\ttfamily \#include $<$stdarg.\+h$>$}\\*
{\ttfamily \#include $<$sys/socket.\+h$>$}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structevutil__addrinfo}{evutil\+\_\+addrinfo}
\begin{DoxyCompactList}\small\item\em A definition of struct addrinfo for systems that lack it. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1aa9b4bfabbeaae5ba828e808938fa2c}{\#define {\bfseries ev\+\_\+socklen\+\_\+t}~socklen\+\_\+t}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1aa9b4bfabbeaae5ba828e808938fa2c}

\item 
\#define \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t}~int
\begin{DoxyCompactList}\small\item\em A type wide enough to hold the output of \char`\"{}socket()\char`\"{} or \char`\"{}accept()\char`\"{}. \end{DoxyCompactList}\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_aa70c6baf0f9ac418407245579ec2a168}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+C\+L\+O\+S\+E\+S\+O\+C\+K\+E\+T}(s)~\hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a3950f08bc7b4ab52d519eabe7edd1889}{evutil\+\_\+closesocket}(s)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_aa70c6baf0f9ac418407245579ec2a168}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a9a94a2e72982e708333486cf72aab941}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+S\+O\+C\+K\+E\+T\+\_\+\+E\+R\+R\+O\+R}()~(errno)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a9a94a2e72982e708333486cf72aab941}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae8b4fae7790599f7b58e8c269f6b29d8}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+S\+E\+T\+\_\+\+S\+O\+C\+K\+E\+T\+\_\+\+E\+R\+R\+O\+R}(errcode)~do \{ errno = (errcode); \} while (0)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae8b4fae7790599f7b58e8c269f6b29d8}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a28f952fb0f16b057d931fd38ee9bdf5e}{\#define {\bfseries evutil\+\_\+socket\+\_\+geterror}(sock)~(errno)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a28f952fb0f16b057d931fd38ee9bdf5e}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ad5ea5ef81ddcfb299e4867d362ad8654}{\#define {\bfseries evutil\+\_\+socket\+\_\+error\+\_\+to\+\_\+string}(errcode)~(strerror(errcode))}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ad5ea5ef81ddcfb299e4867d362ad8654}

\item 
\#define \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1a42f43db6aaf6e99736329b6611175d}{evutil\+\_\+timercmp}(tvp, uvp, cmp)
\begin{DoxyCompactList}\small\item\em Return true iff the tvp is related to uvp according to the relational operator cmp. \end{DoxyCompactList}\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a393a0aee6129d132a3dd488366352bf2}{\#define {\bfseries evutil\+\_\+timerisset}(tvp)~((tvp)-\/$>$tv\+\_\+sec $\vert$$\vert$ (tvp)-\/$>$tv\+\_\+usec)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a393a0aee6129d132a3dd488366352bf2}

\item 
\#define \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4c296955d33624c18bd4811730caa417}{evutil\+\_\+offsetof}(type, field)~((off\+\_\+t)(\&((type $\ast$)0)-\/$>$field))
\begin{DoxyCompactList}\small\item\em Replacement for offsetof on platforms that don't define it. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf Standard integer types.}\par
{\em Integer type definitions for types that are supposed to be defined in the C99-\/specified stdint.\+h.

Shamefully, some platforms do not include stdint.\+h, so we need to replace it. (If you are on a platform like this, your C headers are now over 10 years out of date. You should bug them to do something about this.)

We define\+:


\begin{DoxyDescription}
\item[ev\+\_\+uint64\+\_\+t, ev\+\_\+uint32\+\_\+t, ev\+\_\+uint16\+\_\+t, ev\+\_\+uint8\+\_\+t ]unsigned integer types of exactly 64, 32, 16, and 8 bits respectively. 
\item[ev\+\_\+int64\+\_\+t, ev\+\_\+int32\+\_\+t, ev\+\_\+int16\+\_\+t, ev\+\_\+int8\+\_\+t ]signed integer types of exactly 64, 32, 16, and 8 bits respectively. 
\item[ev\+\_\+uintptr\+\_\+t, ev\+\_\+intptr\+\_\+t ]unsigned/signed integers large enough to hold a pointer without loss of bits. 
\item[ev\+\_\+ssize\+\_\+t ]A signed type of the same size as size\+\_\+t 
\item[ev\+\_\+off\+\_\+t ]A signed type typically used to represent offsets within a (potentially large) file 
\end{DoxyDescription}}\begin{DoxyCompactItemize}
\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ad9052cd1d14b92812de0796d84af5604}{\#define {\bfseries ev\+\_\+uint8\+\_\+t}~unsigned char}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ad9052cd1d14b92812de0796d84af5604}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab642ae86b43a6d75c52811eb686f0837}{\#define {\bfseries ev\+\_\+int8\+\_\+t}~signed char}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab642ae86b43a6d75c52811eb686f0837}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a6bf36939a205bd52df25c40fe44b7fd7}{\#define {\bfseries ev\+\_\+uintptr\+\_\+t}~ev\+\_\+uint32\+\_\+t}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a6bf36939a205bd52df25c40fe44b7fd7}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4913c495b489d419353b3d1512505ea2}{\#define {\bfseries ev\+\_\+intptr\+\_\+t}~ev\+\_\+int32\+\_\+t}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4913c495b489d419353b3d1512505ea2}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a9fce2c187cee381db4bf5276f76a39e8}{\#define {\bfseries ev\+\_\+ssize\+\_\+t}~ssize\+\_\+t}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a9fce2c187cee381db4bf5276f76a39e8}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a2f968b0d453ef37a233e2d40860296a6}{\#define {\bfseries ev\+\_\+off\+\_\+t}~off\+\_\+t}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a2f968b0d453ef37a233e2d40860296a6}

\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Limits for integer types}\par
{\em These macros hold the largest or smallest values possible for the ev\+\_\+\mbox{[}u\mbox{]}int$\ast$\+\_\+t types. }\begin{DoxyCompactItemize}
\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a34cff4b5f64165a133fd51d3004964db}{\#define {\bfseries E\+V\+\_\+\+U\+I\+N\+T64\+\_\+\+M\+A\+X}~((((ev\+\_\+uint64\+\_\+t)0xffffffff\+U\+L) $<$$<$ 32) $\vert$ 0xffffffff\+U\+L)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a34cff4b5f64165a133fd51d3004964db}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7a5b615c4a5ffb69122263c69d8bb091}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T64\+\_\+\+M\+A\+X}~((((ev\+\_\+int64\+\_\+t) 0x7fffffff\+L) $<$$<$ 32) $\vert$ 0xffffffff\+L)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7a5b615c4a5ffb69122263c69d8bb091}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a20073b67f3e9cdda20215246b11c4f6d}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T64\+\_\+\+M\+I\+N}~((-\/E\+V\+\_\+\+I\+N\+T64\+\_\+\+M\+A\+X) -\/ 1)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a20073b67f3e9cdda20215246b11c4f6d}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a815ab1b931ad8d2b11da526b9071282a}{\#define {\bfseries E\+V\+\_\+\+U\+I\+N\+T32\+\_\+\+M\+A\+X}~((ev\+\_\+uint32\+\_\+t)0xffffffff\+U\+L)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a815ab1b931ad8d2b11da526b9071282a}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_adbfb8c4ad3c2b8d2bec82787c9f0eaa3}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T32\+\_\+\+M\+A\+X}~((ev\+\_\+int32\+\_\+t) 0x7fffffff\+L)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_adbfb8c4ad3c2b8d2bec82787c9f0eaa3}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7899efdfa42ebe54093c85fbc35ba8e5}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T32\+\_\+\+M\+I\+N}~((-\/E\+V\+\_\+\+I\+N\+T32\+\_\+\+M\+A\+X) -\/ 1)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7899efdfa42ebe54093c85fbc35ba8e5}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af85ec3c0198df9bbb370d9c70f1fd2f4}{\#define {\bfseries E\+V\+\_\+\+U\+I\+N\+T16\+\_\+\+M\+A\+X}~((ev\+\_\+uint16\+\_\+t)0xffff\+U\+L)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af85ec3c0198df9bbb370d9c70f1fd2f4}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af6271a010b87f8e78edfb3d576d16909}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T16\+\_\+\+M\+A\+X}~((ev\+\_\+int16\+\_\+t) 0x7fff\+L)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af6271a010b87f8e78edfb3d576d16909}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a10afd44462363963e6cdfc20e10d250a}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T16\+\_\+\+M\+I\+N}~((-\/E\+V\+\_\+\+I\+N\+T16\+\_\+\+M\+A\+X) -\/ 1)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a10afd44462363963e6cdfc20e10d250a}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a8af5a509193ad75cdd20e77a8422d84d}{\#define {\bfseries E\+V\+\_\+\+U\+I\+N\+T8\+\_\+\+M\+A\+X}~255}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a8af5a509193ad75cdd20e77a8422d84d}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae959d5851ca0690f9da6e47fbb8056c9}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T8\+\_\+\+M\+A\+X}~127}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae959d5851ca0690f9da6e47fbb8056c9}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_aa4adcc386a7cb06436af4618301c8b03}{\#define {\bfseries E\+V\+\_\+\+I\+N\+T8\+\_\+\+M\+I\+N}~((-\/E\+V\+\_\+\+I\+N\+T8\+\_\+\+M\+A\+X) -\/ 1)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_aa4adcc386a7cb06436af4618301c8b03}

\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Limits for S\+I\+Z\+E\+\_\+\+T and S\+S\+I\+Z\+E\+\_\+\+T}\par
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a59e6c7724ce1f7e0562d6e24021acb10}{\#define {\bfseries E\+V\+\_\+\+S\+S\+I\+Z\+E\+\_\+\+M\+I\+N}~((-\/E\+V\+\_\+\+S\+S\+I\+Z\+E\+\_\+\+M\+A\+X) -\/ 1)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a59e6c7724ce1f7e0562d6e24021acb10}

\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Manipulation macros for struct timeval.}\par
{\em We define replacements for timeradd, timersub, timerclear, timercmp, and timerisset. }\begin{DoxyCompactItemize}
\item 
\#define {\bfseries evutil\+\_\+timeradd}(tvp, uvp, vvp)
\item 
\#define {\bfseries evutil\+\_\+timersub}(tvp, uvp, vvp)
\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_add4999b82eab8bcb8becc8cb079341a0}{\#define {\bfseries evutil\+\_\+timerclear}(tvp)~(tvp)-\/$>$tv\+\_\+sec = (tvp)-\/$>$tv\+\_\+usec = 0}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_add4999b82eab8bcb8becc8cb079341a0}

\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf evutil\+\_\+getaddrinfo() error codes}\par
{\em These values are possible error codes for \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af72dd0e3c31f03a1de0fd297b1b2691b}{evutil\+\_\+getaddrinfo()} and related functions. }\begin{DoxyCompactItemize}
\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_aaf1a2e7213ceab1be80a752ec8cbd109}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+A\+D\+D\+R\+F\+A\+M\+I\+L\+Y}~-\/901}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_aaf1a2e7213ceab1be80a752ec8cbd109}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae1cb726c0bf1ff8907dfc3b4171742ac}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+A\+G\+A\+I\+N}~-\/902}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae1cb726c0bf1ff8907dfc3b4171742ac}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ac5f1ed6215f25714f371551cb7467ad7}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+B\+A\+D\+F\+L\+A\+G\+S}~-\/903}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ac5f1ed6215f25714f371551cb7467ad7}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a76916ba557e677dafe9c1fd7da89f2b3}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+F\+A\+I\+L}~-\/904}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a76916ba557e677dafe9c1fd7da89f2b3}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a0df5ae5495d39cb471ef5403c2823ab4}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+F\+A\+M\+I\+L\+Y}~-\/905}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a0df5ae5495d39cb471ef5403c2823ab4}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a03351808979dfac04060773ebfd3c06b}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+M\+E\+M\+O\+R\+Y}~-\/906}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a03351808979dfac04060773ebfd3c06b}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1d7b69a78006c0f48d88f88e9b55334b}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+N\+O\+D\+A\+T\+A}~-\/907}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1d7b69a78006c0f48d88f88e9b55334b}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab100c4d4e222d5cdfa2aebcf3a0140e9}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+N\+O\+N\+A\+M\+E}~-\/908}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab100c4d4e222d5cdfa2aebcf3a0140e9}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab2cc1d8d4eead1bc0e15eaae2edaf668}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+S\+E\+R\+V\+I\+C\+E}~-\/909}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab2cc1d8d4eead1bc0e15eaae2edaf668}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ac30b335f48757b2ba10da69f80a87a46}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+S\+O\+C\+K\+T\+Y\+P\+E}~-\/910}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ac30b335f48757b2ba10da69f80a87a46}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a03273ded49de60ab08e489b7d5d5e17e}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+S\+Y\+S\+T\+E\+M}~-\/911}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a03273ded49de60ab08e489b7d5d5e17e}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a34127164b338d82707034566b100b4cb}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+E\+A\+I\+\_\+\+C\+A\+N\+C\+E\+L}~-\/90001}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a34127164b338d82707034566b100b4cb}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a2611f48d74207f6e996189e71ca9742f}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+A\+I\+\_\+\+P\+A\+S\+S\+I\+V\+E}~0x1000}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a2611f48d74207f6e996189e71ca9742f}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1b1fbbc2f3b038e60fd97a620bff9230}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+A\+I\+\_\+\+C\+A\+N\+O\+N\+N\+A\+M\+E}~0x2000}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1b1fbbc2f3b038e60fd97a620bff9230}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a145a3766f56a33a6d845cfd0dba1890d}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+A\+I\+\_\+\+N\+U\+M\+E\+R\+I\+C\+H\+O\+S\+T}~0x4000}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a145a3766f56a33a6d845cfd0dba1890d}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a067c788a683f74e43e87098a68b37e69}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+A\+I\+\_\+\+N\+U\+M\+E\+R\+I\+C\+S\+E\+R\+V}~0x8000}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a067c788a683f74e43e87098a68b37e69}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_abbc6a3beb4ecf5b653a871949a49b53a}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+A\+I\+\_\+\+V4\+M\+A\+P\+P\+E\+D}~0x10000}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_abbc6a3beb4ecf5b653a871949a49b53a}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a437bacd5a8915b541a3e38c965932297}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+A\+I\+\_\+\+A\+L\+L}~0x20000}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a437bacd5a8915b541a3e38c965932297}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1162c61313f61eff48a9533a3309f739}{\#define {\bfseries E\+V\+U\+T\+I\+L\+\_\+\+A\+I\+\_\+\+A\+D\+D\+R\+C\+O\+N\+F\+I\+G}~0x40000}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1162c61313f61eff48a9533a3309f739}

\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a405ce3c11b9672b7547669877c294935}{evutil\+\_\+socketpair} (int d, int type, int protocol, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} sv\mbox{[}2\mbox{]})
\begin{DoxyCompactList}\small\item\em Create two new sockets that are connected to each other. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1b5741a91b809c7f2594c96aa66d4aac}{evutil\+\_\+make\+\_\+socket\+\_\+nonblocking} (\hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} sock)
\begin{DoxyCompactList}\small\item\em Do platform-\/specific operations as needed to make a socket nonblocking. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a050bec12aefa132d8e94e712332f38d9}{evutil\+\_\+make\+\_\+listen\+\_\+socket\+\_\+reuseable} (\hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} sock)
\begin{DoxyCompactList}\small\item\em Do platform-\/specific operations to make a listener socket reusable. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ac5975b58b3c7b7360be7ac1a1df135df}{evutil\+\_\+make\+\_\+socket\+\_\+closeonexec} (\hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} sock)
\begin{DoxyCompactList}\small\item\em Do platform-\/specific operations as needed to close a socket upon a successful execution of one of the exec$\ast$() functions. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a3950f08bc7b4ab52d519eabe7edd1889}{evutil\+\_\+closesocket} (\hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} sock)
\begin{DoxyCompactList}\small\item\em Do the platform-\/specific call needed to close a socket returned from socket() or accept(). \end{DoxyCompactList}\item 
ev\+\_\+int64\+\_\+t \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a87762fbc9974b211df3babfacd99df19}{evutil\+\_\+strtoll} (const char $\ast$s, char $\ast$$\ast$endptr, int base)
\begin{DoxyCompactList}\small\item\em Parse a 64-\/bit value from a string. \end{DoxyCompactList}\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a2ca2db950ffe1e218494428a4c6be268}{int {\bfseries evutil\+\_\+gettimeofday} (struct timeval $\ast$tv, struct \hyperlink{structtimezone}{timezone} $\ast$tz)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a2ca2db950ffe1e218494428a4c6be268}

\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a55dc7427a539b8c710acf6eb117364e1}{int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a55dc7427a539b8c710acf6eb117364e1}{evutil\+\_\+snprintf} (char $\ast$buf, size\+\_\+t buflen, const char $\ast$format,...)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a55dc7427a539b8c710acf6eb117364e1}

\begin{DoxyCompactList}\small\item\em Replacement for snprintf to get consistent behavior on platforms for which the return value of snprintf does not conform to C99. \end{DoxyCompactList}\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a80bb0d174aa64218ce077b0c79df3e0f}{int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a80bb0d174aa64218ce077b0c79df3e0f}{evutil\+\_\+vsnprintf} (char $\ast$buf, size\+\_\+t buflen, const char $\ast$format, va\+\_\+list ap)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a80bb0d174aa64218ce077b0c79df3e0f}

\begin{DoxyCompactList}\small\item\em Replacement for vsnprintf to get consistent behavior on platforms for which the return value of snprintf does not conform to C99. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af21b0b8bc5a13594eccd492d564b64c0}{evutil\+\_\+inet\+\_\+ntop} (int af, const void $\ast$src, char $\ast$dst, size\+\_\+t len)
\begin{DoxyCompactList}\small\item\em Replacement for inet\+\_\+ntop for platforms which lack it. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1457e5a0b461a99ca9d6d5c19e9dd65f}{evutil\+\_\+inet\+\_\+pton} (int af, const char $\ast$src, void $\ast$dst)
\begin{DoxyCompactList}\small\item\em Replacement for inet\+\_\+pton for platforms which lack it. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a8f0601b249a1eef50f16f519df26fe30}{evutil\+\_\+parse\+\_\+sockaddr\+\_\+port} (const char $\ast$str, struct sockaddr $\ast$out, int $\ast$outlen)
\begin{DoxyCompactList}\small\item\em Parse an I\+Pv4 or I\+Pv6 address, with optional port, from a string. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae2397b592e9965630a1bf78a6a688859}{evutil\+\_\+sockaddr\+\_\+cmp} (const struct sockaddr $\ast$sa1, const struct sockaddr $\ast$sa2, int include\+\_\+port)
\begin{DoxyCompactList}\small\item\em Compare two sockaddrs; return 0 if they are equal, or less than 0 if sa1 preceeds sa2, or greater than 0 if sa1 follows sa2. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a56923d1aaa25b89ccb8d3b2def643ed3}{evutil\+\_\+ascii\+\_\+strcasecmp} (const char $\ast$str1, const char $\ast$str2)
\begin{DoxyCompactList}\small\item\em As strcasecmp, but always compares the characters in locale-\/independent A\+S\+C\+I\+I. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4a967b00e4ef0025d7e865f1e28f826b}{evutil\+\_\+ascii\+\_\+strncasecmp} (const char $\ast$str1, const char $\ast$str2, size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em As strncasecmp, but always compares the characters in locale-\/independent A\+S\+C\+I\+I. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af72dd0e3c31f03a1de0fd297b1b2691b}{evutil\+\_\+getaddrinfo} (const char $\ast$nodename, const char $\ast$servname, const struct \hyperlink{structevutil__addrinfo}{evutil\+\_\+addrinfo} $\ast$hints\+\_\+in, struct \hyperlink{structevutil__addrinfo}{evutil\+\_\+addrinfo} $\ast$$\ast$res)
\begin{DoxyCompactList}\small\item\em This function clones getaddrinfo for systems that don't have it. \end{DoxyCompactList}\item 
void \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ad43029540a4878bc49b343e7b0573ef3}{evutil\+\_\+freeaddrinfo} (struct \hyperlink{structevutil__addrinfo}{evutil\+\_\+addrinfo} $\ast$ai)
\begin{DoxyCompactList}\small\item\em Release storage allocated by evutil\+\_\+getaddrinfo or evdns\+\_\+getaddrinfo. \end{DoxyCompactList}\item 
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a09249a88abca73bf3b739bb0dcbc0c72}{const char $\ast$ {\bfseries evutil\+\_\+gai\+\_\+strerror} (int err)}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a09249a88abca73bf3b739bb0dcbc0c72}

\item 
void \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af1ed05b1100d3b6f08a3b66f8c58ad29}{evutil\+\_\+secure\+\_\+rng\+\_\+get\+\_\+bytes} (void $\ast$buf, size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em Generate n bytes of secure pseudorandom data, and store them in buf. \end{DoxyCompactList}\item 
int \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a40a0ef996a117d2e85d3a6a5a94938fc}{evutil\+\_\+secure\+\_\+rng\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Seed the secure random number generator if needed, and return 0 on success or -\/1 on failure. \end{DoxyCompactList}\item 
void \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a3d19c11db91a8831b80104346b451a43}{evutil\+\_\+secure\+\_\+rng\+\_\+add\+\_\+bytes} (const char $\ast$dat, size\+\_\+t datlen)
\begin{DoxyCompactList}\small\item\em Seed the random number generator with extra random bytes. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Common convenience functions for cross-\/platform portability and related socket manipulations. 



\subsection{Macro Definition Documentation}
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4c296955d33624c18bd4811730caa417}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+offsetof@{evutil\+\_\+offsetof}}
\index{evutil\+\_\+offsetof@{evutil\+\_\+offsetof}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+offsetof}]{\setlength{\rightskip}{0pt plus 5cm}\#define evutil\+\_\+offsetof(
\begin{DoxyParamCaption}
\item[{}]{type, }
\item[{}]{field}
\end{DoxyParamCaption}
)~((off\+\_\+t)(\&((type $\ast$)0)-\/$>$field))}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4c296955d33624c18bd4811730caa417}


Replacement for offsetof on platforms that don't define it. 

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+socket\+\_\+t@{evutil\+\_\+socket\+\_\+t}}
\index{evutil\+\_\+socket\+\_\+t@{evutil\+\_\+socket\+\_\+t}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+socket\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}\#define evutil\+\_\+socket\+\_\+t~int}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}


A type wide enough to hold the output of \char`\"{}socket()\char`\"{} or \char`\"{}accept()\char`\"{}. 

On Windows, this is an intptr\+\_\+t; elsewhere, it is an int. 

Referenced by bufferevent\+\_\+socket\+\_\+connect(), evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle(), and evthread\+\_\+make\+\_\+base\+\_\+notifiable().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a6182f91a8aede88fac748b3f424cbb6d}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+timeradd@{evutil\+\_\+timeradd}}
\index{evutil\+\_\+timeradd@{evutil\+\_\+timeradd}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+timeradd}]{\setlength{\rightskip}{0pt plus 5cm}\#define evutil\+\_\+timeradd(
\begin{DoxyParamCaption}
\item[{}]{tvp, }
\item[{}]{uvp, }
\item[{}]{vvp}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a6182f91a8aede88fac748b3f424cbb6d}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{                                                            \(\backslash\)
                (vvp)->tv\_sec = (tvp)->tv\_sec + (uvp)->tv\_sec;          \(\backslash\)
                (vvp)->tv\_usec = (tvp)->tv\_usec + (uvp)->tv\_usec;       \(\backslash\)
                if ((vvp)->tv\_usec >= 1000000) \{                        \(\backslash\)
                        (vvp)->tv\_sec++;                                \(\backslash\)
                        (vvp)->tv\_usec -= 1000000;                      \(\backslash\)
                \}                                                       \(\backslash\)
        \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1a42f43db6aaf6e99736329b6611175d}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+timercmp@{evutil\+\_\+timercmp}}
\index{evutil\+\_\+timercmp@{evutil\+\_\+timercmp}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+timercmp}]{\setlength{\rightskip}{0pt plus 5cm}\#define evutil\+\_\+timercmp(
\begin{DoxyParamCaption}
\item[{}]{tvp, }
\item[{}]{uvp, }
\item[{}]{cmp}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1a42f43db6aaf6e99736329b6611175d}
{\bfseries Value\+:}
\begin{DoxyCode}
(((tvp)->tv\_sec == (uvp)->tv\_sec) ?                             \(\backslash\)
         ((tvp)->tv\_usec cmp (uvp)->tv\_usec) :                          \(\backslash\)
         ((tvp)->tv\_sec cmp (uvp)->tv\_sec))
\end{DoxyCode}


Return true iff the tvp is related to uvp according to the relational operator cmp. 

Recognized values for cmp are ==, $<$=, $<$, $>$=, and $>$. 

Referenced by bufferevent\+\_\+rate\+\_\+limit\+\_\+group\+\_\+set\+\_\+cfg().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab75cdb8eae7b33eac738c46356967399}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+timersub@{evutil\+\_\+timersub}}
\index{evutil\+\_\+timersub@{evutil\+\_\+timersub}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+timersub}]{\setlength{\rightskip}{0pt plus 5cm}\#define evutil\+\_\+timersub(
\begin{DoxyParamCaption}
\item[{}]{tvp, }
\item[{}]{uvp, }
\item[{}]{vvp}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ab75cdb8eae7b33eac738c46356967399}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{                                                            \(\backslash\)
                (vvp)->tv\_sec = (tvp)->tv\_sec - (uvp)->tv\_sec;          \(\backslash\)
                (vvp)->tv\_usec = (tvp)->tv\_usec - (uvp)->tv\_usec;       \(\backslash\)
                if ((vvp)->tv\_usec < 0) \{                               \(\backslash\)
                        (vvp)->tv\_sec--;                                \(\backslash\)
                        (vvp)->tv\_usec += 1000000;                      \(\backslash\)
                \}                                                       \(\backslash\)
        \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


\subsection{Function Documentation}
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a56923d1aaa25b89ccb8d3b2def643ed3}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+ascii\+\_\+strcasecmp@{evutil\+\_\+ascii\+\_\+strcasecmp}}
\index{evutil\+\_\+ascii\+\_\+strcasecmp@{evutil\+\_\+ascii\+\_\+strcasecmp}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+ascii\+\_\+strcasecmp}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+ascii\+\_\+strcasecmp (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str1, }
\item[{const char $\ast$}]{str2}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a56923d1aaa25b89ccb8d3b2def643ed3}


As strcasecmp, but always compares the characters in locale-\/independent A\+S\+C\+I\+I. 

That's useful if you're handling data in A\+S\+C\+I\+I-\/based protocols. 

Referenced by evhttp\+\_\+find\+\_\+header(), evhttp\+\_\+remove\+\_\+header(), and evhttp\+\_\+remove\+\_\+server\+\_\+alias().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4a967b00e4ef0025d7e865f1e28f826b}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+ascii\+\_\+strncasecmp@{evutil\+\_\+ascii\+\_\+strncasecmp}}
\index{evutil\+\_\+ascii\+\_\+strncasecmp@{evutil\+\_\+ascii\+\_\+strncasecmp}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+ascii\+\_\+strncasecmp}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+ascii\+\_\+strncasecmp (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str1, }
\item[{const char $\ast$}]{str2, }
\item[{size\+\_\+t}]{n}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a4a967b00e4ef0025d7e865f1e28f826b}


As strncasecmp, but always compares the characters in locale-\/independent A\+S\+C\+I\+I. 

That's useful if you're handling data in A\+S\+C\+I\+I-\/based protocols. \hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a3950f08bc7b4ab52d519eabe7edd1889}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+closesocket@{evutil\+\_\+closesocket}}
\index{evutil\+\_\+closesocket@{evutil\+\_\+closesocket}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+closesocket}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+closesocket (
\begin{DoxyParamCaption}
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{sock}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a3950f08bc7b4ab52d519eabe7edd1889}


Do the platform-\/specific call needed to close a socket returned from socket() or accept(). 


\begin{DoxyParams}{Parameters}
{\em sock} & The socket to be closed \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}


Referenced by bufferevent\+\_\+socket\+\_\+connect(), evdns\+\_\+base\+\_\+clear\+\_\+nameservers\+\_\+and\+\_\+suspend(), evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle(), and evhttp\+\_\+connection\+\_\+free().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ad43029540a4878bc49b343e7b0573ef3}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+freeaddrinfo@{evutil\+\_\+freeaddrinfo}}
\index{evutil\+\_\+freeaddrinfo@{evutil\+\_\+freeaddrinfo}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+freeaddrinfo}]{\setlength{\rightskip}{0pt plus 5cm}void evutil\+\_\+freeaddrinfo (
\begin{DoxyParamCaption}
\item[{struct {\bf evutil\+\_\+addrinfo} $\ast$}]{ai}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ad43029540a4878bc49b343e7b0573ef3}


Release storage allocated by evutil\+\_\+getaddrinfo or evdns\+\_\+getaddrinfo. 



Referenced by evutil\+\_\+getaddrinfo().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af72dd0e3c31f03a1de0fd297b1b2691b}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+getaddrinfo@{evutil\+\_\+getaddrinfo}}
\index{evutil\+\_\+getaddrinfo@{evutil\+\_\+getaddrinfo}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+getaddrinfo}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+getaddrinfo (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{nodename, }
\item[{const char $\ast$}]{servname, }
\item[{const struct {\bf evutil\+\_\+addrinfo} $\ast$}]{hints\+\_\+in, }
\item[{struct {\bf evutil\+\_\+addrinfo} $\ast$$\ast$}]{res}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af72dd0e3c31f03a1de0fd297b1b2691b}


This function clones getaddrinfo for systems that don't have it. 

For full details, see R\+F\+C 3493, section 6.\+1.

Limitations\+:
\begin{DoxyItemize}
\item When the system has no getaddrinfo, we fall back to gethostbyname\+\_\+r or gethostbyname, with their attendant issues.
\item The A\+I\+\_\+\+V4\+M\+A\+P\+P\+E\+D and A\+I\+\_\+\+A\+L\+L flags are not currently implemented.
\end{DoxyItemize}

For a nonblocking variant, see evdns\+\_\+getaddrinfo. 

References evutil\+\_\+freeaddrinfo().



Referenced by evdns\+\_\+getaddrinfo().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af21b0b8bc5a13594eccd492d564b64c0}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+inet\+\_\+ntop@{evutil\+\_\+inet\+\_\+ntop}}
\index{evutil\+\_\+inet\+\_\+ntop@{evutil\+\_\+inet\+\_\+ntop}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+inet\+\_\+ntop}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ evutil\+\_\+inet\+\_\+ntop (
\begin{DoxyParamCaption}
\item[{int}]{af, }
\item[{const void $\ast$}]{src, }
\item[{char $\ast$}]{dst, }
\item[{size\+\_\+t}]{len}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af21b0b8bc5a13594eccd492d564b64c0}


Replacement for inet\+\_\+ntop for platforms which lack it. 



References evutil\+\_\+snprintf().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1457e5a0b461a99ca9d6d5c19e9dd65f}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+inet\+\_\+pton@{evutil\+\_\+inet\+\_\+pton}}
\index{evutil\+\_\+inet\+\_\+pton@{evutil\+\_\+inet\+\_\+pton}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+inet\+\_\+pton}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+inet\+\_\+pton (
\begin{DoxyParamCaption}
\item[{int}]{af, }
\item[{const char $\ast$}]{src, }
\item[{void $\ast$}]{dst}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1457e5a0b461a99ca9d6d5c19e9dd65f}


Replacement for inet\+\_\+pton for platforms which lack it. 



Referenced by evutil\+\_\+parse\+\_\+sockaddr\+\_\+port().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a050bec12aefa132d8e94e712332f38d9}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+make\+\_\+listen\+\_\+socket\+\_\+reuseable@{evutil\+\_\+make\+\_\+listen\+\_\+socket\+\_\+reuseable}}
\index{evutil\+\_\+make\+\_\+listen\+\_\+socket\+\_\+reuseable@{evutil\+\_\+make\+\_\+listen\+\_\+socket\+\_\+reuseable}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+make\+\_\+listen\+\_\+socket\+\_\+reuseable}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+make\+\_\+listen\+\_\+socket\+\_\+reuseable (
\begin{DoxyParamCaption}
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{sock}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a050bec12aefa132d8e94e712332f38d9}


Do platform-\/specific operations to make a listener socket reusable. 

Specifically, we want to make sure that another program will be able to bind this address right after we've closed the listener.

This differs from Windows's interpretation of \char`\"{}reusable\char`\"{}, which allows multiple listeners to bind the same address at the same time.


\begin{DoxyParams}{Parameters}
{\em sock} & The socket to make reusable \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ac5975b58b3c7b7360be7ac1a1df135df}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+make\+\_\+socket\+\_\+closeonexec@{evutil\+\_\+make\+\_\+socket\+\_\+closeonexec}}
\index{evutil\+\_\+make\+\_\+socket\+\_\+closeonexec@{evutil\+\_\+make\+\_\+socket\+\_\+closeonexec}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+make\+\_\+socket\+\_\+closeonexec}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+make\+\_\+socket\+\_\+closeonexec (
\begin{DoxyParamCaption}
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{sock}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ac5975b58b3c7b7360be7ac1a1df135df}


Do platform-\/specific operations as needed to close a socket upon a successful execution of one of the exec$\ast$() functions. 


\begin{DoxyParams}{Parameters}
{\em sock} & The socket to be closed \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}


Referenced by evthread\+\_\+make\+\_\+base\+\_\+notifiable().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1b5741a91b809c7f2594c96aa66d4aac}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+make\+\_\+socket\+\_\+nonblocking@{evutil\+\_\+make\+\_\+socket\+\_\+nonblocking}}
\index{evutil\+\_\+make\+\_\+socket\+\_\+nonblocking@{evutil\+\_\+make\+\_\+socket\+\_\+nonblocking}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+make\+\_\+socket\+\_\+nonblocking}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+make\+\_\+socket\+\_\+nonblocking (
\begin{DoxyParamCaption}
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{sock}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a1b5741a91b809c7f2594c96aa66d4aac}


Do platform-\/specific operations as needed to make a socket nonblocking. 


\begin{DoxyParams}{Parameters}
{\em sock} & The socket to make nonblocking \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}


Referenced by bufferevent\+\_\+socket\+\_\+connect(), and evthread\+\_\+make\+\_\+base\+\_\+notifiable().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a8f0601b249a1eef50f16f519df26fe30}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+parse\+\_\+sockaddr\+\_\+port@{evutil\+\_\+parse\+\_\+sockaddr\+\_\+port}}
\index{evutil\+\_\+parse\+\_\+sockaddr\+\_\+port@{evutil\+\_\+parse\+\_\+sockaddr\+\_\+port}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+parse\+\_\+sockaddr\+\_\+port}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+parse\+\_\+sockaddr\+\_\+port (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{struct sockaddr $\ast$}]{out, }
\item[{int $\ast$}]{outlen}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a8f0601b249a1eef50f16f519df26fe30}


Parse an I\+Pv4 or I\+Pv6 address, with optional port, from a string. 

Recognized formats are\+:
\begin{DoxyItemize}
\item \mbox{[}I\+Pv6\+Address\mbox{]}\+:port
\item \mbox{[}I\+Pv6\+Address\mbox{]}
\item I\+Pv6\+Address
\item I\+Pv4\+Address\+:port
\item I\+Pv4\+Address
\end{DoxyItemize}

If no port is specified, the port in the output is set to 0.


\begin{DoxyParams}{Parameters}
{\em str} & The string to parse. \\
\hline
{\em out} & A struct sockaddr to hold the result. This should probably be a struct \hyperlink{structsockaddr__storage}{sockaddr\+\_\+storage}. \\
\hline
{\em outlen} & A pointer to the number of bytes that that 'out' can safely hold. Set to the number of bytes used in 'out' on success. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-\/1 if the address is not well-\/formed, if the port is out of range, or if out is not large enough to hold the result. Otherwise returns 0 on success. 
\end{DoxyReturn}


References evutil\+\_\+inet\+\_\+pton().



Referenced by evdns\+\_\+base\+\_\+nameserver\+\_\+ip\+\_\+add().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a3d19c11db91a8831b80104346b451a43}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+secure\+\_\+rng\+\_\+add\+\_\+bytes@{evutil\+\_\+secure\+\_\+rng\+\_\+add\+\_\+bytes}}
\index{evutil\+\_\+secure\+\_\+rng\+\_\+add\+\_\+bytes@{evutil\+\_\+secure\+\_\+rng\+\_\+add\+\_\+bytes}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+secure\+\_\+rng\+\_\+add\+\_\+bytes}]{\setlength{\rightskip}{0pt plus 5cm}void evutil\+\_\+secure\+\_\+rng\+\_\+add\+\_\+bytes (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{dat, }
\item[{size\+\_\+t}]{datlen}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a3d19c11db91a8831b80104346b451a43}


Seed the random number generator with extra random bytes. 

You should almost never need to call this function; it should be sufficient to invoke \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a40a0ef996a117d2e85d3a6a5a94938fc}{evutil\+\_\+secure\+\_\+rng\+\_\+init()}, or let Libevent take care of calling \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a40a0ef996a117d2e85d3a6a5a94938fc}{evutil\+\_\+secure\+\_\+rng\+\_\+init()} on its own.

If you call this function as a {\itshape replacement} for the regular entropy sources, then you need to be sure that your input contains a fairly large amount of strong entropy. Doing so is notoriously hard\+: most people who try get it wrong. Watch out!


\begin{DoxyParams}{Parameters}
{\em dat} & a buffer full of a strong source of random numbers \\
\hline
{\em datlen} & the number of bytes to read from datlen \\
\hline
\end{DoxyParams}
\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af1ed05b1100d3b6f08a3b66f8c58ad29}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+secure\+\_\+rng\+\_\+get\+\_\+bytes@{evutil\+\_\+secure\+\_\+rng\+\_\+get\+\_\+bytes}}
\index{evutil\+\_\+secure\+\_\+rng\+\_\+get\+\_\+bytes@{evutil\+\_\+secure\+\_\+rng\+\_\+get\+\_\+bytes}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+secure\+\_\+rng\+\_\+get\+\_\+bytes}]{\setlength{\rightskip}{0pt plus 5cm}void evutil\+\_\+secure\+\_\+rng\+\_\+get\+\_\+bytes (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{buf, }
\item[{size\+\_\+t}]{n}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_af1ed05b1100d3b6f08a3b66f8c58ad29}


Generate n bytes of secure pseudorandom data, and store them in buf. 

By default, Libevent uses an A\+R\+C4-\/based random number generator, seeded using the platform's entropy source (/dev/urandom on Unix-\/like systems; Crypt\+Gen\+Random on Windows). \hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a40a0ef996a117d2e85d3a6a5a94938fc}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+secure\+\_\+rng\+\_\+init@{evutil\+\_\+secure\+\_\+rng\+\_\+init}}
\index{evutil\+\_\+secure\+\_\+rng\+\_\+init@{evutil\+\_\+secure\+\_\+rng\+\_\+init}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+secure\+\_\+rng\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+secure\+\_\+rng\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a40a0ef996a117d2e85d3a6a5a94938fc}


Seed the secure random number generator if needed, and return 0 on success or -\/1 on failure. 

It is okay to call this function more than once; it will still return 0 if the R\+N\+G has been successfully seeded and -\/1 if it can't be seeded.

Ordinarily you don't need to call this function from your own code; Libevent will seed the R\+N\+G itself the first time it needs good random numbers. You only need to call it if (a) you want to double-\/check that one of the seeding methods did succeed, or (b) you plan to drop the capability to seed (by chrooting, or dropping capabilities, or whatever), and you want to make sure that seeding happens before your program loses the ability to do it. 

Referenced by evdns\+\_\+base\+\_\+new().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae2397b592e9965630a1bf78a6a688859}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+sockaddr\+\_\+cmp@{evutil\+\_\+sockaddr\+\_\+cmp}}
\index{evutil\+\_\+sockaddr\+\_\+cmp@{evutil\+\_\+sockaddr\+\_\+cmp}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+sockaddr\+\_\+cmp}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+sockaddr\+\_\+cmp (
\begin{DoxyParamCaption}
\item[{const struct sockaddr $\ast$}]{sa1, }
\item[{const struct sockaddr $\ast$}]{sa2, }
\item[{int}]{include\+\_\+port}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_ae2397b592e9965630a1bf78a6a688859}


Compare two sockaddrs; return 0 if they are equal, or less than 0 if sa1 preceeds sa2, or greater than 0 if sa1 follows sa2. 

If include\+\_\+port is true, consider the port as well as the address. Only implemented for A\+F\+\_\+\+I\+N\+E\+T and A\+F\+\_\+\+I\+N\+E\+T6 addresses. The ordering is not guaranteed to remain the same between Libevent versions. \hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a405ce3c11b9672b7547669877c294935}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+socketpair@{evutil\+\_\+socketpair}}
\index{evutil\+\_\+socketpair@{evutil\+\_\+socketpair}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+socketpair}]{\setlength{\rightskip}{0pt plus 5cm}int evutil\+\_\+socketpair (
\begin{DoxyParamCaption}
\item[{int}]{d, }
\item[{int}]{type, }
\item[{int}]{protocol, }
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{sv\mbox{[}2\mbox{]}}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a405ce3c11b9672b7547669877c294935}


Create two new sockets that are connected to each other. 

On Unix, this simply calls socketpair(). On Windows, it uses the loopback network interface on 127.\+0.\+0.\+1, and only A\+F\+\_\+\+I\+N\+E\+T,S\+O\+C\+K\+\_\+\+S\+T\+R\+E\+A\+M are supported.

(This may fail on some Windows hosts where firewall software has cleverly decided to keep 127.\+0.\+0.\+1 from talking to itself.)

Parameters and return values are as for socketpair() 

Referenced by evthread\+\_\+make\+\_\+base\+\_\+notifiable().

\hypertarget{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a87762fbc9974b211df3babfacd99df19}{\index{opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}!evutil\+\_\+strtoll@{evutil\+\_\+strtoll}}
\index{evutil\+\_\+strtoll@{evutil\+\_\+strtoll}!opal/mca/event/libevent2013/libevent/include/event2/util.\+h@{opal/mca/event/libevent2013/libevent/include/event2/util.\+h}}
\subsubsection[{evutil\+\_\+strtoll}]{\setlength{\rightskip}{0pt plus 5cm}ev\+\_\+int64\+\_\+t evutil\+\_\+strtoll (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{s, }
\item[{char $\ast$$\ast$}]{endptr, }
\item[{int}]{base}
\end{DoxyParamCaption}
)}}\label{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a87762fbc9974b211df3babfacd99df19}


Parse a 64-\/bit value from a string. 

Arguments are as for strtol. 