summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/socketaddr.h
blob: 0cc9be8f79dacb4a306573ba0fabd1600f0e1d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>

union {
  struct sockaddr s_gen;
  struct sockaddr_un s_unix;
  struct sockaddr_in s_inet;
} sock_addr;

int sock_addr_len;

#ifdef ANSI
void get_sockaddr(value);
value alloc_sockaddr(void);
value alloc_inet_addr(unsigned long);
#else
void get_sockaddr();
value alloc_sockaddr();
value alloc_inet_addr();
#endif

#define GET_INET_ADDR(v) (*((unsigned long *) (v)))