2 #include <sys/socket.h>
7 #include <netinet/in.h>
8 #include <netinet/tcp.h>
10 #include <rump/rump.h>
11 #include <rump/rump_syscalls.h>
18 #define SERVPATH "/tmp/rump_sysproxy_test"
30 struct sockaddr_un sun
;
32 s
= socket(AF_LOCAL
, SOCK_STREAM
, 0);
36 memset(&sun
, 0, sizeof(sun
));
37 sun
.sun_family
= AF_LOCAL
;
38 strcpy(sun
.sun_path
, SERVPATH
);
39 if (connect(s
, (struct sockaddr
*)&sun
, SUN_LEN(&sun
)) == -1)
42 struct sockaddr_in sin
;
45 s
= socket(AF_INET
, SOCK_STREAM
, 0);
49 memset(&sin
, 0, sizeof(sin
));
50 sin
.sin_family
= AF_INET
;
51 sin
.sin_port
= htons(12345);
52 sin
.sin_addr
.s_addr
= inet_addr("10.181.181.1");
53 if (connect(s
, (struct sockaddr
*)&sin
, sizeof(sin
)) == -1)
56 if (setsockopt(s
, IPPROTO_TCP
, TCP_NODELAY
, &x
, sizeof(x
)) == -1)
61 rump_sysproxy_socket_setup_client(s
);
63 if (rump_sys_stat("/", &sb
[1]) == -1)