00001 /*############################################################################## 00002 00003 nIP - nano IP stack 00004 00005 File : ethernet.h 00006 00007 Description : Ethernet 00008 00009 Copyright notice: 00010 00011 Copyright (C) 2005 - 00012 Andreas Dittrich, dittrich@informatik.hu-berlin.de 00013 Jon Kowal, kowal@informatik.hu-berlin.de 00014 00015 This program is free software; you can redistribute it and/or 00016 modify it under the terms of the GNU General Public License 00017 as published by the Free Software Foundation; either version 2 00018 of the License, or (at your option) any later version. 00019 00020 This program is distributed in the hope that it will be useful, 00021 but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 GNU General Public License for more details. 00024 00025 You should have received a copy of the GNU General Public License 00026 along with this program; if not, write to the Free Software 00027 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00028 00029 ##############################################################################*/ 00030 00031 #ifndef _NIP_ETHERNET_H 00032 #define _NIP_ETHERNET_H 00033 00034 #include "nip_init.h" 00035 #include "net/net_if.h" 00036 00037 #define ETH_NIC_CHECK_MAC /**< if defined the physical address check will be left to the NIC */ 00038 00039 00040 struct ethernet_header_s{ 00041 uint8_t EnetPacketDest[6]; /**< MAC Zieladresse 6 Byte */ 00042 uint8_t EnetPacketSrc[6]; /**< MAC Quelladresse 6 Byte */ 00043 uint8_t EnetPacketType[2]; /**< Nutzlast 0x0800=IP Datagramm;0x0806 = ARP */ 00044 }; 00045 00046 00047 void nip_eth_configure_if_defaults( nip_net_if_id_t net_if_id ); 00048 //void nip_eth_receive(nip_net_if_id_t net_if_id); 00049 void nip_eth_disp_receive( void ); 00050 00051 uint8_t nip_eth_header (nip_net_if_id_t net_if_id, nip_net_trans_id_t trans_id, 00052 uint16_t type, void *daddr, void *saddr, uint16_t len); 00053 00054 #endif /* _NIP_ETHERNET_H */