Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (C) 2006 Michael Brown <mbrown@fensystems.co.uk>.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of the
  7. * License, or any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. FILE_LICENCE ( GPL2_OR_LATER );
  19. #include <stdint.h>
  20. #include <errno.h>
  21. #include <gpxe/iobuf.h>
  22. #include <gpxe/netdevice.h>
  23. /** @file
  24. *
  25. * Null network device
  26. *
  27. */
  28. static int null_open ( struct net_device *netdev __unused ) {
  29. return -ENODEV;
  30. };
  31. static void null_close ( struct net_device *netdev __unused ) {
  32. /* Do nothing */
  33. };
  34. static int null_transmit ( struct net_device *netdev __unused,
  35. struct io_buffer *iobuf __unused ) {
  36. return -ENODEV;
  37. };
  38. static void null_poll ( struct net_device *netdev __unused ) {
  39. /* Do nothing */
  40. }
  41. static void null_irq ( struct net_device *netdev __unused,
  42. int enable __unused ) {
  43. /* Do nothing */
  44. }
  45. struct net_device_operations null_netdev_operations = {
  46. .open = null_open,
  47. .close = null_close,
  48. .transmit = null_transmit,
  49. .poll = null_poll,
  50. .irq = null_irq,
  51. };