|
ginnOS
The reference: libc, the libraries and the kernel
|
the parts of the IPv4 sockets that inet_socket.c (datagrams) and tcp_socket.c (streams) share. More...
Go to the source code of this file.
Data Structures | |
| struct | datagram |
| struct | inet_socket |
Typedefs | |
| typedef struct datagram | datagram_t |
Functions | |
| int32_t | inet_socket_alloc (uint8_t protocol, uint32_t flags, struct file **out, inet_socket_t **socket) |
| make a socket and its file, on the list of all sockets. | |
| bool | inet_bind_any_port (inet_socket_t *s) |
| give a socket a free port (net_lock held). | |
| int32_t | tcp_socket_connect (struct file *file, inet_socket_t *s, const ksockaddr_in_t *addr) |
| the TCP side of the socket calls (tcp_socket.c). | |
| int32_t | tcp_socket_listen (inet_socket_t *s, uint32_t backlog) |
| int32_t | tcp_socket_accept (struct file *file, uint32_t flags, struct file **out, ksockaddr_in_t *peer) |
| int32_t | tcp_socket_send (struct file *file, inet_socket_t *s, const kiovec_t *iov, uint32_t iov_count, bool dontwait) |
| int32_t | tcp_socket_receive (struct file *file, inet_socket_t *s, const kiovec_t *iov, uint32_t iov_count, uint32_t flags, bool dontwait) |
| uint32_t | tcp_socket_poll (inet_socket_t *s) |
| int32_t | tcp_socket_shutdown (inet_socket_t *s, int32_t how) |
the parts of the IPv4 sockets that inet_socket.c (datagrams) and tcp_socket.c (streams) share.
not for other code.
| typedef struct datagram datagram_t |
| int32_t inet_socket_alloc | ( | uint8_t | protocol, |
| uint32_t | flags, | ||
| struct file ** | out, | ||
| inet_socket_t ** | socket ) |
make a socket and its file, on the list of all sockets.
| flags | O_NONBLOCK or 0. |
| bool inet_bind_any_port | ( | inet_socket_t * | s | ) |
give a socket a free port (net_lock held).
| int32_t tcp_socket_connect | ( | struct file * | file, |
| inet_socket_t * | s, | ||
| const ksockaddr_in_t * | addr ) |
the TCP side of the socket calls (tcp_socket.c).
those marked "lock held" are called with net_lock held; the others take it.
| int32_t tcp_socket_listen | ( | inet_socket_t * | s, |
| uint32_t | backlog ) |
| int32_t tcp_socket_accept | ( | struct file * | file, |
| uint32_t | flags, | ||
| struct file ** | out, | ||
| ksockaddr_in_t * | peer ) |
| int32_t tcp_socket_send | ( | struct file * | file, |
| inet_socket_t * | s, | ||
| const kiovec_t * | iov, | ||
| uint32_t | iov_count, | ||
| bool | dontwait ) |
| int32_t tcp_socket_receive | ( | struct file * | file, |
| inet_socket_t * | s, | ||
| const kiovec_t * | iov, | ||
| uint32_t | iov_count, | ||
| uint32_t | flags, | ||
| bool | dontwait ) |
| uint32_t tcp_socket_poll | ( | inet_socket_t * | s | ) |
| int32_t tcp_socket_shutdown | ( | inet_socket_t * | s, |
| int32_t | how ) |