Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
promiscuous.h
Go to the documentation of this file.
1
8/*
9 * Copyright (c) 2018 Intel Corporation
10 *
11 * SPDX-License-Identifier: Apache-2.0
12 */
13
14#ifndef ZEPHYR_INCLUDE_NET_PROMISCUOUS_H_
15#define ZEPHYR_INCLUDE_NET_PROMISCUOUS_H_
16
24#include <zephyr/net/net_pkt.h>
25#include <zephyr/net/net_if.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
38#if defined(CONFIG_NET_PROMISCUOUS_MODE)
40#else
41static inline struct net_pkt *net_promisc_mode_wait_data(k_timeout_t timeout)
42{
43 ARG_UNUSED(timeout);
44
45 return NULL;
46}
47#endif /* CONFIG_NET_PROMISCUOUS_MODE */
48
56#if defined(CONFIG_NET_PROMISCUOUS_MODE)
58#else
59static inline int net_promisc_mode_on(struct net_if *iface)
60{
61 ARG_UNUSED(iface);
62
63 return -ENOTSUP;
64}
65#endif /* CONFIG_NET_PROMISCUOUS_MODE */
66
74#if defined(CONFIG_NET_PROMISCUOUS_MODE)
76#else
77static inline int net_promisc_mode_off(struct net_if *iface)
78{
79 ARG_UNUSED(iface);
80
81 return -ENOTSUP;
82}
83#endif /* CONFIG_NET_PROMISCUOUS_MODE */
84
85#ifdef __cplusplus
86}
87#endif
88
93#endif /* ZEPHYR_INCLUDE_NET_PROMISCUOUS_H_ */
static int net_promisc_mode_off(struct net_if *iface)
Disable promiscuous mode for a given network interface.
Definition: promiscuous.h:77
static struct net_pkt * net_promisc_mode_wait_data(k_timeout_t timeout)
Start to wait received network packets.
Definition: promiscuous.h:41
static int net_promisc_mode_on(struct net_if *iface)
Enable promiscuous mode for a given network interface.
Definition: promiscuous.h:59
#define ENOTSUP
Unsupported value.
Definition: errno.h:115
Public API for network interface.
Network packet buffer descriptor API.
Kernel timeout type.
Definition: sys_clock.h:65
Network Interface structure.
Definition: net_if.h:675
Network packet.
Definition: net_pkt.h:67
struct net_if * iface
Network interface.
Definition: net_pkt.h:90