Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2016 02:33:53 +0330
From:      Hadi Rezaee <h.rezaee@ideatech.io>
To:        freebsd-net@freebsd.org
Subject:   ethernet header size
Message-ID:  <56904059.4010806@ideatech.io>

next in thread | raw e-mail | index | archive | help
Hello there,

In some part of my application I need to have the Ethernet header size
(ideally, using sizeof).
Well I guess 'ethhdr' is not exist on FreeBSD, correct ?

According to Linux definition:
 
struct ethhdr {
    unsigned char    h_dest[ETH_ALEN];
    unsigned char    h_source[ETH_ALEN];
    unsigned short    h_proto;
} __attribute__((packed));

So, assume the ethernet header size is equal to 14, is it going to work
?! :)
and if there is already a definition somewhere in system header files,
so I don't have to define the size myself ?

Thank you




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