diff options
| author | user <user@clank> | 2026-07-17 02:03:05 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-17 02:03:05 +0200 |
| commit | c8c22bfc511ac65036cd8f8462e0a01757eb4372 (patch) | |
| tree | 844763be861048cb76ac77bc1b13bafa3a8feba5 /src/programs.asm | |
| parent | net: chat client - async receive + OSK send over the link port (diff) | |
| download | gbos-c8c22bfc511ac65036cd8f8462e0a01757eb4372.tar.gz gbos-c8c22bfc511ac65036cd8f8462e0a01757eb4372.tar.xz gbos-c8c22bfc511ac65036cd8f8462e0a01757eb4372.zip | |
net: real IP stack, milestone A - ICMP echo (you can ping a Game Boy)
Start of an actual TCP/IP stack on gbos (TLS stays in a proxy). netd is a
userland IP responder over SLIP: our address is 10.0.0.2, the SLIP peer
10.0.0.1. It parses IPv4 headers, answers ICMP echo requests, and rebuilds
the packet with correct IP + ICMP checksums (RFC 1071 one's-complement sum,
carry-folded - works fine on the SM83).
c/netd.c + register; tools/gateway.py gains --mode ping: it crafts ICMP echo
requests over SLIP and verifies the replies.
Verified: `netd` answers 4 pings, gateway reports reply from 10.0.0.2 with
cksum=ok for each. Next: UDP, then TCP.
Diffstat (limited to '')
| -rw-r--r-- | src/programs.asm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/programs.asm b/src/programs.asm index 180f551..7a01abc 100644 --- a/src/programs.asm +++ b/src/programs.asm @@ -118,6 +118,9 @@ ProgWget: SECTION "prog_chat", ROMX[$4000], BANK[27] ProgChat: INCBIN "c/chat.bin" +SECTION "prog_netd", ROMX[$4000], BANK[28] +ProgNetd: + INCBIN "c/netd.bin" ; ----------------------------------------------------------------------------- ; PROG_SH (bank 3) - the shell, now written in C (c/sh.c): parses >/</| and @@ -212,6 +215,8 @@ ProgramTable:: dw ProgWget db LOW(BANK(ProgChat)), HIGH(BANK(ProgChat)) dw ProgChat + db LOW(BANK(ProgNetd)), HIGH(BANK(ProgNetd)) + dw ProgNetd ; ----------------------------------------------------------------------------- ; NameTable (ROM0) - command name -> program id, searched by sys_lookup. @@ -270,4 +275,6 @@ NameTable:: db PROG_WGET db "chat", 0 db PROG_CHAT + db "netd", 0 + db PROG_NETD db 0 |
