Zephyr API Documentation 4.0.0-rc2
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
26#include <zephyr/net/net_pkt.h>
27#include <zephyr/net/net_if.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
40#if defined(CONFIG_NET_PROMISCUOUS_MODE)
42#else
43static inline struct net_pkt *net_promisc_mode_wait_data(k_timeout_t timeout)
44{
45 ARG_UNUSED(timeout);
46
47 return NULL;
48}
49#endif /* CONFIG_NET_PROMISCUOUS_MODE */
50
58#if defined(CONFIG_NET_PROMISCUOUS_MODE)
60#else
61static inline int net_promisc_mode_on(struct net_if *iface)
62{
63 ARG_UNUSED(iface);
64
65 return -ENOTSUP;
66}
67#endif /* CONFIG_NET_PROMISCUOUS_MODE */
68
76#if defined(CONFIG_NET_PROMISCUOUS_MODE)
78#else
79static inline int net_promisc_mode_off(struct net_if *iface)
80{
81 ARG_UNUSED(iface);
82
83 return -ENOTSUP;
84}
85#endif /* CONFIG_NET_PROMISCUOUS_MODE */
86
87#ifdef __cplusplus
88}
89#endif
90
95#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:79
static struct net_pkt * net_promisc_mode_wait_data(k_timeout_t timeout)
Start to wait received network packets.
Definition promiscuous.h:43
static int net_promisc_mode_on(struct net_if *iface)
Enable promiscuous mode for a given network interface.
Definition promiscuous.h:61
#define ENOTSUP
Unsupported value.
Definition errno.h:114
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:680
Network packet.
Definition net_pkt.h:91
struct net_if * iface
Network interface.
Definition net_pkt.h:114