1 /** @file 2 * @brief Packet 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 __PACKET_SOCKET_H 14 #define __PACKET_SOCKET_H 15 16 #include <zephyr/types.h> 17 18 /** 19 * @brief Called by net_core.c when a network 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. If corresponding IP protocol support is 26 * disabled, the function will always return NET_DROP. 27 */ 28 #if defined(CONFIG_NET_SOCKETS_PACKET) 29 enum net_verdict net_packet_socket_input(struct net_pkt *pkt, uint8_t proto); 30 #else net_packet_socket_input(struct net_pkt * pkt,uint8_t proto)31static inline enum net_verdict net_packet_socket_input(struct net_pkt *pkt, 32 uint8_t proto) 33 { 34 return NET_CONTINUE; 35 } 36 #endif 37 38 #endif /* __PACKET_SOCKET_H */ 39