8 #include <sys/socket.h>
9 #include <netinet/in.h>
11 #include <net/gen/in.h>
12 #include <net/gen/tcp.h>
13 #include <net/gen/tcp_io.h>
14 #include <net/gen/udp.h>
15 #include <net/gen/udp_io.h>
19 int listen(int sock
, int backlog
)
23 r
= ioctl(sock
, NWIOTCPLISTENQ
, &backlog
);
24 if (r
!= -1 || errno
!= EBADIOCTL
)
27 r
= ioctl(sock
, NWIOSUDSBLOG
, &backlog
);
28 if (r
!= -1 || errno
!= EBADIOCTL
)
32 fprintf(stderr
, "listen: not implemented for fd %d\n", sock
);