Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * Massimiliano Giorgi <massy@gandalf.sssup.it> |
||
11 | * Luca Abeni <luca@gandalf.sssup.it> |
||
12 | * (see the web pages for full authors list) |
||
13 | * |
||
14 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
15 | * |
||
16 | * http://www.sssup.it |
||
17 | * http://retis.sssup.it |
||
18 | * http://shark.sssup.it |
||
19 | */ |
||
20 | |||
21 | /** |
||
22 | ------------ |
||
23 | CVS : $Id: arp.h,v 1.1.1.1 2002-03-29 14:12:50 pj Exp $ |
||
24 | |||
25 | File: $File$ |
||
26 | Revision: $Revision: 1.1.1.1 $ |
||
27 | Last update: $Date: 2002-03-29 14:12:50 $ |
||
28 | ------------ |
||
29 | **/ |
||
30 | |||
31 | /* |
||
32 | * Copyright (C) 2000 Luca Abeni |
||
33 | * |
||
34 | * This program is free software; you can redistribute it and/or modify |
||
35 | * it under the terms of the GNU General Public License as published by |
||
36 | * the Free Software Foundation; either version 2 of the License, or |
||
37 | * (at your option) any later version. |
||
38 | * |
||
39 | * This program is distributed in the hope that it will be useful, |
||
40 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
41 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
42 | * GNU General Public License for more details. |
||
43 | * |
||
44 | * You should have received a copy of the GNU General Public License |
||
45 | * along with this program; if not, write to the Free Software |
||
46 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
47 | * |
||
48 | */ |
||
49 | |||
50 | |||
51 | |||
52 | /* Author: Luca Abeni */ |
||
53 | /* Date: 4/12/1997 */ |
||
54 | |||
55 | /* File: ARP.H */ |
||
56 | /* Revision: 2.0 */ |
||
57 | |||
58 | #ifndef __ARP_H__ |
||
59 | #define __ARP_H__ |
||
60 | |||
61 | #ifdef __cplusplus |
||
62 | extern "C" { |
||
63 | #endif |
||
64 | |||
65 | #define ARP_IP_TYPE 0x0800 |
||
66 | #define ARP_ETH_TYPE 1 |
||
67 | |||
68 | #define ARP_REQUEST 1 |
||
69 | #define ARP_REPLY 2 |
||
70 | |||
71 | #define ARP_MAX_ENTRIES 50 |
||
72 | #define ARP_MAX_USED 99 |
||
73 | |||
74 | //#define ARP_ERROR_BASE (ETH_ERROR_BASE + 10) |
||
75 | //#define ARP_TABLE_FULL (ARP_ERROR_BASE + 0) |
||
76 | |||
77 | |||
78 | typedef struct arp_table{ |
||
79 | IP_ADDR ip; |
||
80 | struct eth_addr eth; |
||
81 | int used; |
||
82 | int time; |
||
83 | int ntrans; |
||
84 | void *pkt; |
||
85 | BYTE valid; |
||
86 | } ARP_TABLE; |
||
87 | |||
88 | void arp_send(void *pkt, IP_ADDR dest, int len); |
||
89 | void arp_init(char *localAddr); |
||
90 | int arp_req(IP_ADDR dest); |
||
91 | void arp_sendRequest(int i); |
||
92 | |||
93 | #ifdef __cplusplus |
||
94 | }; |
||
95 | #endif |
||
96 | |||
97 | #endif |