Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 2000 14:11:35 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        freebsd-net@freebsd.org
Subject:   sizeof(struct ether_header)
Message-ID:  <200005012111.OAA94013@bubba.whistle.com>

next in thread | raw e-mail | index | archive | help
I've noticed lots of places in the networking code that use
"sizeof(struct ether_header)" to represent "14", ie., ETHER_HDR_LEN,
eg:

  m_adj(m, sizeof(struct ether_header));

Isn't this bogus, as a structure may require longword padding on certain
architecures, so that sizeof(struct ether_header) would equal 16?

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005012111.OAA94013>