]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/include/net/if_arp.h
WASI libc prototype implementation.
[wasi-libc.git] / libc-top-half / musl / include / net / if_arp.h
1 /* Nonstandard header */
2 #ifndef _NET_IF_ARP_H
3 #define _NET_IF_ARP_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <inttypes.h>
9 #include <sys/types.h>
10 #include <sys/socket.h>
11
12 #define MAX_ADDR_LEN 7
13
14 #define ARPOP_REQUEST 1
15 #define ARPOP_REPLY 2
16 #define ARPOP_RREQUEST 3
17 #define ARPOP_RREPLY 4
18 #define ARPOP_InREQUEST 8
19 #define ARPOP_InREPLY 9
20 #define ARPOP_NAK 10
21
22 struct arphdr {
23 uint16_t ar_hrd;
24 uint16_t ar_pro;
25 uint8_t ar_hln;
26 uint8_t ar_pln;
27 uint16_t ar_op;
28 };
29
30
31 #define ARPHRD_NETROM 0
32 #define ARPHRD_ETHER 1
33 #define ARPHRD_EETHER 2
34 #define ARPHRD_AX25 3
35 #define ARPHRD_PRONET 4
36 #define ARPHRD_CHAOS 5
37 #define ARPHRD_IEEE802 6
38 #define ARPHRD_ARCNET 7
39 #define ARPHRD_APPLETLK 8
40 #define ARPHRD_DLCI 15
41 #define ARPHRD_ATM 19
42 #define ARPHRD_METRICOM 23
43 #define ARPHRD_IEEE1394 24
44 #define ARPHRD_EUI64 27
45 #define ARPHRD_INFINIBAND 32
46 #define ARPHRD_SLIP 256
47 #define ARPHRD_CSLIP 257
48 #define ARPHRD_SLIP6 258
49 #define ARPHRD_CSLIP6 259
50 #define ARPHRD_RSRVD 260
51 #define ARPHRD_ADAPT 264
52 #define ARPHRD_ROSE 270
53 #define ARPHRD_X25 271
54 #define ARPHRD_HWX25 272
55 #define ARPHRD_CAN 280
56 #define ARPHRD_PPP 512
57 #define ARPHRD_CISCO 513
58 #define ARPHRD_HDLC ARPHRD_CISCO
59 #define ARPHRD_LAPB 516
60 #define ARPHRD_DDCMP 517
61 #define ARPHRD_RAWHDLC 518
62 #define ARPHRD_RAWIP 519
63
64 #define ARPHRD_TUNNEL 768
65 #define ARPHRD_TUNNEL6 769
66 #define ARPHRD_FRAD 770
67 #define ARPHRD_SKIP 771
68 #define ARPHRD_LOOPBACK 772
69 #define ARPHRD_LOCALTLK 773
70 #define ARPHRD_FDDI 774
71 #define ARPHRD_BIF 775
72 #define ARPHRD_SIT 776
73 #define ARPHRD_IPDDP 777
74 #define ARPHRD_IPGRE 778
75 #define ARPHRD_PIMREG 779
76 #define ARPHRD_HIPPI 780
77 #define ARPHRD_ASH 781
78 #define ARPHRD_ECONET 782
79 #define ARPHRD_IRDA 783
80 #define ARPHRD_FCPP 784
81 #define ARPHRD_FCAL 785
82 #define ARPHRD_FCPL 786
83 #define ARPHRD_FCFABRIC 787
84 #define ARPHRD_IEEE802_TR 800
85 #define ARPHRD_IEEE80211 801
86 #define ARPHRD_IEEE80211_PRISM 802
87 #define ARPHRD_IEEE80211_RADIOTAP 803
88 #define ARPHRD_IEEE802154 804
89 #define ARPHRD_IEEE802154_MONITOR 805
90 #define ARPHRD_PHONET 820
91 #define ARPHRD_PHONET_PIPE 821
92 #define ARPHRD_CAIF 822
93 #define ARPHRD_IP6GRE 823
94 #define ARPHRD_NETLINK 824
95 #define ARPHRD_6LOWPAN 825
96 #define ARPHRD_VSOCKMON 826
97
98 #define ARPHRD_VOID 0xFFFF
99 #define ARPHRD_NONE 0xFFFE
100
101 struct arpreq {
102 struct sockaddr arp_pa;
103 struct sockaddr arp_ha;
104 int arp_flags;
105 struct sockaddr arp_netmask;
106 char arp_dev[16];
107 };
108
109 struct arpreq_old {
110 struct sockaddr arp_pa;
111 struct sockaddr arp_ha;
112 int arp_flags;
113 struct sockaddr arp_netmask;
114 };
115
116 #define ATF_COM 0x02
117 #define ATF_PERM 0x04
118 #define ATF_PUBL 0x08
119 #define ATF_USETRAILERS 0x10
120 #define ATF_NETMASK 0x20
121 #define ATF_DONTPUB 0x40
122 #define ATF_MAGIC 0x80
123
124 #define ARPD_UPDATE 0x01
125 #define ARPD_LOOKUP 0x02
126 #define ARPD_FLUSH 0x03
127
128 struct arpd_request {
129 unsigned short req;
130 uint32_t ip;
131 unsigned long dev;
132 unsigned long stamp;
133 unsigned long updated;
134 unsigned char ha[MAX_ADDR_LEN];
135 };
136
137
138
139 #ifdef __cplusplus
140 }
141 #endif
142 #endif