105 unsigned int line ) {
139 unsigned int line ) {
158 const char *
value,
const char *file,
159 unsigned int line ) {
191 unsigned int line ) {
208 unsigned int line ) {
static void netdev_tx_complete(struct net_device *netdev, struct io_buffer *iobuf)
Complete network transmission.
struct device dev
Dummy physical device.
int(* open)(struct net_device *netdev)
Open network device.
static void testnet_poll(struct net_device *netdev __unused)
Poll for completed and received packets.
unsigned int count
Number of initial settings.
struct net_device * netdev
Network device.
Self-test infrastructure.
static int testnet_transmit(struct net_device *netdev, struct io_buffer *iobuf)
Transmit packet.
static void testnet_close(struct net_device *netdev __unused)
Close network device.
void testnet_set_okx(struct testnet *testnet, const char *name, const char *value, const char *file, unsigned int line)
Report a network device setting test result.
void testnet_close_okx(struct testnet *testnet, const char *file, unsigned int line)
Report a network device closing test result.
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
static void netdev_init(struct net_device *netdev, struct net_device_operations *op)
Initialise a network device.
struct testnet_setting * testset
Initial settings.
#define okx(success, file, line)
Report test result.
static void netdev_put(struct net_device *netdev)
Drop reference to network device.
pseudo_bit_t value[0x00020]
#define __unused
Declare a variable or data structure as unused.
static struct net_device * netdev
struct settings * autovivify_child_settings(struct settings *parent, const char *name)
Find or create child settings block.
void unregister_netdev(struct net_device *netdev)
Unregister network device.
void testnet_okx(struct testnet *testnet, const char *file, unsigned int line)
Report a network device creation test result.
int storef_setting(struct settings *settings, const struct setting *setting, const char *value)
Store formatted value of setting.
char * strchr(const char *src, int character)
Find character within a string.
int register_netdev(struct net_device *netdev)
Register network device.
size_t strlen(const char *src)
Get length of string.
static void netdev_nullify(struct net_device *netdev)
Stop using a network device.
static int testnet_open(struct net_device *netdev __unused)
Open network device.
A test network device setting.
static struct net_device_operations testnet_operations
Test network device operations.
const char * name
Setting name (relative to network device's settings)
void testnet_remove_okx(struct testnet *testnet, const char *file, unsigned int line)
Report a network device removal test result.
Network device operations.
struct device * dev
Underlying hardware device.
void netdev_close(struct net_device *netdev)
Close network device.
Network device management.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
char name[NETDEV_NAME_LEN]
Name of this network device.
int strcmp(const char *first, const char *second)
Compare strings.
struct net_device * alloc_etherdev(size_t priv_size)
Allocate Ethernet device.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
#define NULL
NULL pointer (VOID *)
int netdev_open(struct net_device *netdev)
Open network device.
void testnet_open_okx(struct testnet *testnet, const char *file, unsigned int line)
Report a network device opening test result.
int parse_setting_name(char *name, get_child_settings_t get_child, struct settings **settings, struct setting *setting)
Parse setting name.