/* ************************************************************************** * * Boot-ROM-Code to load an operating system across a TCP/IP network. * * Module: hw/eth.h * Purpose: General definitions for ethernet hardware * Entries: None * ************************************************************************** * * Copyright (C) 1998-2003 Gero Kuhlmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: eth.h,v 1.4 2003/01/25 23:29:40 gkminix Exp $ */ #ifndef _HW_ETH_H #define _HW_ETH_H /* ************************************************************************** * * Magic constants for ethernet */ #define ETH_ALEN 6 /* Bytes in ethernet addr */ #define ETH_FLEN 4 /* Bytes in FCS */ #define ETH_HLEN 14 /* Total bytes in header */ #define ETH_DATA_MIN 46 /* Min. bytes in payload */ #define ETH_DATA_MAX 1500 /* Max. bytes in payload */ #define ETH_FRAME_MIN (ETH_DATA_MIN + ETH_HLEN) /* Min. bytes w/o FCS */ #define ETH_FRAME_MAX (ETH_DATA_MAX + ETH_HLEN) /* Max. bytes w/o FCS */ #define ETH_BUF_SIZE (ETH_FRAME_MAX + ETH_FLEN) /* Buffer size with FCS */ #endif /* _HW_ETH_H */