00001
00009
00010
00011
00012
00013 import <l4/sys/types.h>
00014 import <l4/l4vfs/common_io.idl>
00015 import <l4/l4vfs/types.h>
00016
00017 #pragma force-include
00018 #include <l4/l4vfs/comm_defs.h>
00019
00023 library l4vfs
00024 {
00028 [uuid(60)]
00029 interface net_io : common_io
00030 {
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 [allow_reply_only]
00041 int accept ([in] object_handle_t handle,
00042 [in, out, size_is(addrlen),
00043 max_is(L4VFS_SOCKET_MAX_ADDRLEN)] char addr[],
00044 [in, out] l4vfs_socklen_t *addrlen,
00045 [out] l4vfs_socklen_t *actual_len);
00046
00047 int bind ([in] object_handle_t handle,
00048 [in, size_is(addrlen),
00049 max_is(L4VFS_SOCKET_MAX_ADDRLEN)] char addr[],
00050 [in] int addrlen);
00051
00052 [allow_reply_only]
00053 int connect ([in] object_handle_t handle,
00054 [in, size_is(addrlen),
00055 max_is(L4VFS_SOCKET_MAX_ADDRLEN)] char addr[],
00056 [in] int addrlen);
00057
00058 int listen ([in] object_handle_t handle,
00059 [in] int backlog);
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 [allow_reply_only]
00071 int recvfrom ([in] object_handle_t handle,
00072 [out, size_is(len), ref, prealloc_client,
00073 prealloc_server, max_is(L4VFS_WRITE_RCVBUF_SIZE)]
00074 char **buf,
00075 [in, out] l4vfs_size_t *len,
00076 [in] int flags,
00077 [in, out, size_is(fromlen), max_is(128)] char from[],
00078 [in, out] l4vfs_socklen_t *fromlen,
00079 [out] l4vfs_socklen_t *actual_fromlen);
00080
00081 [allow_reply_only]
00082 int recv ([in] object_handle_t handle,
00083 [out, size_is(len), ref, prealloc_client,
00084 prealloc_server, max_is(L4VFS_WRITE_RCVBUF_SIZE)]
00085 char **buf,
00086 [in,out] l4vfs_size_t *len,
00087 [in] int flags);
00088
00089 [allow_reply_only]
00090 int send ([in] object_handle_t handle,
00091 [in, ref, size_is(len),
00092 max_is(L4VFS_WRITE_RCVBUF_SIZE)] char *msg,
00093 [in] int len,
00094 [in] int flags);
00095
00096 [allow_reply_only]
00097 int sendto ([in] object_handle_t handle,
00098 [in, ref, size_is(len),
00099 max_is(L4VFS_WRITE_RCVBUF_SIZE)] char *msg,
00100 [in] int len,
00101 [in] int flags,
00102 [in, ref, size_is(tolen),
00103 max_is(L4VFS_SOCKET_MAX_ADDRLEN)] char *to,
00104 [in] int tolen);
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 [allow_reply_only]
00119 int sendmsg ([in] object_handle_t handle,
00120 [in, size_is(msg_namelen),
00121 max_is(8192)] char msg_name[],
00122 [in] int msg_namelen,
00123 [in, ref, size_is(msg_iov_size),
00124 max_is(L4VFS_WRITE_RCVBUF_SIZE)] char *msg_iov,
00125 [in] int msg_iovlen,
00126 [in] int msg_iov_size,
00127 [in, ref, size_is(msg_controllen)] char *msg_control,
00128 [in] int msg_controllen,
00129 [in] int msg_flags,
00130 [in] int flags);
00131
00132 int shutdown ([in] object_handle_t handle,
00133 [in] int how);
00134
00135 int socket ([in] int domain,
00136 [in] int type,
00137 [in] int protocol);
00138
00139 int getsockname([in] object_handle_t s,
00140 [out, size_is(len), max_is(4096)] char name[],
00141 [in,out] l4vfs_socklen_t *len);
00142
00143 int setsockopt ([in] object_handle_t s,
00144 [in] int level,
00145 [in] int optname,
00146 [in, ref, size_is(optlen)] char *optval,
00147 [in] int optlen);
00148
00149 int getsockopt ([in] object_handle_t s,
00150 [in] int level,
00151 [in] int optname,
00152 [in, out, ref, size_is(optlen),
00153 max_is(4096)] char *optval,
00154 [in, out] l4vfs_socklen_t *optlen,
00155 [out] l4vfs_socklen_t *actual_optlen);
00156
00157 int socketpair ([in] int domain,
00158 [in] int type,
00159 [in] int protocol,
00160 [out] object_handle_t *handle0,
00161 [out] object_handle_t *handle1);
00162
00163 int getpeername([in] object_handle_t handle,
00164 [in, out, size_is(addrlen),
00165 max_is(L4VFS_SOCKET_MAX_ADDRLEN)] char addr[],
00166 [in, out] l4vfs_socklen_t *addrlen,
00167 [out] l4vfs_socklen_t *actual_len);
00168
00169 };
00170 };