1190207Srpaulo/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002-12-11 07:13:51 guy Exp $ (LBL) */
275115Sfenner/*
375115Sfenner * Copyright (c) 1982, 1986, 1993
475115Sfenner *	The Regents of the University of California.  All rights reserved.
575115Sfenner *
675115Sfenner * Redistribution and use in source and binary forms, with or without
775115Sfenner * modification, are permitted provided that the following conditions
875115Sfenner * are met:
975115Sfenner * 1. Redistributions of source code must retain the above copyright
1075115Sfenner *    notice, this list of conditions and the following disclaimer.
1175115Sfenner * 2. Redistributions in binary form must reproduce the above copyright
1275115Sfenner *    notice, this list of conditions and the following disclaimer in the
1375115Sfenner *    documentation and/or other materials provided with the distribution.
1475115Sfenner * 3. All advertising materials mentioning features or use of this software
1575115Sfenner *    must display the following acknowledgement:
1675115Sfenner *	This product includes software developed by the University of
1775115Sfenner *	California, Berkeley and its contributors.
1875115Sfenner * 4. Neither the name of the University nor the names of its contributors
1975115Sfenner *    may be used to endorse or promote products derived from this software
2075115Sfenner *    without specific prior written permission.
2175115Sfenner *
2275115Sfenner * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2375115Sfenner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2475115Sfenner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2575115Sfenner * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2675115Sfenner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2775115Sfenner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2875115Sfenner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2975115Sfenner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3075115Sfenner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3175115Sfenner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3275115Sfenner * SUCH DAMAGE.
3375115Sfenner *
3475115Sfenner *	@(#)if_ether.h	8.3 (Berkeley) 5/2/95
3575115Sfenner */
3675115Sfenner
3775115Sfenner#define	ETHERMTU	1500
3875115Sfenner
3975115Sfenner/*
4075115Sfenner * The number of bytes in an ethernet (MAC) address.
4175115Sfenner */
4275115Sfenner#define	ETHER_ADDR_LEN		6
4375115Sfenner
4475115Sfenner/*
4575115Sfenner * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
4675115Sfenner */
4775115Sfennerstruct	ether_header {
4875115Sfenner	u_int8_t	ether_dhost[ETHER_ADDR_LEN];
4975115Sfenner	u_int8_t	ether_shost[ETHER_ADDR_LEN];
5075115Sfenner	u_int16_t	ether_type;
5175115Sfenner};
5275115Sfenner
5375115Sfenner/*
5475115Sfenner * Length of a DEC/Intel/Xerox or 802.3 Ethernet header; note that some
5575115Sfenner * compilers may pad "struct ether_header" to a multiple of 4 bytes,
5675115Sfenner * for example, so "sizeof (struct ether_header)" may not give the right
5775115Sfenner * answer.
5875115Sfenner */
5975115Sfenner#define ETHER_HDRLEN		14
60