Skip to content
Commit ac57d042 authored by Pavel Roskin's avatar Pavel Roskin Committed by David S. Miller
Browse files

[NET]: Annotate h_proto in struct ethhdr



The protocol field in ethernet headers is big-endian and should be
annotated as such.  This patch allows detection of missing ntohs() calls
on the ethernet protocol field when sparse is run with __CHECK_ENDIAN__
defined.

This is a revised version that includes <linux/types.h> so that the
userspace programs are not confused by __be16.  Thanks to David S.
Miller.

Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb286bb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment