]> The Tcpdump Group git mirrors - libpcap/commit
It appears that SIOCGIFMTU returns the MTU in the sense of "maximum
authorguy <guy>
Tue, 30 Jul 2002 07:48:20 +0000 (07:48 +0000)
committerguy <guy>
Tue, 30 Jul 2002 07:48:20 +0000 (07:48 +0000)
commit1f419aeb14d7788ac46cec61c492530cb87e0ef0
tree65bdc43fb1526b68a81180c864f542a3f84ece8a
parent2dcac1bb6bf24a5f459d2fb199e54aa9aea8a1cf
It appears that SIOCGIFMTU returns the MTU in the sense of "maximum
amount of payload you can put in a link-layer packet", i.e. "maximum
size of a link-layer packet minus the link-layer header size", rather
than returning the maximum size of a link-layer packet.

The snapshot length is the maximum amount of data to capture from the
entire packet, so it should be clipped at the MTU plus the link-layer
header, not at the MTU.
pcap-snoop.c