diff options
Diffstat (limited to 'otherlibs/unix/socketaddr.h')
-rw-r--r-- | otherlibs/unix/socketaddr.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/otherlibs/unix/socketaddr.h b/otherlibs/unix/socketaddr.h new file mode 100644 index 000000000..0cc9be8f7 --- /dev/null +++ b/otherlibs/unix/socketaddr.h @@ -0,0 +1,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))) |