revert between 56095 -> 55830 in arch
[AROS.git] / workbench / network / stacks / AROSTCP / bsdsocket / net / sana2arp.h
blobf09cdd4fc6903018363517902b954dafaceb5f8e
1 /*
2 * Copyright (C) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
3 * Helsinki University of Technology, Finland.
4 * All rights reserved.
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,
19 * MA 02111-1307, USA.
23 #ifndef IF_ARPSANA_H
24 #define IF_ARPSANA_H
26 #ifndef IF_H
27 #include <net/if.h>
28 #endif
30 #ifndef IF_ARP_H
31 #include <net/if_arp.h>
32 #endif
35 * Address Resolution Protocol.
37 * See RFC 826 for protocol description. Structure below is adapted
38 * to resolving addresses. Field names used correspond to
39 * RFC 826.
41 struct s2_arppkt {
42 struct arphdr s2a_hdr; /* fixed-size header */
43 struct {
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 */
48 } arpdata;
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 */
61 * timer values
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 */
67 #ifdef KERNEL
68 void alloc_arptable(struct sana_softc* ssc, int to_allocate);
69 void arptimer(void);
70 int arpresolve(register struct sana_softc *ssc, struct mbuf * m,
71 register struct in_addr *destip, register u_char * desten,
72 int * error);
73 void arpinput(struct sana_softc *ssc, struct mbuf *m, caddr_t srcaddr);
74 int arpioctl(int cmd, caddr_t data);
75 #endif
77 #endif /* !IF_ARPSANA_H */