Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / stacks / AROSTCP / dhcp / includes / cf / aros.h
blobf6c10c79f67a2acca9968f27cac4d5cba87d9ef4
1 /* aros.h
3 System dependencies for AROS */
5 /*
6 * Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of The Internet Software Consortium nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
22 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
25 * THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
32 * OF THE POSSIBILITY OF SUCH DAMAGE.
34 * This software was written for the Internet Software Consortium by Ted Lemon
35 * under a contract with Vixie Laboratories.
38 #define PROTO_USERGROUP_H
40 #include <netdb.h>
41 #include <dos/dosextens.h>
42 #include <exec/ports.h>
43 #include <libraries/miami.h>
44 #include <proto/bsdsocket.h>
45 #include <utility/hooks.h>
46 #include <utility/tagitem.h>
47 #include <errno.h>
48 #include <limits.h>
49 #include <setjmp.h>
50 #include <signal.h>
51 #include <stdlib.h>
52 #include <string.h>
53 #include <syslog.h>
54 #include <sys/types.h>
55 #include <sys/wait.h>
56 #include <unistd.h>
58 #include <net/if.h>
59 #include <net/if_dl.h>
60 #include <net/route.h>
61 #include <proto/miami.h>
63 /* sys/ioctl.h is a stupid #warning here, sys/sockio must be used instead */
64 #include <sys/sockio.h>
65 #define _SYS_IOCTL_H_
67 /* Varargs stuff... */
68 #include <stdarg.h>
69 #define VA_DOTDOTDOT ...
70 #define va_dcl
71 #define VA_start(list, last) va_start (list, last)
73 #if __WORDSIZE == 64
74 #define PTRSIZE_64BIT
75 #endif
77 #define SOCKLEN_T LONG
78 #ifndef INADDR_LOOPBACK
79 #define INADDR_LOOPBACK 0x7f000001
80 #endif
82 #ifndef AROSTCP_DB
83 /* this is the default path, overridable with ENV:AROTCP/Config */
84 #define AROSTCP_DB "SYS:System/Network/AROSTCP/db/"
85 #endif
87 #ifndef AROSTCP_T
88 #define AROSTCP_T "T:"
89 #endif
91 #define _PATH_DHCPD_PID AROSTCP_T "dhcpd.pid"
92 #define _PATH_DHCPD_DB AROSTCP_DB "dhcpd.leases"
93 #define _PATH_DHCPD_CONF AROSTCP_DB "dhcpd.conf"
94 #define _PATH_DHCLIENT_PID AROSTCP_T "dhclient.pid"
95 #define _PATH_DHCLIENT_DB AROSTCP_DB "dhclient.leases"
96 #define _PATH_DHCLIENT_CONF AROSTCP_DB "dhclient.conf"
97 #define _PATH_RESOLV_CONF AROSTCP_DB "resolv.conf"
98 #define _PATH_DHCRELAY_PID AROSTCP_T "dhcrelay.pid"
100 #define EOL '\n'
101 #define VOIDPTR void *
103 /* Time stuff... */
104 #include <sys/time.h>
105 #define TIME time_t
107 //??AGR time and gettimeofday does not give the same result on AROS
108 //?? #define GET_TIME(x) time ((x))
109 #define GET_TIME(x) do { \
110 struct timeval xt1; \
111 gettimeofday(&xt1, NULL); \
112 *(x) = xt1.tv_sec; \
113 } while (0)
115 #define HAVE_SA_LEN
116 /* #define HAVE_CHKABORT ?? would be cool */
117 #define GET_USER_ID_MISSING
118 #define SET_SERVENT_MISSING
119 #define SET_PROTOENT_MISSING
120 #define FORK_MISSING
121 #define FSYNC_MISSING
122 #define SOCKET_IS_NOT_A_FILE
123 #define BUILTIN_IFCONFIG
124 #undef F_SETFD
126 #if defined (USE_DEFAULT_NETWORK)
127 # define USE_SOCKETS
128 #endif
130 #ifdef NEED_PRAND_CONF
132 const char *cmds[] = {
133 "arp -an",
134 // "/usr/bin/netstat -an 2>&1",
135 "info",
136 // "dig com. soa +ti=1 +retry=0 2>&1",
137 // "/usr/bin/netstat -an 2>&1",
138 // "dig . soa +ti=1 +retry=0 2>&1",
139 NULL
142 const char *dirs[] = {
143 "T:",
144 "SYS:T",
146 ":",
147 NULL
150 const char *files[] = {
151 "Net:Logs/Syslog",
152 NULL
154 #endif /* NEED_PRAND_CONF */