Zephyr Project API  3.4.0
A Scalable Open Source RTOS
offloaded_netdev.h
Go to the documentation of this file.
1
7/*
8 * Copyright (c) 2022 Nordic Semiconductor ASA
9 *
10 * SPDX-License-Identifier: Apache-2.0
11 */
12
13#ifndef ZEPHYR_INCLUDE_OFFLOADED_NETDEV_H_
14#define ZEPHYR_INCLUDE_OFFLOADED_NETDEV_H_
15
16#include <zephyr/kernel.h>
17#include <zephyr/types.h>
18#include <stdbool.h>
19#include <zephyr/net/net_if.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
41 struct net_if_api iface_api;
42
44 int (*enable)(const struct net_if *iface, bool state);
45};
46
47/* Ensure offloaded_if_api is compatible with net_if_api */
48BUILD_ASSERT(offsetof(struct offloaded_if_api, iface_api) == 0);
49
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* ZEPHYR_INCLUDE_OFFLOADED_NETDEV_H_ */
Public kernel APIs.
Public API for network interface.
state
Definition: parser_state.h:29
Network Interface structure.
Definition: net_if.h:516
Extended net_if_api for offloaded ifaces/network devices, allowing handling of admin up/down state ch...
Definition: offloaded_netdev.h:36
struct net_if_api iface_api
Definition: offloaded_netdev.h:41
int(* enable)(const struct net_if *iface, bool state)
Definition: offloaded_netdev.h:44