2018-02-21 15:18:35 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file
|
|
|
|
* @brief Private functions for native posix ethernet driver.
|
|
|
|
*/
|
|
|
|
|
2018-09-14 19:43:44 +02:00
|
|
|
#ifndef ZEPHYR_DRIVERS_ETHERNET_ETH_NATIVE_POSIX_PRIV_H_
|
|
|
|
#define ZEPHYR_DRIVERS_ETHERNET_ETH_NATIVE_POSIX_PRIV_H_
|
2018-02-21 15:18:35 +01:00
|
|
|
|
|
|
|
int eth_iface_create(const char *if_name, bool tun_only);
|
|
|
|
int eth_iface_remove(int fd);
|
|
|
|
int eth_wait_data(int fd);
|
|
|
|
ssize_t eth_read_data(int fd, void *buf, size_t buf_len);
|
|
|
|
ssize_t eth_write_data(int fd, void *buf, size_t buf_len);
|
|
|
|
|
2018-03-12 20:54:19 +01:00
|
|
|
#if defined(CONFIG_NET_GPTP)
|
|
|
|
int eth_clock_gettime(struct net_ptp_time *time);
|
|
|
|
#endif
|
|
|
|
|
2018-07-23 13:00:19 +02:00
|
|
|
#if defined(CONFIG_NET_PROMISCUOUS_MODE)
|
|
|
|
int eth_promisc_mode(const char *if_name, bool enable);
|
|
|
|
#else
|
|
|
|
static inline int eth_promisc_mode(const char *if_name, bool enable)
|
|
|
|
{
|
|
|
|
ARG_UNUSED(if_name);
|
|
|
|
ARG_UNUSED(enable);
|
|
|
|
|
|
|
|
return -ENOTSUP;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-09-14 19:43:44 +02:00
|
|
|
#endif /* ZEPHYR_DRIVERS_ETHERNET_ETH_NATIVE_POSIX_PRIV_H_ */
|