Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2016 02:50:41 +0330
From:      Hadi Rezaee <h.rezaee@ideatech.io>
To:        Navdeep Parhar <nparhar@gmail.com>, freebsd-net@freebsd.org
Subject:   Re: ethernet header size
Message-ID:  <56904449.60202@ideatech.io>
In-Reply-To: <5690421C.7040609@gmail.com>
References:  <56904059.4010806@ideatech.io> <5690421C.7040609@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you very much Parhar ;)


On 01/09/2016 02:41, Navdeep Parhar wrote:
> sizeof(struct ether_header)
>
>
>
> On 01/08/2016 15:03, Hadi Rezaee wrote:
>> 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
>>
>> _______________________________________________
>> freebsd-net@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>>
>
>

-- 
Hadi Rezaee
+98 912 1403571

IdeaTech.io




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