IDA C++ SDK 9.2
Loading...
Searching...
No Matches
pronet.h File Reference

Network related functions. More...

Go to the source code of this file.

Namespaces

namespace  DONT_USE_FUNCS

Functions

ssize_t qsendto (int socket, const SOCKBUF_T buf, size_t size, int flags, const struct sockaddr *dest_addr, SOCKLEN_T addrlen)
ssize_t qrecvfrom (int socket, SOCKBUF_T buf, size_t size, int flags, struct sockaddr *src_addr, SOCKLEN_T *addrlen)
ssize_t qsend (int socket, const void *buf, size_t size)
ssize_t qrecv (int socket, void *buf, size_t size)
int qselect (int nflds, fd_set *rds, fd_set *wds, fd_set *eds, struct timeval *timeout)
int qpoll (pollfd *fds, uint32 nfds, int timeout_ms)
ssize_t DONT_USE_FUNCS::sendto (int, const SOCKBUF_T, size_t, int, const struct sockaddr *, SOCKLEN_T)
ssize_t DONT_USE_FUNCS::recvfrom (int, SOCKBUF_T, size_t, int, struct sockaddr *, SOCKLEN_T *)
ssize_t DONT_USE_FUNCS::send (int, const SOCKBUF_T, size_t, int)
ssize_t DONT_USE_FUNCS::recv (int, SOCKBUF_T, size_t, int)
int DONT_USE_FUNCS::select (int, fd_set *, fd_set *, fd_set *, struct timeval *)
idaman bool ida_export qhost2addr_ (void *out, const char *name, ushort family, ushort port=0)
 Get the IPv4 or IPv6 address corresponding to the given host.
bool qhost2addr (struct sockaddr_in *out, const char *name, ushort port=0)
bool qhost2addr (struct sockaddr_in6 *out, const char *name, ushort port=0)
bool get_my_ip (char out[NI_MAXHOST], const ushort family=AF_INET)
idaman bool ida_export qgethostname (qstring *out)

Detailed Description

Network related functions.

Each of the following functions work just like their C standard equivalent, only they are safer and system independent.

Function Documentation

◆ qsendto()

ssize_t qsendto ( int socket,
const SOCKBUF_T buf,
size_t size,
int flags,
const struct sockaddr * dest_addr,
SOCKLEN_T addrlen )
inline

◆ qrecvfrom()

ssize_t qrecvfrom ( int socket,
SOCKBUF_T buf,
size_t size,
int flags,
struct sockaddr * src_addr,
SOCKLEN_T * addrlen )
inline

◆ qsend()

ssize_t qsend ( int socket,
const void * buf,
size_t size )
inline

◆ qrecv()

ssize_t qrecv ( int socket,
void * buf,
size_t size )
inline

◆ qselect()

int qselect ( int nflds,
fd_set * rds,
fd_set * wds,
fd_set * eds,
struct timeval * timeout )
inline

◆ qpoll()

int qpoll ( pollfd * fds,
uint32 nfds,
int timeout_ms )
inline

◆ qhost2addr_()

idaman bool ida_export qhost2addr_ ( void * out,
const char * name,
ushort family,
ushort port = 0 )

Get the IPv4 or IPv6 address corresponding to the given host.

Parameters
outshould be of type 'sockaddr_in' or 'sockaddr_in6', depending on the value of 'family'.
namethe host name.
familyeither AF_INET or AF_INET6.
porta port number, or 0 for none.
Returns
true on success, false otherwise

◆ qhost2addr() [1/2]

bool qhost2addr ( struct sockaddr_in * out,
const char * name,
ushort port = 0 )
inline

◆ qhost2addr() [2/2]

bool qhost2addr ( struct sockaddr_in6 * out,
const char * name,
ushort port = 0 )
inline

◆ get_my_ip()

bool get_my_ip ( char out[NI_MAXHOST],
const ushort family = AF_INET )

◆ qgethostname()

idaman bool ida_export qgethostname ( qstring * out)