4.104.115
Last change
on this file since b3f8c9e1 was
b3f8c9e1,
checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/22/08 at 07:47:28
|
Include <errno.h> (POSIX,C99) instead of <sys/errno.h> (BSD'ism).
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | /* |
---|
2 | * socketpair() for RTEMS |
---|
3 | * |
---|
4 | * This file exists primarily to document what is required to provide |
---|
5 | * a functional implementation of socketpair() for RTEMS. |
---|
6 | * |
---|
7 | * The socketpair() service requires that the "local domain" sockets |
---|
8 | * be functional. This is denoted by the domain constants AF_LOCAL |
---|
9 | * and AF_UNIX and the protocol constants PF_LOCAL and PF_UNIX. The |
---|
10 | * local domain functionality is implemented in the file kern/uipc_usrreq.c |
---|
11 | * which was not part of the initial port of the FreeBSD stack to |
---|
12 | * RTEMS. |
---|
13 | * |
---|
14 | * The FreeBSD socketpair implementation appears to be dependent on |
---|
15 | * file system features which are not available currently in RTEMS. |
---|
16 | * |
---|
17 | * COPYRIGHT (c) 1989-2007. |
---|
18 | * On-Line Applications Research Corporation (OAR). |
---|
19 | * |
---|
20 | * The license and distribution terms for this file may be |
---|
21 | * found in the file LICENSE in this distribution or at |
---|
22 | * http://www.rtems.com/license/LICENSE. |
---|
23 | * |
---|
24 | * $Id$ |
---|
25 | */ |
---|
26 | |
---|
27 | #if HAVE_CONFIG_H |
---|
28 | #include "config.h" |
---|
29 | #endif |
---|
30 | |
---|
31 | #include <unistd.h> |
---|
32 | #include <sys/socket.h> |
---|
33 | #include <errno.h> |
---|
34 | |
---|
35 | int socketpair (int domain, int type, int protocol, int *rsv) |
---|
36 | { |
---|
37 | if ( !rsv ) { |
---|
38 | errno = EFAULT; |
---|
39 | return -1; |
---|
40 | } |
---|
41 | |
---|
42 | /* |
---|
43 | * Yes, we do not support socketpair() so this is really paranoid. |
---|
44 | * But it ensures that someone calling this routine and ignoring |
---|
45 | * the return status will get errors from subsequent socket calls. |
---|
46 | */ |
---|
47 | rsv[ 0 ] = -1; |
---|
48 | rsv[ 1 ] = -1; |
---|
49 | errno = ENOSYS; |
---|
50 | return -1; |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.