iPXE
nullnet.c File Reference

Null network device. More...

#include <stdint.h>
#include <errno.h>
#include <ipxe/iobuf.h>
#include <ipxe/netdevice.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
static int null_open (struct net_device *netdev __unused)
static void null_close (struct net_device *netdev __unused)
static int null_transmit (struct net_device *netdev __unused, struct io_buffer *iobuf __unused)
static void null_poll (struct net_device *netdev __unused)
static void null_irq (struct net_device *netdev __unused, int enable __unused)

Variables

struct net_device_operations null_netdev_operations

Detailed Description

Null network device.

Definition in file nullnet.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ null_open()

int null_open ( struct net_device *netdev __unused)
static

Definition at line 38 of file nullnet.c.

38 {
39 return -ENODEV;
40};
#define ENODEV
No such device.
Definition errno.h:510

References __unused, ENODEV, and netdev.

◆ null_close()

void null_close ( struct net_device *netdev __unused)
static

Definition at line 42 of file nullnet.c.

42 {
43 /* Do nothing */
44};

References __unused, and netdev.

◆ null_transmit()

int null_transmit ( struct net_device *netdev __unused,
struct io_buffer *iobuf __unused )
static

Definition at line 46 of file nullnet.c.

47 {
48 return -ENODEV;
49};

References __unused, ENODEV, and netdev.

◆ null_poll()

void null_poll ( struct net_device *netdev __unused)
static

Definition at line 51 of file nullnet.c.

51 {
52 /* Do nothing */
53}

References __unused, and netdev.

◆ null_irq()

void null_irq ( struct net_device *netdev __unused,
int enable __unused )
static

Definition at line 55 of file nullnet.c.

56 {
57 /* Do nothing */
58}

References __unused, and netdev.

Variable Documentation

◆ null_netdev_operations

struct net_device_operations null_netdev_operations
Initial value:
= {
.open = null_open,
.close = null_close,
.transmit = null_transmit,
.poll = null_poll,
.irq = null_irq,
}
static int null_open(struct net_device *netdev __unused)
Definition nullnet.c:38
static int null_transmit(struct net_device *netdev __unused, struct io_buffer *iobuf __unused)
Definition nullnet.c:46
static void null_poll(struct net_device *netdev __unused)
Definition nullnet.c:51
static void null_close(struct net_device *netdev __unused)
Definition nullnet.c:42
static void null_irq(struct net_device *netdev __unused, int enable __unused)
Definition nullnet.c:55

Definition at line 60 of file nullnet.c.

60 {
61 .open = null_open,
62 .close = null_close,
63 .transmit = null_transmit,
64 .poll = null_poll,
65 .irq = null_irq,
66};

Referenced by netdev_nullify().