home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1999 February
/
MACPOWER-1999-02.ISO.7z
/
MACPOWER-1999-02.ISO
/
9902⁄AMUG
/
UTILITY
/
mac06-0.95.sit
/
mac06-0.95
/
usr
/
include
/
netdb.h
< prev
next >
Wrap
Text File
|
1998-11-01
|
1KB
|
47 lines
/* mac06ゥ1997,98 by HNS/DSITRI hns@computer.org
** netdb.h
*/
#pragma once
/* host lookup */
struct hostent
{
char *h_name; /* primary host name */
char **h_aliases; /* NULL terminated list of aliases */
int h_addrtype; /* type of address AF_INET */
int h_len; /* length of addr in h_addr_list (4) */
void **h_addr_list; /* NULL terminated list of addresses */
#define h_addr h_addr_list[0] /* for compatibility */
};
struct hostent *gethostbyname(char *name);
struct hostent *gethostbyaddr(void *addr, int len, int family);
/* service (well known port) lookup */
struct servent
{
unsigned short s_port;
char *s_proto;
char *s_name;
char **s_aliases;
};
struct servent *getservbyname(char *name, char *proto);
struct servent *getservbyport(short port, char *proto);
struct protoent
{
int p_family; /* protocol family */
char *p_name;
char **p_aliases;
int p_proto; /* protocol name */
int p_type; /* socket type for this protocol */
};
struct protoent *getprotobyname(char *name, int family);
struct protoent *getprotobynumber(short number, int family);
/* EOF */