Date: Fri, 8 Jan 2016 15:11:24 -0800 From: Navdeep Parhar <nparhar@gmail.com> To: Hadi Rezaee <h.rezaee@ideatech.io>, freebsd-net@freebsd.org Subject: Re: ethernet header size Message-ID: <5690421C.7040609@gmail.com> In-Reply-To: <56904059.4010806@ideatech.io> References: <56904059.4010806@ideatech.io>
next in thread | previous in thread | raw e-mail | index | archive | help
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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5690421C.7040609>