source: trunk/minix/lib/ip/listen.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 532 bytes
RevLine 
[9]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
16int 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.