• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 1999-2013, Broadcom Corporation
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  *
16  * Fundamental constants relating to 802.3
17  *
18  * $Id: 802.3.h 382882 2013-02-04 23:24:31Z $
19  */
20 
21 #ifndef _802_3_h_
22 #define _802_3_h_
23 
24 /* This marks the start of a packed structure section. */
25 #include <packed_section_start.h>
26 
27 #define SNAP_HDR_LEN	6	/* 802.3 SNAP header length */
28 #define DOT3_OUI_LEN	3	/* 802.3 oui length */
29 
30 BWL_PRE_PACKED_STRUCT struct dot3_mac_llc_snap_header {
31 	uint8	ether_dhost[ETHER_ADDR_LEN];	/* dest mac */
32 	uint8	ether_shost[ETHER_ADDR_LEN];	/* src mac */
33 	uint16	length;				/* frame length incl header */
34 	uint8	dsap;				/* always 0xAA */
35 	uint8	ssap;				/* always 0xAA */
36 	uint8	ctl;				/* always 0x03 */
37 	uint8	oui[DOT3_OUI_LEN];		/* RFC1042: 0x00 0x00 0x00
38 						 * Bridge-Tunnel: 0x00 0x00 0xF8
39 						 */
40 	uint16	type;				/* ethertype */
41 } BWL_POST_PACKED_STRUCT;
42 
43 /* This marks the end of a packed structure section. */
44 #include <packed_section_end.h>
45 
46 #endif	/* #ifndef _802_3_h_ */
47