ether.h revision 127669
178064Sume/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002/12/11 07:13:51 guy Exp $ (LBL) */ 278064Sume/* 378064Sume * Copyright (c) 1982, 1986, 1993 478064Sume * The Regents of the University of California. All rights reserved. 557522Sshin * 6108106Strhodes * Redistribution and use in source and binary forms, with or without 757522Sshin * modification, are permitted provided that the following conditions 857522Sshin * are met: 978064Sume * 1. Redistributions of source code must retain the above copyright 1057522Sshin * notice, this list of conditions and the following disclaimer. 1157522Sshin * 2. Redistributions in binary form must reproduce the above copyright 1257522Sshin * notice, this list of conditions and the following disclaimer in the 1357522Sshin * documentation and/or other materials provided with the distribution. 1457522Sshin * 3. All advertising materials mentioning features or use of this software 1557522Sshin * must display the following acknowledgement: 1657522Sshin * This product includes software developed by the University of 1778064Sume * California, Berkeley and its contributors. 1878064Sume * 4. Neither the name of the University nor the names of its contributors 1978064Sume * may be used to endorse or promote products derived from this software 2078064Sume * without specific prior written permission. 2178064Sume * 2257522Sshin * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2357522Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2457522Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2557522Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2657522Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2757522Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2857522Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2978064Sume * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3078064Sume * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3178064Sume * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3278064Sume * SUCH DAMAGE. 3378064Sume * 3478064Sume * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 3578064Sume */ 3678064Sume 3778064Sume#define ETHERMTU 1500 3878064Sume 3978064Sume/* 4078064Sume * The number of bytes in an ethernet (MAC) address. 4157522Sshin */ 4257522Sshin#define ETHER_ADDR_LEN 6 4378064Sume 4478064Sume/* 4578064Sume * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header. 4678064Sume */ 4757522Sshinstruct ether_header { 4857522Sshin u_int8_t ether_dhost[ETHER_ADDR_LEN]; 4978064Sume u_int8_t ether_shost[ETHER_ADDR_LEN]; 5078064Sume u_int16_t ether_type; 5157522Sshin}; 5257522Sshin 5357522Sshin/* 5478064Sume * Length of a DEC/Intel/Xerox or 802.3 Ethernet header; note that some 5557522Sshin * compilers may pad "struct ether_header" to a multiple of 4 bytes, 5657522Sshin * for example, so "sizeof (struct ether_header)" may not give the right 5778064Sume * answer. 5878064Sume */ 5978064Sume#define ETHER_HDRLEN 14 6078064Sume