PSPSDK 2024-10-31
Loading...
Searching...
No Matches
netdb.h
Go to the documentation of this file.
1/* Simple gethostbyname and gethostbyaddr replacements, note not thread safe */
2#ifndef __NETDB_H__
3#define __NETDB_H__
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#define NETDB_INTERNAL -1 /* see errno */
10#define NETDB_SUCCESS 0 /* no problem */
11#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
12#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
13#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
14#define NO_DATA 4 /* Valid name, no data record of requested type */
15#define NO_ADDRESS NO_DATA /* no address, look for MX record */
16
17extern int h_errno;
18
19struct hostent
20{
21 char *h_name;
22 char **h_aliases;
26 char *h_addr;
27};
28
29struct hostent *gethostbyaddr(const void *addr, int len, int type);
30struct hostent *gethostbyname(const char *name);
31
32#ifdef __cplusplus
33}
34#endif
35
36#endif
int h_errno
struct hostent * gethostbyname(const char *name)
struct hostent * gethostbyaddr(const void *addr, int len, int type)
char * name
Definition pspsysmem_kernel.h:4
struct _uidControlBlock * type
Definition pspsysmem_kernel.h:2
Definition netdb.h:20
int h_addrtype
Definition netdb.h:23
char * h_name
Definition netdb.h:21
char ** h_addr_list
Definition netdb.h:25
char * h_addr
Definition netdb.h:26
int h_length
Definition netdb.h:24
char ** h_aliases
Definition netdb.h:22