Nut/OS  4.10.3
API Reference
null_ether.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009 by egnite GmbH
00003  *
00004  * All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  *
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer.
00012  * 2. Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  * 3. Neither the name of the copyright holders nor the names of
00016  *    contributors may be used to endorse or promote products derived
00017  *    from this software without specific prior written permission.
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00020  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00021  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00022  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00023  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00024  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00025  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00026  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00027  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00028  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00029  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00030  * SUCH DAMAGE.
00031  *
00032  * For additional information see http://www.ethernut.de/
00033  */
00034 
00035 /*
00036  * $Id$
00037  */
00038 
00039 #include <cfg/os.h>
00040 
00041 #include <net/if_var.h>
00042 #include <net/ether.h>
00043 #include <netinet/if_ether.h>
00044 
00045 #include <dev/null_ether.h>
00046 
00051 
00052 
00065 int NullEtherOutput(NUTDEVICE * dev, NETBUF * nb)
00066 {
00067     return 0;
00068 }
00069 
00077 int NullEtherInit(NUTDEVICE * dev)
00078 {
00079     return 0;
00080 }
00081 
00087 static IFNET ifn_eth0 = {
00088     IFT_ETHER,                  
00089     0,                          
00090     {0, 0, 0, 0, 0, 0},         
00091     0,                          
00092     0,                          
00093     0,                          
00094     ETHERMTU,                   
00095     0,                          
00096     0,                          
00097     0,                          
00098     NutEtherInput,              
00099     NullEtherOutput,            
00100     NutEtherOutput              
00101 };
00102 
00112 NUTDEVICE devNullEther = {
00113     0,                          
00114     {'e', 't', 'h', '0', 0, 0, 0, 0, 0},        
00115     IFTYP_NET,                  
00116     0,                          
00117     0,                          
00118     &ifn_eth0,                  
00119     NULL,                       
00120     NullEtherInit,              
00121     0,                          
00122     0,                          
00123     0,                          
00124 #ifdef __HARVARD_ARCH__
00125     0,                          
00126 #endif
00127     0,                          
00128     0,                          
00129     0                           
00130 };
00131