Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / common / include / net / if_arp.h
blobf39ba881b12df152a8c0af2e2b3b576ef2130069
1 /*
2 * Copyright (C) 1993,1994 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 Library General Public License
9 * version 2 as 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 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this file; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19 * MA 02111-1307, USA.
23 #ifndef NET_IF_ARP_H
24 #define NET_IF_ARP_H
27 * Address Resolution Protocol.
29 * See RFC 826 for protocol description. ARP packets are variable
30 * in size; the arphdr structure defines the fixed-length portion.
31 * Protocol type values are the same as those for 10 Mb/s Ethernet.
32 * It is followed by the variable-sized fields ar_sha, arp_spa,
33 * arp_tha and arp_tpa in that order, according to the lengths
34 * specified. Field names used correspond to RFC 826.
36 struct arphdr {
37 u_short ar_hrd; /* format of hardware address */
38 #define ARPHRD_ETHER 1 /* ethernet hardware address */
39 #define ARPHRD_ARCNET 7 /* ARCNET hardware address */
40 u_short ar_pro; /* format of protocol address */
41 u_char ar_hln; /* length of hardware address */
42 u_char ar_pln; /* length of protocol address */
43 u_short ar_op; /* one of: */
44 #define ARPOP_REQUEST 1 /* request to resolve address */
45 #define ARPOP_REPLY 2 /* response to previous request */
47 * The remaining fields are variable in size,
48 * according to the sizes above.
50 /* u_char ar_sha[]; \* sender hardware address */
51 /* u_char ar_spa[]; \* sender protocol address */
52 /* u_char ar_tha[]; \* target hardware address */
53 /* u_char ar_tpa[]; \* target protocol address */
56 #define MAXADDRARP 16 /* Maximum number of octets in hw address */
59 * ARP ioctl request.
61 struct arpreq {
62 struct sockaddr arp_pa; /* protocol address */
63 struct { /* hardware address */
64 u_char sa_len;
65 u_char sa_family;
66 char sa_data[MAXADDRARP];
67 } arp_ha;
68 int arp_flags; /* flags */
71 /* arp_flags and at_flags field values */
72 #define ATF_INUSE 0x01 /* entry in use */
73 #define ATF_COM 0x02 /* completed entry (enaddr valid) */
74 #define ATF_PERM 0x04 /* permanent entry */
75 #define ATF_PUBL 0x08 /* publish entry (respond for other host) */
76 #define ATF_USETRAILERS 0x10 /* has requested trailers */
78 /*
79 * An AmiTCP/IP specific ARP table ioctl request
81 struct arptabreq {
82 struct arpreq atr_arpreq; /* We want to identify the interface */
83 long atr_size; /* # of elements in art_table */
84 long atr_inuse; /* # of elements in use */
85 struct arpreq *atr_table;
89 * Copyright (c) 1986 Regents of the University of California.
90 * All rights reserved.
92 * Redistribution and use in source and binary forms, with or without
93 * modification, are permitted provided that the following conditions
94 * are met:
95 * 1. Redistributions of source code must retain the above copyright
96 * notice, this list of conditions and the following disclaimer.
97 * 2. Redistributions in binary form must reproduce the above copyright
98 * notice, this list of conditions and the following disclaimer in the
99 * documentation and/or other materials provided with the distribution.
100 * 3. All advertising materials mentioning features or use of this software
101 * must display the following acknowledgement:
102 * This product includes software developed by the University of
103 * California, Berkeley and its contributors.
104 * 4. Neither the name of the University nor the names of its contributors
105 * may be used to endorse or promote products derived from this software
106 * without specific prior written permission.
108 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
109 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
110 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
111 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
112 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
113 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
114 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
115 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
116 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
117 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
118 * SUCH DAMAGE.
120 * @(#)if_arp.h 7.4 (Berkeley) 6/28/90
122 #endif /* NET_IF_ARP_H */