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
|
10 |
* Complier: MCC18 v1.00.50 or higher
|
11 |
* HITECH PICC-18 V8.10PL1 or higher
|
12 |
* Company: Microchip Technology, Inc.
|
13 |
*
|
14 |
* Software License Agreement
|
15 |
*
|
16 |
* The software supplied herewith by Microchip Technology Incorporated
|
17 |
* (the “Company”) for its PICmicro® Microcontroller is intended and
|
18 |
* supplied to you, the Company’s customer, for use solely and
|
19 |
* exclusively on Microchip PICmicro Microcontroller products. The
|
20 |
* software is owned by the Company and/or its supplier, and is
|
21 |
* protected under applicable copyright laws. All rights are reserved.
|
22 |
* Any use in violation of the foregoing restrictions may subject the
|
23 |
* user to criminal sanctions under applicable laws, as well as to
|
24 |
* civil liability for the breach of the terms and conditions of this
|
25 |
* license.
|
26 |
*
|
27 |
* THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
|
28 |
* WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
|
29 |
* TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
30 |
* PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
|
31 |
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
|
32 |
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
33 |
*
|
34 |
* Author Date Comment
|
35 |
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
36 |
* Nilesh Rajbharti 5/1/01 Original (Rev 1.0)
|
37 |
* Nilesh Rajbharti 2/9/02 Cleanup
|
38 |
* Nilesh Rajbharti 5/22/02 Rev 2.0 (See version.log for detail)
|
39 |
********************************************************************/
|
40 |
#ifndef ARP_H
|
41 |
#define ARP_H
|
42 |
|
43 |
#include "stacktsk.h"
|
44 |
#include "mac.h"
|
45 |
|
46 |
/*
|
47 |
* Following codes are must be used with ARPGet/Put functions.
|
48 |
*/
|
49 |
#define ARP_REPLY (0x00)
|
50 |
#define ARP_REQUEST (0x01)
|
51 |
#define ARP_UNKNOWN (0x02)
|
52 |
|
53 |
|
54 |
/*********************************************************************
|
55 |
* Function: BOOL ARPGet(NODE_INFO* remote, BYTE* opCode)
|
56 |
*
|
57 |
* PreCondition: ARP packet is ready in MAC buffer.
|
58 |
*
|
59 |
* Input: remote - Remote node info
|
60 |
* opCode - Buffer to hold ARP op code.
|
61 |
*
|
62 |
* Output: TRUE if a valid ARP packet was received.
|
63 |
* FALSE otherwise.
|
64 |
*
|
65 |
* Side Effects: None
|
66 |
*
|
67 |
* Overview: None
|
68 |
*
|
69 |
* Note: None
|
70 |
********************************************************************/
|
71 |
BOOL ARPGet(NODE_INFO *remote, BYTE *opCode);
|
72 |
|
73 |
|
74 |
/*********************************************************************
|
75 |
* Macro: ARPIsRxReady()
|
76 |
*
|
77 |
* PreCondition: None
|
78 |
*
|
79 |
* Input: None
|
80 |
*
|
81 |
* Output: TRUE if ARP receive buffer is full.
|
82 |
* FALSE otherwise.
|
83 |
*
|
84 |
* Side Effects: None
|
85 |
*
|
86 |
* Overview: None
|
87 |
*
|
88 |
* Note: None
|
89 |
********************************************************************/
|
90 |
#define ARPIsTxReady() MACIsTxReady()
|
91 |
|
92 |
|
93 |
|
94 |
/*********************************************************************
|
95 |
* Function: void ARPPut(NODE_INFO* more, BYTE opCode)
|
96 |
*
|
97 |
* PreCondition: MACIsTxReady() == TRUE
|
98 |
*
|
99 |
* Input: remote - Remote node info
|
100 |
* opCode - ARP op code to send
|
101 |
*
|
102 |
* Output: None
|
103 |
*
|
104 |
* Side Effects: None
|
105 |
*
|
106 |
* Overview: None
|
107 |
*
|
108 |
* Note: None
|
109 |
********************************************************************/
|
110 |
void ARPPut(NODE_INFO *remode, BYTE opCode);
|
111 |
|
112 |
#endif
|
113 |
|
114 |
|