1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Objective Caml */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Copyright 1996 Institut National de Recherche en Informatique et */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* Automatique. Distributed only by permission. */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
1995-08-08 06:37:34 -07:00
|
|
|
#include <misc.h>
|
1995-05-08 08:18:32 -07:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/un.h>
|
|
|
|
#include <netinet/in.h>
|
1996-09-04 07:15:31 -07:00
|
|
|
#include <arpa/inet.h>
|
1995-05-08 08:18:32 -07:00
|
|
|
|
|
|
|
union {
|
|
|
|
struct sockaddr s_gen;
|
|
|
|
struct sockaddr_un s_unix;
|
|
|
|
struct sockaddr_in s_inet;
|
|
|
|
} sock_addr;
|
|
|
|
|
|
|
|
int sock_addr_len;
|
|
|
|
|
1995-08-08 06:37:34 -07:00
|
|
|
void get_sockaddr P((value));
|
|
|
|
value alloc_sockaddr P((void));
|
|
|
|
value alloc_inet_addr P((unsigned int));
|
1995-05-08 08:18:32 -07:00
|
|
|
|
1995-10-31 07:57:59 -08:00
|
|
|
#define GET_INET_ADDR(v) (*((uint32 *) (v)))
|