00001 /* 00002 * Copyright (C) 2006 Michael Brown <mbrown@fensystems.co.uk>. 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License as 00006 * published by the Free Software Foundation; either version 2 of the 00007 * License, or any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 FILE_LICENCE ( GPL2_OR_LATER ); 00020 00021 #include <stdint.h> 00022 #include <errno.h> 00023 #include <gpxe/iobuf.h> 00024 #include <gpxe/netdevice.h> 00025 00026 /** @file 00027 * 00028 * Null network device 00029 * 00030 */ 00031 00032 static int null_open ( struct net_device *netdev __unused ) { 00033 return -ENODEV; 00034 }; 00035 00036 static void null_close ( struct net_device *netdev __unused ) { 00037 /* Do nothing */ 00038 }; 00039 00040 static int null_transmit ( struct net_device *netdev __unused, 00041 struct io_buffer *iobuf __unused ) { 00042 return -ENODEV; 00043 }; 00044 00045 static void null_poll ( struct net_device *netdev __unused ) { 00046 /* Do nothing */ 00047 } 00048 00049 static void null_irq ( struct net_device *netdev __unused, 00050 int enable __unused ) { 00051 /* Do nothing */ 00052 } 00053 00054 struct net_device_operations null_netdev_operations = { 00055 .open = null_open, 00056 .close = null_close, 00057 .transmit = null_transmit, 00058 .poll = null_poll, 00059 .irq = null_irq, 00060 };
1.5.7.1