|
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
|
const struct setting mac_setting | __setting (SETTING_NETDEV, mac) |
| Network device predefined settings. More...
|
|
const struct setting hwaddr_setting | __setting (SETTING_NETDEV, hwaddr) |
|
const struct setting bustype_setting | __setting (SETTING_NETDEV, bustype) |
|
const struct setting busloc_setting | __setting (SETTING_NETDEV, busloc) |
|
const struct setting busid_setting | __setting (SETTING_NETDEV, busid) |
|
const struct setting linktype_setting | __setting (SETTING_NETDEV, linktype) |
|
const struct setting chip_setting | __setting (SETTING_NETDEV, chip) |
|
const struct setting ifname_setting | __setting (SETTING_NETDEV, ifname) |
|
const struct setting mtu_setting | __setting (SETTING_NETDEV, mtu) |
|
static int | netdev_store_mac (struct net_device *netdev, const void *data, size_t len) |
| Store link-layer address setting. More...
|
|
static int | netdev_fetch_mac (struct net_device *netdev, void *data, size_t len) |
| Fetch link-layer address setting. More...
|
|
static int | netdev_fetch_hwaddr (struct net_device *netdev, void *data, size_t len) |
| Fetch hardware address setting. More...
|
|
static int | netdev_fetch_bustype (struct net_device *netdev, void *data, size_t len) |
| Fetch bus type setting. More...
|
|
static int | netdev_fetch_busloc (struct net_device *netdev, void *data, size_t len) |
| Fetch bus location setting. More...
|
|
static int | netdev_fetch_busid (struct net_device *netdev, void *data, size_t len) |
| Fetch bus ID setting. More...
|
|
static int | netdev_fetch_linktype (struct net_device *netdev, void *data, size_t len) |
| Fetch link layer type setting. More...
|
|
static int | netdev_fetch_chip (struct net_device *netdev, void *data, size_t len) |
| Fetch chip setting. More...
|
|
static int | netdev_fetch_ifname (struct net_device *netdev, void *data, size_t len) |
| Fetch ifname setting. More...
|
|
static int | netdev_store (struct settings *settings, const struct setting *setting, const void *data, size_t len) |
| Store value of network device setting. More...
|
|
static int | netdev_fetch (struct settings *settings, struct setting *setting, void *data, size_t len) |
| Fetch value of network device setting. More...
|
|
static void | netdev_clear (struct settings *settings) |
| Clear network device settings. More...
|
|
static struct settings * | netdev_redirect (struct settings *settings) |
| Redirect "netX" settings block. More...
|
|
static void | netdev_redirect_settings_init (void) |
| Initialise "netX" settings. More...
|
|
struct init_fn netdev_redirect_settings_init_fn | __init_fn (INIT_LATE) |
| "netX" settings initialiser More...
|
|
static int | apply_netdev_settings (void) |
| Apply network device settings. More...
|
|
Network device configuration settings.
Definition in file netdev_settings.c.
static int netdev_fetch_bustype |
( |
struct net_device * |
netdev, |
|
|
void * |
data, |
|
|
size_t |
len |
|
) |
| |
|
static |
Fetch bus type setting.
- Parameters
-
netdev | Network device |
data | Buffer to fill with setting data |
len | Length of buffer |
- Return values
-
len | Length of setting data, or negative error |
Definition at line 159 of file netdev_settings.c.
161 static const char *bustypes[] = {
176 assert (
desc->bus_type < ( sizeof ( bustypes ) /
177 sizeof ( bustypes[0] ) ) );
178 bustype = bustypes[
desc->bus_type];
182 return strlen ( bustype );
uint64_t desc
Microcode descriptor list physical address.
#define ENOENT
No such file or directory.
A hardware device description.
#define BUS_TYPE_MCA
MCA bus type.
char * strncpy(char *dest, const char *src, size_t max)
Copy string.
#define BUS_TYPE_ISA
ISA bus type.
#define BUS_TYPE_PCI
PCI bus type.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
static struct net_device * netdev
#define BUS_TYPE_EISA
EISA bus type.
size_t strlen(const char *src)
Get length of string.
#define BUS_TYPE_EFI
EFI bus type.
struct device * dev
Underlying hardware device.
#define BUS_TYPE_TAP
TAP bus type.
uint8_t data[48]
Additional event data.
struct device_description desc
Device description.
#define BUS_TYPE_XEN
Xen bus type.
#define BUS_TYPE_USB
USB bus type.
#define BUS_TYPE_HV
Hyper-V bus type.
#define BUS_TYPE_ISAPNP
ISAPnP bus type.
References assert(), BUS_TYPE_EFI, BUS_TYPE_EISA, BUS_TYPE_HV, BUS_TYPE_ISA, BUS_TYPE_ISAPNP, BUS_TYPE_MCA, BUS_TYPE_PCI, BUS_TYPE_TAP, BUS_TYPE_USB, BUS_TYPE_XEN, data, desc, device::desc, net_device::dev, ENOENT, len, netdev, strlen(), and strncpy().
static int apply_netdev_settings |
( |
void |
| ) |
|
|
static |
Apply network device settings.
- Return values
-
Definition at line 439 of file netdev_settings.c.
464 if (
mtu > max_mtu ) {
465 DBGC (
netdev,
"NETDEV %s cannot support MTU %zd (max " 473 if (
mtu != old_mtu ) {
struct arbelprm_rc_send_wqe rc
uint8_t ll_header_len
Link-layer header length.
size_t mtu
Maximum transmission unit length.
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
static int netdev_is_open(struct net_device *netdev)
Check whether or not network device is open.
static struct net_device * netdev
char * strerror(int errno)
Retrieve string representation of error number.
#define for_each_netdev(netdev)
Iterate over all network devices.
unsigned long fetch_uintz_setting(struct settings *settings, const struct setting *setting)
Fetch value of unsigned integer setting, or zero.
void netdev_close(struct net_device *netdev)
Close network device.
char name[NETDEV_NAME_LEN]
Name of this network device.
size_t max_pkt_len
Maximum packet length.
int netdev_open(struct net_device *netdev)
Open network device.
struct ll_protocol * ll_protocol
Link-layer protocol.
References DBGC, fetch_uintz_setting(), for_each_netdev, ll_protocol::ll_header_len, net_device::ll_protocol, net_device::max_pkt_len, mtu, net_device::mtu, net_device::name, netdev, netdev_close(), netdev_is_open(), netdev_open(), netdev_settings(), rc, and strerror().