ether.h revision 75115
1139804Simp/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.6 2000/10/09 03:24:24 guy Exp $ (LBL) */ 21541Srgrimes/* 31541Srgrimes * Copyright (c) 1982, 1986, 1993 41541Srgrimes * The Regents of the University of California. All rights reserved. 51541Srgrimes * 61541Srgrimes * Redistribution and use in source and binary forms, with or without 71541Srgrimes * modification, are permitted provided that the following conditions 81541Srgrimes * are met: 91541Srgrimes * 1. Redistributions of source code must retain the above copyright 101541Srgrimes * notice, this list of conditions and the following disclaimer. 111541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 121541Srgrimes * notice, this list of conditions and the following disclaimer in the 131541Srgrimes * documentation and/or other materials provided with the distribution. 141541Srgrimes * 3. All advertising materials mentioning features or use of this software 151541Srgrimes * must display the following acknowledgement: 161541Srgrimes * This product includes software developed by the University of 171541Srgrimes * California, Berkeley and its contributors. 181541Srgrimes * 4. Neither the name of the University nor the names of its contributors 191541Srgrimes * may be used to endorse or promote products derived from this software 201541Srgrimes * without specific prior written permission. 211541Srgrimes * 221541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 231541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 261541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 271541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 281541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2922521Sdyson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3050477Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3222521Sdyson * SUCH DAMAGE. 3322521Sdyson * 34159082Sdds * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 35159082Sdds */ 36159082Sdds 37159082Sdds#define ETHERMTU 1500 38159082Sdds 39159082Sdds/* 4022521Sdyson * The number of bytes in an ethernet (MAC) address. 4122521Sdyson */ 4254444Seivind#define ETHER_ADDR_LEN 6 4354444Seivind 4454444Seivind/* 4554444Seivind * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header. 4654444Seivind */ 4745058Seivindstruct ether_header { 4822521Sdyson u_int8_t ether_dhost[ETHER_ADDR_LEN]; 4922521Sdyson u_int8_t ether_shost[ETHER_ADDR_LEN]; 5022521Sdyson u_int16_t ether_type; 5122521Sdyson}; 52116615Sse 53116615Sse/* 54116615Sse * Length of a DEC/Intel/Xerox or 802.3 Ethernet header; note that some 55159082Sdds * compilers may pad "struct ether_header" to a multiple of 4 bytes, 56159082Sdds * for example, so "sizeof (struct ether_header)" may not give the right 57159082Sdds * answer. 58116615Sse */ 59116615Sse#define ETHER_HDRLEN 14 60116615Sse