2 * Copyright (C) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
3 * Helsinki University of Technology, Finland.
5 * Copyright (C) 2005 Neil Cafferkey
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
31 #include <net/if_arp.h>
35 * Address Resolution Protocol.
37 * See RFC 826 for protocol description. Structure below is adapted
38 * to resolving addresses. Field names used correspond to
42 struct arphdr s2a_hdr
; /* fixed-size header */
44 u_char sha_dum
[MAXADDRARP
]; /* space for sender hardware address */
45 u_char spa_dum
[MAXADDRARP
]; /* space for sender protocol address */
46 u_char tha_dum
[MAXADDRARP
]; /* space for target hardware address */
47 u_char tpa_dum
[MAXADDRARP
]; /* space for target protocol address */
50 #define arp_hrd s2a_hdr.ar_hrd
51 #define arp_pro s2a_hdr.ar_pro
52 #define arp_hln s2a_hdr.ar_hln
53 #define arp_pln s2a_hdr.ar_pln
54 #define arp_op s2a_hdr.ar_op
56 #define ARPTAB_HSIZE 11 /* hash table size */
57 #define ARPENTRIES 11*15 /* normal amount of ARP entries to allocate */
58 #define ARPENTRIES_MIN 11 /* minimum # of ARP entries to allocate */
63 #define ARPT_AGE (60*1) /* aging timer, 1 min. */
64 #define ARPT_KILLC 20 /* kill completed entry in 20 mins. */
65 #define ARPT_KILLI 3 /* kill incomplete entry in 3 minutes */
68 void alloc_arptable(struct sana_softc
* ssc
, int to_allocate
);
70 int arpresolve(register struct sana_softc
*ssc
, struct mbuf
* m
,
71 register struct in_addr
*destip
, register u_char
* desten
,
73 void arpinput(struct sana_softc
*ssc
, struct mbuf
*m
, caddr_t srcaddr
);
74 int arpioctl(int cmd
, caddr_t data
);
77 #endif /* !IF_ARPSANA_H */