1 |
/*********************************************************************
|
2 |
*
|
3 |
* ARP Module Defs for Microchip TCP/IP Stack
|
4 |
*
|
5 |
*********************************************************************
|
6 |
* FileName: ARP.h
|
7 |
* Dependencies: Stacktsk.h
|
8 |
* MAC.h
|
9 |
* Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F
|
10 |
* Complier: Microchip C18 v3.02 or higher
|
11 |
* Microchip C30 v2.01 or higher
|
12 |
* Company: Microchip Technology, Inc.
|
13 |
*
|
14 |
* Software License Agreement
|
15 |
*
|
16 |
* Copyright © 2002-2007 Microchip Technology Inc. All rights
|
17 |
* reserved.
|
18 |
*
|
19 |
* Microchip licenses to you the right to use, modify, copy, and
|
20 |
* distribute:
|
21 |
* (i) the Software when embedded on a Microchip microcontroller or
|
22 |
* digital signal controller product (“Device”) which is
|
23 |
* integrated into Licensee’s product; or
|
24 |
* (ii) ONLY the Software driver source files ENC28J60.c and
|
25 |
* ENC28J60.h ported to a non-Microchip device used in
|
26 |
* conjunction with a Microchip ethernet controller for the
|
27 |
* sole purpose of interfacing with the ethernet controller.
|
28 |
*
|
29 |
* You should refer to the license agreement accompanying this
|
30 |
* Software for additional information regarding your rights and
|
31 |
* obligations.
|
32 |
*
|
33 |
* THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT
|
34 |
* WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
|
35 |
* LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
36 |
* PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
37 |
* MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
|
38 |
* CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
|
39 |
* PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
|
40 |
* BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
|
41 |
* THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER
|
42 |
* SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
|
43 |
* (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE.
|
44 |
*
|
45 |
*
|
46 |
* Author Date Comment
|
47 |
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
48 |
* Nilesh Rajbharti 5/1/01 Original (Rev 1.0)
|
49 |
* Nilesh Rajbharti 2/9/02 Cleanup
|
50 |
* Nilesh Rajbharti 5/22/02 Rev 2.0 (See version.log for detail)
|
51 |
* Howard Schlunder 8/17/06 Combined ARP.h and ARPTsk.h into ARP.h
|
52 |
********************************************************************/
|
53 |
#ifndef __ARP_H
|
54 |
#define __ARP_H
|
55 |
|
56 |
/*********************************************************************
|
57 |
* Function: void ARPInit(void)
|
58 |
*
|
59 |
* PreCondition: None
|
60 |
*
|
61 |
* Input: None
|
62 |
*
|
63 |
* Output: ARP Cache is initialized.
|
64 |
*
|
65 |
* Side Effects: None
|
66 |
*
|
67 |
* Overview: None
|
68 |
*
|
69 |
* Note: None
|
70 |
********************************************************************/
|
71 |
#ifdef STACK_CLIENT_MODE
|
72 |
void ARPInit(void);
|
73 |
#else
|
74 |
#define ARPInit()
|
75 |
#endif
|
76 |
|
77 |
|
78 |
/*********************************************************************
|
79 |
* Function: BOOL ARPProcess(void)
|
80 |
*
|
81 |
* PreCondition: ARP packet is ready in MAC buffer.
|
82 |
*
|
83 |
* Input: None
|
84 |
*
|
85 |
* Output: ARP FSM is executed.
|
86 |
*
|
87 |
* Side Effects: None
|
88 |
*
|
89 |
* Overview: None
|
90 |
*
|
91 |
* Note: None
|
92 |
********************************************************************/
|
93 |
BOOL ARPProcess(void);
|
94 |
|
95 |
|
96 |
/*********************************************************************
|
97 |
* Function: void ARPResolve(IP_ADDR* IPAddr)
|
98 |
*
|
99 |
* PreCondition: None
|
100 |
*
|
101 |
* Input: IPAddr - IP Address to be resolved.
|
102 |
*
|
103 |
* Output: None
|
104 |
*
|
105 |
* Side Effects: None
|
106 |
*
|
107 |
* Overview: An ARP request is sent.
|
108 |
*
|
109 |
* Note:
|
110 |
********************************************************************/
|
111 |
void ARPResolve(IP_ADDR *IPAddr);
|
112 |
|
113 |
|
114 |
/*********************************************************************
|
115 |
* Function: BOOL ARPIsResolved(IP_ADDR* IPAddr,
|
116 |
* MAC_ADDR *MACAddr)
|
117 |
*
|
118 |
* PreCondition: None
|
119 |
*
|
120 |
* Input: IPAddr - IPAddress to be resolved.
|
121 |
* MACAddr - Buffer to hold corresponding
|
122 |
* MAC Address.
|
123 |
*
|
124 |
* Output: TRUE if given IP Address has been resolved.
|
125 |
* FALSE otherwise.
|
126 |
*
|
127 |
* Side Effects: None
|
128 |
*
|
129 |
* Overview: None
|
130 |
*
|
131 |
* Note: This function is available only when
|
132 |
* STACK_CLIENT_MODE is defined.
|
133 |
********************************************************************/
|
134 |
BOOL ARPIsResolved(IP_ADDR *IPAddr, MAC_ADDR *MACAddr);
|
135 |
|
136 |
#endif
|
137 |
|
138 |
|