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.28 24/12/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 /* 30 * This structure defines the ARP mapping cache. 31 */ 32
33 structarp_table 34 { 35 structarp_table *next;
36 volatileunsignedlonglast_used;
37 unsignedintflags;
38 unsignedlongip;
39 unsignedcharha[MAX_ADDR_LEN];
40 unsignedcharhlen;
41 unsignedcharhtype;
42 };
43
44
45 /* 46 * This is also used in "sock.c" and "tcp.c" - YUCK! - FvK 47 */ 48
49 externstructsk_buff *arp_q;
50
51
52 externvoidarp_destroy(unsignedlongpaddr);
53 externvoidarp_destroy_maybe(unsignedlongpaddr);
54 externintarp_rcv(structsk_buff *skb, structdevice *dev,
55 structpacket_type *pt);
56 externintarp_find(unsignedchar *haddr, unsignedlongpaddr,
57 structdevice *dev, unsignedlongsaddr);
58 externvoidarp_add(unsignedlongaddr, unsignedchar *haddr,
59 structdevice *dev);
60 externvoidarp_add_broad(unsignedlongaddr, structdevice *dev);
61 externvoidarp_queue(structsk_buff *skb);
62 externintarp_get_info(char *buffer);
63 externintarp_ioctl(unsignedintcmd, void *arg);
64
65 #endif/* _ARP_H */