IDA SDK
Functions | Macros
pronet.h File Reference

Detailed Description

Network related functions.

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

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)
 
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. More...
 
bool qhost2addr (struct sockaddr_in *out, const char *name, ushort port=0)
 
bool qhost2addr (struct sockaddr_in6 *out, const char *name, ushort port=0)
 

Macros

#define SIG_SAFE_CALL(expr)   return expr
 
#define SOCKLEN_T   int
 
#define SOCKBUF_T   char *
 

Function Documentation

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.

Note: under Windows CE, only IPv4 is supported.

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