:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / drivers / net / tcpip / include / arp.h
1 /*
2  * COPYRIGHT:   See COPYING in the top level directory
3  * PROJECT:     ReactOS TCP/IP protocol driver
4  * FILE:        include/arp.h
5  * PURPOSE:     Address Resolution Protocol definitions
6  */
7 #ifndef __ARP_H
8 #define __ARP_H
9
10 typedef struct ARP_HEADER {
11     USHORT HWType;       /* Hardware Type */
12     USHORT ProtoType;    /* Protocol Type */
13     UCHAR  HWAddrLen;    /* Hardware Address Length */
14     UCHAR  ProtoAddrLen; /* Protocol Address Length */
15     USHORT Opcode;       /* Opcode */
16     /* Sender's Hardware Address */
17     /* Sender's Protocol Address */
18     /* Target's Hardware Address */
19     /* Target's Protocol Address */
20 } ARP_HEADER, *PARP_HEADER;
21
22 /* We swap constants so we can compare values at runtime without swapping them */
23 #define ARP_OPCODE_REQUEST WH2N(0x0001) /* ARP request */
24 #define ARP_OPCODE_REPLY   WH2N(0x0002) /* ARP reply */
25
26
27 BOOLEAN ARPTransmit(
28     PIP_ADDRESS Address,
29     PNET_TABLE_ENTRY NTE);
30
31 VOID ARPReceive(
32     PVOID Context,
33     PIP_PACKET Packet);
34
35 #endif /* __ARP_H */
36
37 /* EOF */