netdev_test.h File Reference

netdev dummy test driver definitions More...

Detailed Description

#include "mutex.h"
#include "net/netdev.h"
+ Include dependency graph for netdev_test.h:

Go to the source code of this file.

Data Structures

struct  netdev_test_t
 Device descriptor for netdev dummy test driver devices. More...
 

Typedefs

typedef int(* netdev_test_send_cb_t) (netdev_t *dev, const iolist_t *iolist)
 Callback type to handle send command. More...
 
typedef int(* netdev_test_recv_cb_t) (netdev_t *dev, char *buf, int len, void *info)
 Callback type to handle receive command. More...
 
typedef int(* netdev_test_init_cb_t) (netdev_t *dev)
 Callback type to handle device initialization. More...
 
typedef void(* netdev_test_isr_cb_t) (netdev_t *dev)
 Callback type to handle user-space ISR events. More...
 
typedef int(* netdev_test_get_cb_t) (netdev_t *dev, void *value, size_t max_len)
 Callback type to handle get commands. More...
 
typedef int(* netdev_test_set_cb_t) (netdev_t *dev, const void *value, size_t value_len)
 Callback type to handle set commands. More...
 

Functions

static void netdev_test_set_send_cb (netdev_test_t *dev, netdev_test_send_cb_t send_cb)
 override send callback More...
 
static void netdev_test_set_recv_cb (netdev_test_t *dev, netdev_test_recv_cb_t recv_cb)
 override receive callback More...
 
static void netdev_test_set_init_cb (netdev_test_t *dev, netdev_test_init_cb_t init_cb)
 override initialization callback More...
 
static void netdev_test_set_isr_cb (netdev_test_t *dev, netdev_test_isr_cb_t isr_cb)
 override ISR event handler callback More...
 
static void netdev_test_set_get_cb (netdev_test_t *dev, netopt_t opt, netdev_test_get_cb_t get_cb)
 override get callback for a certain option type More...
 
static void netdev_test_set_set_cb (netdev_test_t *dev, netopt_t opt, netdev_test_set_cb_t set_cb)
 override get callback for a certain option type More...
 
void netdev_test_setup (netdev_test_t *dev, void *state)
 Setup a given netdev dummy test driver device. More...
 
void netdev_test_reset (netdev_test_t *dev)
 Resets all callbacks for the device to NULL. More...