PSPSDK
2025-04-22
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
6
extern
"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
17
extern
int
h_errno
;
18
19
struct
hostent
20
{
21
char
*
h_name
;
22
char
**
h_aliases
;
23
int
h_addrtype
;
24
int
h_length
;
25
char
**
h_addr_list
;
26
char
*
h_addr
;
27
};
28
29
struct
hostent
*
gethostbyaddr
(
const
void
*addr,
int
len,
int
type);
30
struct
hostent
*
gethostbyname
(
const
char
*name);
31
32
#ifdef __cplusplus
33
}
34
#endif
35
36
#endif
h_errno
int h_errno
gethostbyname
struct hostent * gethostbyname(const char *name)
gethostbyaddr
struct hostent * gethostbyaddr(const void *addr, int len, int type)
hostent
Definition
netdb.h:20
hostent::h_addrtype
int h_addrtype
Definition
netdb.h:23
hostent::h_name
char * h_name
Definition
netdb.h:21
hostent::h_addr_list
char ** h_addr_list
Definition
netdb.h:25
hostent::h_addr
char * h_addr
Definition
netdb.h:26
hostent::h_length
int h_length
Definition
netdb.h:24
hostent::h_aliases
char ** h_aliases
Definition
netdb.h:22
libcglue
netdb.h
Generated on Tue Apr 22 2025 07:52:56 for PSPSDK by
1.12.0