feat: Massive OS expansion with IPC, Sound & TTS, Block layer, FAT32/ext2/sysfs, Signals, Syscalls, Modules, Drivers & 50+ LazyBox applets

This commit is contained in:
subhobhai943 committed 2026-08-16 23:06:53 +05:30
1 parent 5662be29f5
commit d680335f05
64 files changed
+2370 -166

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
#ifndef _NET_TCP_H
#define _NET_TCP_H
#include <net/net.h>
#define TCP_STATE_CLOSED 0
#define TCP_STATE_LISTEN 1
#define TCP_STATE_SYN_SENT 2
#define TCP_STATE_SYN_RCVD 3
#define TCP_STATE_ESTABLISHED 4
#define TCP_STATE_FIN_WAIT1 5
#define TCP_STATE_FIN_WAIT2 6
#define TCP_STATE_CLOSE_WAIT 7
#define TCP_STATE_CLOSING 8
#define TCP_STATE_LAST_ACK 9
#define TCP_STATE_TIME_WAIT 10
typedef struct {
uint16_t src_port;
uint16_t dst_port;
uint32_t seq_num;
uint32_t ack_num;
uint8_t data_offset_reserved;
uint8_t flags;
uint16_t window_size;
uint16_t checksum;
uint16_t urgent_pointer;
} __attribute__((packed)) tcp_header_t;
void tcp_init(void);
void tcp_receive(const uint8_t* packet, uint16_t length, uint32_t src_ip);
#endif // _NET_TCP_H