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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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., 51 Franklin Street, Fifth Floor, Boston, MA
  17. * 02110-1301, USA.
  18. */
  19. FILE_LICENCE ( GPL2_OR_LATER );
  20. #include <stdint.h>
  21. #include <errno.h>
  22. #include <ipxe/iobuf.h>
  23. #include <ipxe/netdevice.h>
  24. /** @file
  25. *
  26. * Null network device
  27. *
  28. */
  29. static int null_open ( struct net_device *netdev __unused ) {
  30. return -ENODEV;
  31. };
  32. static void null_close ( struct net_device *netdev __unused ) {
  33. /* Do nothing */
  34. };
  35. static int null_transmit ( struct net_device *netdev __unused,
  36. struct io_buffer *iobuf __unused ) {
  37. return -ENODEV;
  38. };
  39. static void null_poll ( struct net_device *netdev __unused ) {
  40. /* Do nothing */
  41. }
  42. static void null_irq ( struct net_device *netdev __unused,
  43. int enable __unused ) {
  44. /* Do nothing */
  45. }
  46. struct net_device_operations null_netdev_operations = {
  47. .open = null_open,
  48. .close = null_close,
  49. .transmit = null_transmit,
  50. .poll = null_poll,
  51. .irq = null_irq,
  52. };