Main Page | Data Structures | Directories | File List | Data Fields | Globals

if_ethersubr.h

Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer,
00010  *    without modification.
00011  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
00012  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
00013  *    redistribution must be conditioned upon including a substantially
00014  *    similar Disclaimer requirement for further binary redistribution.
00015  * 3. Neither the names of the above-listed copyright holders nor the names
00016  *    of any contributors may be used to endorse or promote products derived
00017  *    from this software without specific prior written permission.
00018  *
00019  * Alternatively, this software may be distributed under the terms of the
00020  * GNU General Public License ("GPL") version 2 as published by the Free
00021  * Software Foundation.
00022  *
00023  * NO WARRANTY
00024  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00025  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00026  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
00027  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
00028  * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
00029  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00030  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00031  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
00032  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00033  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
00034  * THE POSSIBILITY OF SUCH DAMAGES.
00035  *
00036  * $Id: if_ethersubr.h,v 1.1 2004/06/09 20:12:08 jbicket Exp $
00037  */
00038 
00039 #ifndef _NET_IF_ETHERSUBR_H_
00040 #define _NET_IF_ETHERSUBR_H_
00041 
00042 #define ETHER_ADDR_LEN          6       /* length of an Ethernet address */
00043 
00044 /*
00045  * Structure of a 10Mb/s Ethernet header.
00046  */
00047 struct  ether_header {
00048         u_char  ether_dhost[ETHER_ADDR_LEN];
00049         u_char  ether_shost[ETHER_ADDR_LEN];
00050         u_short ether_type;
00051 };
00052 
00053 #ifndef ETHERTYPE_PAE
00054 #define ETHERTYPE_PAE   0x888e          /* EAPOL PAE/802.1x */
00055 #endif
00056 
00057 /*
00058  * Structure of a 48-bit Ethernet address.
00059  */
00060 struct  ether_addr {
00061         u_char octet[ETHER_ADDR_LEN];
00062 };
00063 
00064 #define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */
00065 
00066 #endif /* _NET_IF_ETHERSUBR_H_ */

Generated on Mon Nov 21 15:58:10 2005 for openwifi by  doxygen 1.4.1