|
miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
|
Kernel socket state. More...
#include <net_socket.h>

Public Attributes | |
| int | proto |
| void * | pcb |
| net_sock_rx_entry_t | rx_ring [NET_SOCK_RX_RING_SLOTS] |
| uint8_t | rx_head |
| uint8_t | rx_tail |
| uint8_t | _pad2 [2] |
| uint32_t | rcvtimeo_ticks |
| int | connected |
| int | in_use |
| uint32_t | poll_waiter_tid |
Kernel socket state.
One net_sock_t per open socket fd. Owns the lwIP PCB pointer and a 2-slot receive ring for RAW sockets (UDP/TCP use slot 0 only). No dynamic allocation beyond the static pool.
| uint8_t net_sock::_pad2[2] |
| int net_sock::connected |
Non-zero after connect/accept
| int net_sock::in_use |
Pool slot occupied flag
| void* net_sock::pcb |
lwIP PCB: udp_pcb* or tcp_pcb*
| uint32_t net_sock::poll_waiter_tid |
tid of thread sleeping in poll/select for this socket; 0 = none
| int net_sock::proto |
SOCK_PROTO_UDP, SOCK_PROTO_TCP, or SOCK_PROTO_RAW
| uint32_t net_sock::rcvtimeo_ticks |
SO_RCVTIMEO as LAPIC ticks (10ms each); 0 = use 10s default
| uint8_t net_sock::rx_head |
Consumer index (monotonic uint8 wrap; mask with (NET_SOCK_RX_RING_SLOTS-1))
| net_sock_rx_entry_t net_sock::rx_ring[NET_SOCK_RX_RING_SLOTS] |
2-slot RAW burst buffer; UDP/TCP use slot 0 only
| uint8_t net_sock::rx_tail |
Producer index (monotonic uint8 wrap)