osdev-networking

Implement network stack components for bare-metal OS kernels.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Maelwalser/claude-config --skill osdev-networking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: osdev-networking
Source: https://github.com/Maelwalser/claude-config/tree/main/skills/osdev-networking
Command: npx skills add https://github.com/Maelwalser/claude-config --skill osdev-networking

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building a full network stack for an operating system from the NIC driver up is complex, error-prone, and requires coordinating hardware access, protocol parsing, and transport state machines; this Skill codifies the reference patterns and implementation notes needed to complete that work reliably.

Core Features & Use Cases

  • NIC driver guidance: Practical init sequences, register maps, MMIO/PIO access patterns, DMA buffer requirements, and descriptor ring management for RTL8139, e1000, and virtio-net.
  • Protocol implementations: End-to-end guidance for Ethernet framing, ARP resolution and caching, IPv4 header handling and checksum, UDP/TCP transport behavior, pseudo-header checksums, and DHCP basics.
  • Debugging and integration: Packet receive/transmit flows, IRQ handling tips, common pitfalls, and ordering for incremental development from NIC → Ethernet → ARP → IPv4 → UDP/ICMP → TCP.
  • Use Case Example: Implement a QEMU-tested e1000 driver, verify receive/transmit via ARP and ICMP ping, then add UDP-based DHCP for IP configuration.

Quick Start

Build a minimal TCP/IP stack by first implementing the NIC driver and DMA-safe buffers, then Ethernet framing, ARP resolution, IPv4 header handling and checksum, UDP and DHCP, and finally TCP with its state machine.

Frequently Asked Questions about osdev-networking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a TCP/IP stack for a bare-metal OS kernel?

To implement a TCP/IP stack for a bare-metal OS kernel, start by writing the NIC driver and DMA-safe buffers, then build Ethernet framing, ARP resolution, IPv4 handling, UDP/DHCP, and finally the TCP state machine.

What is the correct development order for building an OS network stack?

The correct development order for an OS network stack is incremental: implement the NIC driver first, then Ethernet, ARP, IPv4, UDP/ICMP, and finally TCP to ensure protocol dependencies are resolved sequentially.

How do I write an e1000 NIC driver with DMA buffers for OS development?

Writing an e1000 NIC driver requires PCI enumeration, MMIO/PIO access, physical DMA buffers, and aligned descriptor rings to manage packet receive and transmit flows correctly in a bare-metal environment.

Why does my TCP state machine fail during bare-metal network stack implementation?

TCP state machine failures in bare-metal network stacks usually stem from incorrect network byte order conversions, missing pseudo-header checksum calculations, or improper ARP caching during packet handling.

Can I use virtio-net and RTL8139 drivers for QEMU OS development networking?

Yes, you can implement virtio-net, RTL8139, and e1000 NIC drivers for QEMU OS development networking by applying standard register maps, MMIO/PIO access patterns, and descriptor ring management.

Do I need PCI enumeration to build an Ethernet ARP IPv4 stack?

Yes, PCI enumeration is required to discover NIC hardware, allocate physical DMA buffers, and establish the MMIO/PIO access needed before implementing Ethernet, ARP, and IPv4 protocol layers.