1 /** @file 2 * @brief CANBUS Socket related functions 3 * 4 * This is not to be included by the application. 5 */ 6 7 /* 8 * Copyright (c) 2019 Intel Corporation 9 * 10 * SPDX-License-Identifier: Apache-2.0 11 */ 12 13 #ifndef __CAN_SOCKET_H 14 #define __CAN_SOCKET_H 15 16 #include <zephyr/types.h> 17 18 /** 19 * @brief Called by net_core.c when a CANBUS packet is received. 20 * 21 * @param pkt Network packet 22 * 23 * @return NET_OK if the packet was consumed, NET_DROP if 24 * the packet parsing failed and the caller should handle 25 * the received packet. 26 */ 27 #if defined(CONFIG_NET_SOCKETS_CAN) 28 enum net_verdict net_canbus_socket_input(struct net_pkt *pkt); 29 #else net_canbus_socket_input(struct net_pkt * pkt)30static inline enum net_verdict net_canbus_socket_input(struct net_pkt *pkt) 31 { 32 return NET_CONTINUE; 33 } 34 #endif 35 36 #endif /* __CAN_SOCKET_H */ 37