wutsocket: implement missing functions

This commit is contained in:
GaryOderNichts
2021-02-09 17:22:24 +01:00
committed by fincs
parent efc1bd47ff
commit f1e9cbd58a
11 changed files with 446 additions and 0 deletions

57
include/nsysnet/_netdb.h Normal file
View File

@@ -0,0 +1,57 @@
#pragma once
#include <wut.h>
#include <netdb.h>
/**
* \defgroup nsysnet_netdb Netdb
* \ingroup nsysnet
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
struct hostent *
RPLWRAP(gethostbyaddr)(const void *addr,
size_t len,
int type);
struct hostent *
RPLWRAP(gethostbyname)(const char *name);
int
RPLWRAP(getaddrinfo)(const char *node,
const char *service,
const struct addrinfo *hints,
struct addrinfo **res);
void
RPLWRAP(freeaddrinfo)(struct addrinfo *res);
int
RPLWRAP(getnameinfo)(const struct sockaddr *addr,
socklen_t addrlen,
char *host,
socklen_t hostlen,
char *serv,
socklen_t servlen,
int flags);
void
RPLWRAP(clear_resolver_cache)(void);
int
RPLWRAP(set_resolver_allocator)(void* (*alloc)(uint32_t),
void (*free)(void*));
int *
RPLWRAP(get_h_errno)(void);
const char *
RPLWRAP(gai_strerror)(int ecode);
#ifdef __cplusplus
}
#endif
/** @} */