posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
if_arp.h
Go to the documentation of this file.
1/*
2 * Copyright The Zephyr Project Contributors
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
19#ifndef ZEPHYR_INCLUDE_POSIX_NET_IF_ARP_H_
20#define ZEPHYR_INCLUDE_POSIX_NET_IF_ARP_H_
21
22#include <stdint.h>
23
24#include <zephyr/net/net_ip.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/* ARP protocol opcodes. */
31#ifndef ARPOP_REQUEST
32#define ARPOP_REQUEST 1
33#endif
34#ifndef ARPOP_REPLY
35#define ARPOP_REPLY 2
36#endif
37#ifndef ARPOP_RREQUEST
38#define ARPOP_RREQUEST 3
39#endif
40#ifndef ARPOP_RREPLY
41#define ARPOP_RREPLY 4
42#endif
43#ifndef ARPOP_InREQUEST
44#define ARPOP_InREQUEST 8
45#endif
46#ifndef ARPOP_InREPLY
47#define ARPOP_InREPLY 9
48#endif
49#ifndef ARPOP_NAK
50#define ARPOP_NAK 10
51#endif
52
53/* ARP protocol hardware identifiers. */
54#ifndef ARPHRD_ETHER
55#define ARPHRD_ETHER NET_ARPHRD_ETHER
56#endif
57#ifndef ARPHRD_IEEE802
58#define ARPHRD_IEEE802 6
59#endif
60#ifndef ARPHRD_ARCNET
61#define ARPHRD_ARCNET 7
62#endif
63#ifndef ARPHRD_IEEE1394
64#define ARPHRD_IEEE1394 24
65#endif
66#ifndef ARPHRD_EUI64
67#define ARPHRD_EUI64 27
68#endif
69#ifndef ARPHRD_INFINIBAND
70#define ARPHRD_INFINIBAND 32
71#endif
72#ifndef ARPHRD_CAN
73#define ARPHRD_CAN 280
74#endif
75#ifndef ARPHRD_IEEE802154
76#define ARPHRD_IEEE802154 804
77#endif
78#ifndef ARPHRD_PPP
79#define ARPHRD_PPP NET_ARPHRD_PPP
80#endif
81#ifndef ARPHRD_LOOPBACK
82#define ARPHRD_LOOPBACK 772
83#endif
84
86struct arphdr {
87 uint16_t ar_hrd;
88 uint16_t ar_pro;
89 uint8_t ar_hln;
90 uint8_t ar_pln;
91 uint16_t ar_op;
92};
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* ZEPHYR_INCLUDE_POSIX_NET_IF_ARP_H_ */
ARP packet header (RFC 826).
Definition if_arp.h:86
uint8_t ar_hln
Length of hardware address.
Definition if_arp.h:89
uint16_t ar_op
ARP opcode (command).
Definition if_arp.h:91
uint16_t ar_pro
Format of protocol address.
Definition if_arp.h:88
uint8_t ar_pln
Length of protocol address.
Definition if_arp.h:90
uint16_t ar_hrd
Format of hardware address.
Definition if_arp.h:87