com.sun.squawk.platform.posix.natives
Interface NetDB
- All Superinterfaces:
- Library
- All Known Implementing Classes:
- NetDBImpl, NetDBImpl, NetDBImpl, NetDBImpl, NetDBImpl
public interface NetDB
- extends Library
java wrapper around #include
Nested Class Summary |
static class |
NetDB.hostent
C STRUCTURE HostEnt
struct hostent {
char *h_name; official name of host
char **h_aliases; alias list
int h_addrtype; host address type
int h_length; length of address
char **h_addr_list; list of addresses from name server
};
#define h_addr h_addr_list[0] address, for backward compatibility |
Field Summary |
static int |
HOST_NOT_FOUND
Authoritative Answer Host not found. |
static NetDB |
INSTANCE
|
static int |
NO_DATA
Valid name, no data record of requested type. |
static int |
NO_RECOVERY
Non recoverable errors, FORMERR, REFUSED, NOTIMP. |
static int |
TRY_AGAIN
Non-Authoritative Host not found, or SERVERFAIL. |
Method Summary |
NetDB.hostent |
gethostbyname(String name)
The gethostbyname() function returns a HostEnt structure describing an internet host referenced by name. |
int |
h_errno()
Return error code for last call to gethostbyname() or gethostbyaddr(). |
INSTANCE
static final NetDB INSTANCE
HOST_NOT_FOUND
static final int HOST_NOT_FOUND
- Authoritative Answer Host not found.
- See Also:
h_errno()
,
Constant Field Values
TRY_AGAIN
static final int TRY_AGAIN
- Non-Authoritative Host not found, or SERVERFAIL.
- See Also:
h_errno()
,
Constant Field Values
NO_RECOVERY
static final int NO_RECOVERY
- Non recoverable errors, FORMERR, REFUSED, NOTIMP.
- See Also:
h_errno()
,
Constant Field Values
NO_DATA
static final int NO_DATA
- Valid name, no data record of requested type.
- See Also:
h_errno()
,
Constant Field Values
gethostbyname
NetDB.hostent gethostbyname(String name)
- The gethostbyname() function returns a HostEnt structure describing an internet host referenced by name.
- Parameters:
name
- the host name
- Returns:
- the address of struct hostent, or null on error
h_errno
int h_errno()
- Return error code for last call to gethostbyname() or gethostbyaddr().
- Returns:
- one of the error codes defined in this class.
"For updated information see the Java FRC site"