Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dummy.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Intel Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_NET_DUMMY_H_
14#define ZEPHYR_INCLUDE_NET_DUMMY_H_
15
16#include <zephyr/net/net_if.h>
17#include <zephyr/net/net_pkt.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
31
33__subsystem struct dummy_driver_api {
38 struct net_if_driver_api iface_api;
39
41 int (*send)(const struct device *dev, struct net_pkt *pkt);
42
47 enum net_verdict (*recv)(struct net_if *iface, struct net_pkt *pkt);
48
50 int (*start)(const struct device *dev);
51
53 int (*stop)(const struct device *dev);
54};
55
57DEVICE_API_EXTENDS(dummy, net_if, iface_api);
59
60#ifdef __cplusplus
61}
62#endif
63
67
68#endif /* ZEPHYR_INCLUDE_NET_DUMMY_H_ */
#define DEVICE_API_EXTENDS(_child, _parent, _member)
Declare that API class _child is an extension of device API class _parent.
Definition device.h:1470
net_verdict
Net Verdict.
Definition net_core.h:84
Public API for network interface.
Network packet buffer descriptor API.
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
Dummy L2 API operations.
Definition dummy.h:33
int(* send)(const struct device *dev, struct net_pkt *pkt)
Send a network packet.
Definition dummy.h:41
struct net_if_driver_api iface_api
The net_if_driver_api must be placed in first position in this struct so that we are compatible with ...
Definition dummy.h:38
int(* start)(const struct device *dev)
Start the device.
Definition dummy.h:50
enum net_verdict(* recv)(struct net_if *iface, struct net_pkt *pkt)
Receive a network packet (only limited use for this, for example receiving capturing packets and post...
Definition dummy.h:47
int(* stop)(const struct device *dev)
Stop the device.
Definition dummy.h:53
Network Interface structure.
Definition net_if.h:875
Network packet.
Definition net_pkt.h:119