uint8_t flags
Definition idt.c:3
int32_t tcp_socket_accept(struct file *file, uint32_t flags, struct file **out, ksockaddr_in_t *peer)
Definition tcp_socket.c:195
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)
Definition tcp_socket.c:335
int32_t tcp_socket_send(struct file *file, inet_socket_t *s, const kiovec_t *iov, uint32_t iov_count, bool dontwait)
Definition tcp_socket.c:259
bool inet_bind_any_port(inet_socket_t *s)
give a socket a free port (net_lock held).
Definition inet_socket.c:139
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).
Definition tcp_socket.c:86
struct datagram datagram_t
uint32_t tcp_socket_poll(inet_socket_t *s)
Definition tcp_socket.c:393
int32_t tcp_socket_shutdown(inet_socket_t *s, int32_t how)
Definition tcp_socket.c:428
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.
Definition inet_socket.c:71
int32_t tcp_socket_listen(inet_socket_t *s, uint32_t backlog)
Definition tcp_socket.c:170
IPv4 sockets: TCP (SOCK_STREAM), UDP (SOCK_DGRAM) and ICMP echo (SOCK_DGRAM with IPPROTO_ICMP,...
struct inet_socket inet_socket_t
Definition inet_socket.h:66
TCP (RFC 9293): reliable byte streams between ports.
struct tcp_conn tcp_conn_t
Definition tcp.h:58
unsigned int uint32_t
Definition fb.h:17
unsigned char uint8_t
Definition fb.h:18
unsigned short uint16_t
Definition stdint.h:13
int int32_t
Definition stdint.h:14
int socket(int domain, int type, int protocol)
Definition inet_internal.h:14
struct datagram * next
Definition inet_internal.h:15
uint8_t data[]
Definition inet_internal.h:19
uint32_t from
Definition inet_internal.h:16
uint32_t length
Definition inet_internal.h:18
uint16_t from_port
Definition inet_internal.h:17
an open-file description.
Definition file.h:64
Definition inet_internal.h:23
inet_socket_t * next
Definition inet_internal.h:24
uint8_t protocol
Definition inet_internal.h:25
bool connected
Definition inet_internal.h:30
bool reuse_address
Definition inet_internal.h:31
bool broadcast
Definition inet_internal.h:32
uint32_t queued
Definition inet_internal.h:37
uint16_t port
Definition inet_internal.h:27
uint32_t local
Definition inet_internal.h:26
wait_queue_t waiters
Definition inet_internal.h:38
bool shut_write
Definition inet_internal.h:34
tcp_conn_t * conn
Definition inet_internal.h:39
uint16_t remote_port
Definition inet_internal.h:29
bool shut_read
Definition inet_internal.h:33
uint32_t remote
Definition inet_internal.h:28
datagram_t * tail
Definition inet_internal.h:36
datagram_t * head
Definition inet_internal.h:35
Definition unix_socket.h:49
Definition inet_socket.h:59
a queue of blocked processes, linked through process_t::wait_next.
Definition wait_queue.h:35