Line | |
---|
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>
|
---|
7 |
|
---|
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>
|
---|
13 |
|
---|
14 | #define DEBUG 0
|
---|
15 |
|
---|
16 | int listen(int socket, int backlog)
|
---|
17 | {
|
---|
18 | int r;
|
---|
19 |
|
---|
20 | r= ioctl(socket, NWIOTCPLISTENQ, &backlog);
|
---|
21 | if (r != -1 || errno != EBADIOCTL)
|
---|
22 | return r;
|
---|
23 |
|
---|
24 | #if DEBUG
|
---|
25 | fprintf(stderr, "listen: not implemented for fd %d\n", socket);
|
---|
26 | #endif
|
---|
27 | errno= ENOSYS;
|
---|
28 | return -1;
|
---|
29 | }
|
---|
30 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.