00001
00008
00009
00010
00011
00012 #ifndef __L4VFS_INCLUDE_NET_IO_H_
00013 #define __L4VFS_INCLUDE_NET_IO_H_
00014
00015 #include <l4/sys/compiler.h>
00016 #include <l4/l4vfs/types.h>
00017 #include <l4/l4vfs/common_io.h>
00018 #include <l4/l4vfs/net_io-client.h>
00019
00020 EXTERN_C_BEGIN
00021
00022 object_handle_t l4vfs_socket(l4_threadid_t server,
00023 int domain,
00024 int type,
00025 int protocol);
00026
00027 int l4vfs_socketpair(l4_threadid_t server,
00028 int domain,
00029 int type,
00030 int protocol,
00031 object_handle_t *fd0,
00032 object_handle_t *fd1);
00033
00034 int l4vfs_accept(l4_threadid_t server,
00035 object_handle_t fd,
00036 struct sockaddr *addr,
00037 socklen_t *addrlen);
00038
00039 int l4vfs_bind(l4_threadid_t server,
00040 object_handle_t fd,
00041 struct sockaddr *addr,
00042 socklen_t addrlen);
00043
00044 int l4vfs_connect(l4_threadid_t server,
00045 object_handle_t fd,
00046 struct sockaddr *addr,
00047 socklen_t addrlen);
00048
00049 int l4vfs_listen(l4_threadid_t server,
00050 object_handle_t fd,
00051 int backlog);
00052
00053 int l4vfs_recvfrom(l4_threadid_t server,
00054 object_handle_t fd,
00055 char **buf,
00056 size_t len,
00057 int flags,
00058 struct sockaddr *from,
00059 socklen_t *fromlen);
00060
00061 int l4vfs_recv(l4_threadid_t server,
00062 object_handle_t fd,
00063 char **buf,
00064 size_t len,
00065 int flags);
00066
00067 int l4vfs_send(l4_threadid_t server,
00068 object_handle_t fd,
00069 const void *msg,
00070 size_t len,
00071 int flags);
00072
00073 int l4vfs_sendmsg(l4_threadid_t server,
00074 object_handle_t fd,
00075 const void *msg_name,
00076 socklen_t msg_namelen,
00077 const void *msg_iov,
00078 size_t msg_iovlen,
00079 size_t msg_iov_size,
00080 const void *msg_control,
00081 socklen_t msg_controllen,
00082 int msg_flags,
00083 int flags);
00084
00085 int l4vfs_sendto(l4_threadid_t server,
00086 object_handle_t fd,
00087 const void *msg,
00088 size_t len,
00089 int flags,
00090 struct sockaddr *to,
00091 socklen_t tolen);
00092
00093 int l4vfs_shutdown(l4_threadid_t server,
00094 object_handle_t fd,
00095 int how);
00096
00097 int l4vfs_getsockname(l4_threadid_t server,
00098 object_handle_t fd,
00099 struct sockaddr * name,
00100 socklen_t * namelen);
00101
00102 int l4vfs_setsockopt(l4_threadid_t server,
00103 object_handle_t fd,
00104 int level,
00105 int optname,
00106 const void *optval,
00107 socklen_t optlen);
00108
00109 int l4vfs_getsockopt(l4_threadid_t server,
00110 object_handle_t fd,
00111 int level,
00112 int optname,
00113 const void *optval,
00114 socklen_t *optlen);
00115
00116 int l4vfs_getpeername(l4_threadid_t server,
00117 object_handle_t fd,
00118 struct sockaddr *addr,
00119 socklen_t *addrlen);
00120
00121 EXTERN_C_END
00122
00123 #endif