view extras/mini-os/include/posix/sys/socket.h @ 17042:a905c582a406

Add stubdomain support. See stubdom/README for usage details.

arch_limits.h so as to permit getting them from there without
pulling all the internal Mini-OS defines.
- Setup a xen-elf cross-compilation environment in stubdom/cross-root
- Add a POSIX layer on top of Mini-OS by linking against the newlib C
library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c
- Cross-compile zlib and libpci too.
- Add an xs.h-compatible layer on top of Mini-OS' xenbus.
- Cross-compile libxc with an additional xc_minios.c and a few things
- Cross-compile ioemu with an additional block-vbd, but without sound,
tpm and other details. A few hacks are needed:
- Align ide and scsi buffers at least on sector size to permit
direct transmission to the block backend. While we are at it, just
page-align it to possibly save a segment. Also, limit the scsi
buffer size because of limitations of the block paravirtualization
- Allocate big tables dynamically rather that letting them go to
bss: when Mini-OS gets installed in memory, bss is not lazily
allocated, and doing so during Mini-OS is unnecessarily trick while
we can simply use malloc.
- Had to change the Mini-OS compilation somehow, so as to export
Mini-OS compilation flags to the Makefiles of libxc and ioemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 12 14:35:39 2008 +0000 (2008-02-12)
line source
1 #ifndef _POSIX_SYS_SOCKET_H_
2 #define _POSIX_SYS_SOCKET_H_
4 #include <fcntl.h>
5 #include <lwip/sockets.h>
7 int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
8 int bind(int s, struct sockaddr *name, socklen_t namelen);
9 int shutdown(int s, int how);
10 int getpeername (int s, struct sockaddr *name, socklen_t *namelen);
11 int getsockname (int s, struct sockaddr *name, socklen_t *namelen);
12 int getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen);
13 int setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen);
14 int close(int s);
15 int connect(int s, struct sockaddr *name, socklen_t namelen);
16 int listen(int s, int backlog);
17 int recv(int s, void *mem, int len, unsigned int flags);
18 //int read(int s, void *mem, int len);
19 int recvfrom(int s, void *mem, int len, unsigned int flags,
20 struct sockaddr *from, socklen_t *fromlen);
21 int send(int s, void *dataptr, int size, unsigned int flags);
22 int sendto(int s, void *dataptr, int size, unsigned int flags,
23 struct sockaddr *to, socklen_t tolen);
24 int socket(int domain, int type, int protocol);
25 //int write(int s, void *dataptr, int size);
26 int select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset,
27 struct timeval *timeout);
28 //int ioctl(int s, long cmd, void *argp);
29 int getsockname(int s, struct sockaddr *name, socklen_t *namelen);
31 #endif /* _POSIX_SYS_SOCKET_H_ */