1 /***********************************************************************/
5 /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
7 /* Copyright 1996 Institut National de Recherche en Informatique et */
8 /* en Automatique. All rights reserved. This file is distributed */
9 /* under the terms of the GNU Library General Public License, with */
10 /* the special exception on linking described in file ../../LICENSE. */
12 /***********************************************************************/
18 union sock_addr_union
{
19 struct sockaddr s_gen
;
20 struct sockaddr_in s_inet
;
23 extern union sock_addr_union sock_addr
;
26 typedef socklen_t socklen_param_type
;
28 typedef int socklen_param_type
;
31 extern void get_sockaddr (value mladdr
,
32 union sock_addr_union
* addr
/*out*/,
33 socklen_param_type
* addr_len
/*out*/);
34 CAMLprim value
alloc_sockaddr (union sock_addr_union
* addr
/*in*/,
35 socklen_param_type addr_len
, int close_on_error
);
36 CAMLprim value
alloc_inet_addr (struct in_addr
* inaddr
);
37 #define GET_INET_ADDR(v) (*((struct in_addr *) (v)))