1 /* arp.h */ 2 /* 3 Copyright (C) 1992 Ross Biro 4
5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2, or (at your option) 8 any later version. 9
10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14
15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18
19 The Author may be reached as bir7@leland.stanford.edu or 20 C/O Department of Mathematics; Stanford University; Stanford, CA 94305 21 */ 22 #ifndef_TCP_ARP_H 23 #define_TCP_ARP_H 24
25 structarp 26 { 27 unsignedshorthrd;
28 unsignedshortpro;
29 unsignedcharhlen;
30 unsignedcharplen;
31 unsignedshortop;
32 };
33
34
35 structarp_table 36 { 37 structarp_table *next;
38 unsignedlonglast_used;
39 unsignedlongip;
40 unsignedcharhlen;
41 unsignedcharhard[MAX_ADDR_LEN];
42 };
43
44
45
46 intarp_rcv(structsk_buff *, structdevice *, structpacket_type *);
47 voidarp_snd (unsignedlong, structdevice *, unsignedlong);
48 intarp_find (unsignedchar *, unsignedlong, structdevice *dev,
49 unsignedlong);
50 voidarp_add_broad (unsignedlong, structdevice *dev);
51 voidarp_destroy (unsignedlong);
52 voidarp_add (unsignedlongaddr, unsignedchar *haddr, structdevice *dev);
53 voidarp_queue (structsk_buff *skb);
54
55 #defineARP_TABLE_SIZE 16
56 #defineARP_IP_PROTETHERTYPE_IP 57 #defineARP_REQUEST 1
58 #defineARP_REPLY 2
59 #defineARP_TIMEOUT 8640000 /* about 8 hours. */ 60 #defineARP_RES_TIME 250 /* 2.5 seconds. */ 61 #endif