mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-06 21:02:56 +00:00
Replace the existing Apache 2.0 boilerplate header with an SPDX tag throughout the zephyr code tree. This patch was generated via a script run over the master branch. Also updated doc/porting/application.rst that had a dependency on line numbers in a literal include. Manually updated subsys/logging/sys_log.c that had a malformed header in the original file. Also cleanup several cases that already had a SPDX tag and we either got a duplicate or missed updating. Jira: ZEP-1457 Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c Signed-off-by: David B. Kinder <david.b.kinder@intel.com> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
51 lines
995 B
C
51 lines
995 B
C
/** @file
|
|
@brief ARP handler
|
|
|
|
This is not to be included by the application.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2016 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef __ARP_H
|
|
#define __ARP_H
|
|
|
|
#if defined(CONFIG_NET_ARP)
|
|
|
|
#include <net/ethernet.h>
|
|
|
|
#define NET_ARP_BUF(buf) ((struct net_arp_hdr *)net_nbuf_ip_data(buf))
|
|
|
|
struct net_arp_hdr {
|
|
uint16_t hwtype; /* HTYPE */
|
|
uint16_t protocol; /* PTYPE */
|
|
uint8_t hwlen; /* HLEN */
|
|
uint8_t protolen; /* PLEN */
|
|
uint16_t opcode;
|
|
struct net_eth_addr src_hwaddr; /* SHA */
|
|
struct in_addr src_ipaddr; /* SPA */
|
|
struct net_eth_addr dst_hwaddr; /* THA */
|
|
struct in_addr dst_ipaddr; /* TPA */
|
|
} __packed;
|
|
|
|
#define NET_ARP_HTYPE_ETH 1
|
|
|
|
#define NET_ARP_REQUEST 1
|
|
#define NET_ARP_REPLY 2
|
|
|
|
struct net_buf *net_arp_prepare(struct net_buf *buf);
|
|
enum net_verdict net_arp_input(struct net_buf *buf);
|
|
|
|
void net_arp_init(void);
|
|
|
|
#else /* CONFIG_NET_ARP */
|
|
|
|
#define net_arp_init(...)
|
|
|
|
#endif /* CONFIG_NET_ARP */
|
|
|
|
#endif /* __ARP_H */
|