scsh-0.6/scsh/network1.h

75 lines
2.0 KiB
C
Raw Normal View History

/* Exports from network1.c. */
s48_value scheme_bind(s48_value sockfd, s48_value family, s48_value scheme_name);
s48_value scheme_connect(s48_value sock, s48_value family,
s48_value scheme_name);
s48_value scheme_accept(s48_value sockfd, s48_value family);
s48_value scheme_peer_name(s48_value sockfd, s48_value family);
s48_value scheme_socket_name(s48_value sockfd, s48_value family);
int scheme_socket_pair(int type, int *s1, int *s2);
s48_value recv_substring(s48_value s, s48_value flags, s48_value buf,
s48_value start, s48_value end);
s48_value send_substring(s48_value s, s48_value flags, s48_value buf,
s48_value start, s48_value end, s48_value family,
s48_value scheme_name);
int scheme_getsockopt (int s, int level, int optname);
int scheme_getsockopt_linger (int s,
int level,
int optname,
int *out_time);
int scheme_getsockopt_timeout (int s,
int level,
int optname,
int *out_usec);
int scheme_setsockopt (int s,
int level,
int optname,
int optval);
int scheme_setsockopt_linger (int s,
int level,
int optname,
int onoff,
int linger);
int scheme_setsockopt_timeout (int s,
int level,
int optname,
int sec,
int usec);
s48_value scheme_host_address2host_info(s48_value scheme_byte_vector);
s48_value scheme_host_name2host_info(s48_value scheme_name);
s48_value scheme_net_address2net_info(s48_value net_addr);
s48_value scheme_net_name2net_info(s48_value scheme_name);
/* in_port should be declared u_short, but cig doesn't know about them. */
s48_value scheme_serv_port2serv_info(s48_value in_port,
s48_value in_proto);
s48_value scheme_serv_name2serv_info(s48_value in_name,
s48_value in_proto);
s48_value scheme_proto_num2proto_info(s48_value in_proto);
s48_value scheme_proto_name2proto_info(s48_value name);
void set_longvec_carriers(s48_value svec, long const * const * cvec);
s48_value veclen(const long *vec);