Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qnet_unix_p.h File Reference
#include <QtNetwork/private/qtnetworkglobal_p.h>
#include "private/qcore_unix_p.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <resolv.h>
+ Include dependency graph for qnet_unix_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define QT_SOCKOPTLEN_T   QT_SOCKLEN_T
 
#define QT_SOCKET_CONNECT   qt_safe_connect
 

Functions

static int qt_safe_socket (int domain, int type, int protocol, int flags=0)
 
static int qt_safe_accept (int s, struct sockaddr *addr, QT_SOCKLEN_T *addrlen, int flags=0)
 
static int qt_safe_listen (int s, int backlog)
 
static int qt_safe_connect (int sockfd, const struct sockaddr *addr, QT_SOCKLEN_T addrlen)
 
template<typename T >
static int qt_safe_ioctl (int sockfd, unsigned long request, T arg)
 
static int qt_safe_sendmsg (int sockfd, const struct msghdr *msg, int flags)
 
static int qt_safe_recvmsg (int sockfd, struct msghdr *msg, int flags)
 

Macro Definition Documentation

◆ QT_SOCKET_CONNECT

#define QT_SOCKET_CONNECT   qt_safe_connect

Definition at line 115 of file qnet_unix_p.h.

◆ QT_SOCKOPTLEN_T

#define QT_SOCKOPTLEN_T   QT_SOCKLEN_T

Definition at line 42 of file qnet_unix_p.h.

Function Documentation

◆ qt_safe_accept()

static int qt_safe_accept ( int  s,
struct sockaddr *  addr,
QT_SOCKLEN_T *  addrlen,
int  flags = 0 
)
inlinestatic

Definition at line 71 of file qnet_unix_p.h.

References Q_ASSERT.

Referenced by QNativeSocketEnginePrivate::nativeAccept().

+ Here is the caller graph for this function:

◆ qt_safe_connect()

static int qt_safe_connect ( int  sockfd,
const struct sockaddr *  addr,
QT_SOCKLEN_T  addrlen 
)
inlinestatic

Definition at line 107 of file qnet_unix_p.h.

References EINTR_LOOP, QT_SOCKET_CONNECT, and ret.

Referenced by QLocalSocketPrivate::_q_connectToSocket(), and QNativeSocketEnginePrivate::nativeConnect().

+ Here is the caller graph for this function:

◆ qt_safe_ioctl()

template<typename T >
static int qt_safe_ioctl ( int  sockfd,
unsigned long  request,
arg 
)
inlinestatic

Definition at line 129 of file qnet_unix_p.h.

References arg, and request.

Referenced by getMtu(), QNetworkInterfaceManager::interfaceIndexFromName(), QNetworkInterfaceManager::interfaceNameFromIndex(), mandatoryHciIoctlsAvailable(), QNativeSocketEnginePrivate::nativeBytesAvailable(), probeIfType(), and QNativeSocketEnginePrivate::setOption().

+ Here is the caller graph for this function:

◆ qt_safe_listen()

static int qt_safe_listen ( int  s,
int  backlog 
)
inlinestatic

Definition at line 102 of file qnet_unix_p.h.

Referenced by QNativeSocketEnginePrivate::nativeListen().

+ Here is the caller graph for this function:

◆ qt_safe_recvmsg()

static int qt_safe_recvmsg ( int  sockfd,
struct msghdr *  msg,
int  flags 
)
inlinestatic

Definition at line 151 of file qnet_unix_p.h.

References EINTR_LOOP, and ret.

◆ qt_safe_sendmsg()

static int qt_safe_sendmsg ( int  sockfd,
const struct msghdr *  msg,
int  flags 
)
inlinestatic

Definition at line 138 of file qnet_unix_p.h.

References EINTR_LOOP, qt_ignore_sigpipe(), and ret.

Referenced by QNativeSocketEnginePrivate::nativeSendDatagram().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_safe_socket()

static int qt_safe_socket ( int  domain,
int  type,
int  protocol,
int  flags = 0 
)
inlinestatic

Definition at line 45 of file qnet_unix_p.h.

References Q_ASSERT, and socket.

Referenced by QNativeSocketEnginePrivate::createNewSocket(), QNetworkInterfaceManager::interfaceIndexFromName(), QNetworkInterfaceManager::interfaceNameFromIndex(), and mandatoryHciIoctlsAvailable().

+ Here is the caller graph for this function: