mirror of
https://github.com/devkitPro/wut.git
synced 2026-08-24 03:35:15 -05:00
wutsocket: implement missing functions
This commit is contained in:
57
include/nsysnet/_netdb.h
Normal file
57
include/nsysnet/_netdb.h
Normal 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
|
||||
|
||||
/** @} */
|
||||
Reference in New Issue
Block a user