feat: native .opc executable binary format, hardware PCI GPU driver, terminal text editor, and web browser

This commit is contained in:
RarDog
2026-09-03 10:20:25 +03:00
parent e9d9b8e365
commit ca75e961f9
17 changed files with 1213 additions and 19 deletions
+20
View File
@@ -57,6 +57,25 @@ typedef struct {
uint16_t sequence;
} icmp_hdr_t;
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_ptr;
} tcp_hdr_t;
#define TCP_FLAG_FIN 0x01
#define TCP_FLAG_SYN 0x02
#define TCP_FLAG_RST 0x04
#define TCP_FLAG_PSH 0x08
#define TCP_FLAG_ACK 0x10
#define TCP_FLAG_URG 0x20
#pragma pack(pop)
typedef struct {
@@ -74,6 +93,7 @@ uint16_t net_checksum(const void *buf, size_t len);
int net_send_arp_request(uint32_t target_ip);
int net_send_icmp_ping(uint32_t target_ip, uint16_t seq);
int net_poll_icmp_reply(uint32_t *from_ip, uint16_t *seq);
int net_http_get(uint32_t target_ip, uint16_t port, const char *path, char *out_body, size_t max_body_len);
uint32_t parse_ip(const char *str);
void format_ip(uint32_t ip, char *buf);