1 /* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Definitions for the ARP protocol module. 7 * 8 * Version: @(#)arp.h 1.0.6 05/21/93 9 * 10 * Authors: Ross Biro, <bir7@leland.Stanford.Edu> 11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 12 * 13 * This program is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU General Public License 15 * as published by the Free Software Foundation; either version 16 * 2 of the License, or (at your option) any later version. 17 */ 18 #ifndef_ARP_H 19 #define_ARP_H 20
21 #defineARP_TABLE_SIZE 16 /* size of ARP table */ 22 #defineARP_TIMEOUT 30000 /* five minutes */ 23 #define ARP_RES_TIME 250 /* 2.5 seconds */ 24
25 #defineARP_MAX_TRIES 3 /* max # of tries to send ARP */ 26 #defineARP_QUEUE_MAGIC 0x0432447A /* magic # for queues */ 27
28
29 /* This structure defines the ARP mapping cache. */ 30 structarp_table{ 31 structarp_table *next;
32 volatileunsignedlonglast_used;
33 unsignedintflags;
34 #if 1
35 unsignedlongip;
36 #else 37 unsignedchar pa[MAX_ADDR_LEN];
38 unsignedchar plen;
39 unsignedcharptype;
40 #endif 41 unsignedcharha[MAX_ADDR_LEN];
42 unsignedcharhlen;
43 unsignedcharhtype;
44 };
45
46
47 /* This is also used in "sock.c" and "tcp.c" - YUCK! - FvK */ 48 externstructsk_buff *arp_q;
49
50
51 externvoidarp_destroy(unsignedlongpaddr);
52 externintarp_rcv(structsk_buff *skb, structdevice *dev,
53 structpacket_type *pt);
54 externintarp_find(unsignedchar *haddr, unsignedlongpaddr,
55 structdevice *dev, unsignedlongsaddr);
56 externvoidarp_add(unsignedlongaddr, unsignedchar *haddr,
57 structdevice *dev);
58 externvoidarp_add_broad(unsignedlongaddr, structdevice *dev);
59 externvoidarp_queue(structsk_buff *skb);
60 externintarp_get_info(char *buffer);
61 externintarp_ioctl(unsignedintcmd, void *arg);
62
63 #endif/* _ARP_H */