<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Arp on Tigran Kostandyan</title><link>https://kostandyan.xyz/tags/arp/</link><description>Recent content in Arp on Tigran Kostandyan</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 05 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://kostandyan.xyz/tags/arp/index.xml" rel="self" type="application/rss+xml"/><item><title>Writing a TCP/IP Stack from Scratch in Nim: ARP</title><link>https://kostandyan.xyz/series/networking/arp/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://kostandyan.xyz/series/networking/arp/</guid><description>&lt;h2 id="arp">ARP&lt;/h2>
&lt;p>Welcome to the second post in the series. Last time we built the link layer – capturing raw Ethernet frames over BPF on macOS. This time we&amp;rsquo;re going one notch up the stack: &lt;a href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol">ARP&lt;/a>, the Address Resolution Protocol. It&amp;rsquo;s how a host figures out which MAC address corresponds to a given IPv4 address on the local network, so Ethernet frames know where to actually go.&lt;/p>
&lt;p>But before we get to ARP itself, we need to revisit the link layer. The version we ended Part 1 with was fine for reading and printing frames, but it has a handful of problems that show up as soon as we try to do anything more serious – like sending frames back, processing more than one packet per syscall, or letting upper layers (ARP, IP, TCP) compare ethertypes without parsing strings.&lt;/p></description></item></channel></rss>