major restructuring, prepare for smp

This commit is contained in:
maksw committed 2026-05-28 18:53:37 +02:00
1 parent b3569a2b90
commit 6bff37746d
229 files changed
+1617 -1489

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
#pragma once
// net_abi.h - native networking ABI shared by the kernel socket facade
// and network stack provider drivers.
#include <stdint.h>
#include <stddef.h>
#define SYS_AF_INET 2u
#define SYS_SOCK_STREAM 1u
#define SYS_SOCK_DGRAM 2u
#define SYS_SOCK_RAW 3u
#define SYS_IPPROTO_ICMP 1u
#define SYS_IPPROTO_TCP 6u
#define SYS_IPPROTO_UDP 17u
#define SYS_SHUTDOWN_READ 0u
#define SYS_SHUTDOWN_WRITE 1u
#define SYS_SHUTDOWN_BOTH 2u
#define SYS_SOCKET_ADDRESS_IPV4_SIZE 16u
#define SYS_RESOLVE_HOST_NAME_MAX 255u
#define SYS_SOCKET_OPT_RECV_TIMEOUT_MS 1u
#define SYS_SOCKET_OPT_SEND_TIMEOUT_MS 2u
#define SYS_SOCKET_OPT_NONBLOCKING 3u
#define SYS_POLL_READ 0x0001u
#define SYS_POLL_WRITE 0x0002u
#define SYS_POLL_ERROR 0x0004u
#define SYS_POLL_HANGUP 0x0008u
#define SYS_POLL_INVALID 0x0010u
#define SYS_POLL_TIMEOUT_INFINITE 0xFFFFFFFFu
typedef struct SYS_SOCKET_ADDRESS_IPV4_K {
uint16_t Family; // SYS_AF_INET
uint16_t Port; // host byte order
uint8_t Address[4]; // dotted-quad bytes, e.g. {10,0,2,2}
uint8_t Reserved[8];
} SYS_SOCKET_ADDRESS_IPV4_K;
typedef struct SYS_POLLFD_K {
uint32_t Handle;
uint32_t Events;
uint32_t ReturnedEvents;
} SYS_POLLFD_K;