sockets: expose raw sockets to userspace

This commit is contained in:
Matheus
2026-09-10 17:56:54 -03:00
parent e17ba000e2
commit 66b0cb9076
3 changed files with 52 additions and 5 deletions
+11
View File
@@ -88,6 +88,7 @@ typedef struct {
#define AF_LOCAL 1
#define AF_INET 2
#define AF_PACKET 17
#define SOCK_STREAM 1
#define SOCK_DGRAM 2
@@ -155,6 +156,16 @@ typedef struct {
char sun_path[ABISOCKADDR_UN_MAX];
} unaddr_t;
typedef struct {
uint16_t sll_family;
uint16_t sll_protocol;
int32_t sll_ifindex;
uint16_t sll_hatype;
uint8_t sll_pkttype;
uint8_t sll_halen;
uint8_t sll_addr[8];
} sockaddr_ll_t;
typedef struct {
void *addr;
socklen_t addrlen;