Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
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
7
8#ifndef ZEPHYR_INCLUDE_NET_DUMMY_H_
9#define ZEPHYR_INCLUDE_NET_DUMMY_H_
10
11#include <net/net_if.h>
12#include <net/net_pkt.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
25struct dummy_api {
30 struct net_if_api iface_api;
31
33 int (*send)(const struct device *dev, struct net_pkt *pkt);
34};
35
36/* Make sure that the network interface API is properly setup inside
37 * dummy API struct (it is the first one).
38 */
39BUILD_ASSERT(offsetof(struct dummy_api, iface_api) == 0);
40
41#ifdef __cplusplus
42}
43#endif
44
49#endif /* ZEPHYR_INCLUDE_NET_DUMMY_H_ */
Public API for network interface.
Network packet buffer descriptor API.
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
Definition: dummy.h:25
int(* send)(const struct device *dev, struct net_pkt *pkt)
Definition: dummy.h:33
struct net_if_api iface_api
Definition: dummy.h:30
Network packet.
Definition: net_pkt.h:62