Note that you have to check the link-layer header type.

(Somebody on Stack Overflow got confused by this; they tried using the
sample code, parsing Ethernet headers, on the OS X loopback device.)