. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / ip / listen.c
blobd2283e52ed3d6b9f0c2d6bca6bb873bf1d354c45
1 #include <errno.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <sys/ioctl.h>
5 #include <sys/socket.h>
6 #include <netinet/in.h>
8 #include <net/gen/in.h>
9 #include <net/gen/tcp.h>
10 #include <net/gen/tcp_io.h>
11 #include <net/gen/udp.h>
12 #include <net/gen/udp_io.h>
14 #define DEBUG 0
16 int listen(int socket, int backlog)
18 int r;
20 r= ioctl(socket, NWIOTCPLISTENQ, &backlog);
21 if (r != -1 || errno != EBADIOCTL)
22 return r;
24 #if DEBUG
25 fprintf(stderr, "listen: not implemented for fd %d\n", socket);
26 #endif
27 errno= ENOSYS;
28 return -1;