mirror of
https://github.com/0intro/conterm
synced 2024-11-22 13:51:34 +03:00
23a48c7cfe
Addresses are now stored as uchar[16] instead of ulong, with enough room for IPv6. Generic IP functions have been removed from devip.c and replaced by libip, imported from Plan 9. Names and addresses are resolved using either gethostbyname() or getaddrinfo() functions. On Windows, IPv6 name resolution is not enabled, because mingw32 doesn't provide inet_ntop(). R=rsc http://codereview.appspot.com/6408044
20 lines
497 B
C
20 lines
497 B
C
enum
|
|
{
|
|
S_TCP,
|
|
S_UDP
|
|
};
|
|
|
|
int so_socket(int, unsigned char*);
|
|
void so_connect(int, unsigned char*, unsigned short);
|
|
void so_getsockname(int, unsigned char*, unsigned short*);
|
|
void so_bind(int, int, unsigned short, unsigned char*);
|
|
void so_listen(int);
|
|
int so_send(int, void*, int, int);
|
|
int so_recv(int, void*, int, int);
|
|
int so_accept(int, unsigned char*, unsigned short*);
|
|
int so_getservbyname(char*, char*, char*);
|
|
int so_gethostbyname(char*, char**, int);
|
|
|
|
char* hostlookup(char*);
|
|
|