1 /* 2 * Copyright (c) 2019 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** @file 8 * @brief Private functions for native posix canbus driver. 9 */ 10 11 #ifndef ZEPHYR_DRIVERS_CAN_NATIVE_POSIX_LINUX_SOCKETCAN_H_ 12 #define ZEPHYR_DRIVERS_CAN_NATIVE_POSIX_LINUX_SOCKETCAN_H_ 13 14 int linux_socketcan_iface_open(const char *if_name); 15 16 int linux_socketcan_iface_close(int fd); 17 18 int linux_socketcan_poll_data(int fd); 19 20 ssize_t linux_socketcan_read_data(int fd, void *buf, size_t buf_len, bool *msg_confirm); 21 22 ssize_t linux_socketcan_write_data(int fd, void *buf, size_t buf_len); 23 24 int linux_socketcan_setsockopt(int fd, int level, int optname, const void *optval, 25 socklen_t optlen); 26 27 int linux_socketcan_getsockopt(int fd, int level, int optname, void *optval, 28 socklen_t *optlen); 29 30 int linux_socketcan_set_mode_fd(int fd, bool mode_fd); 31 32 #endif /* ZEPHYR_DRIVERS_CAN_NATIVE_POSIX_LINUX_SOCKETCAN_H_ */ 33