summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-06-26 18:37:40 +0000
committerTed Lemon <source@isc.org>2001-06-26 18:37:40 +0000
commit59e0013b1664bd86e30c278665594df092f24903 (patch)
treece40e03b3da0a07ac646dd09cf8788caa768ef17
parenta6fb33071deccec1816265bf5fdf9fad01b6cd09 (diff)
downloadisc-dhcp-59e0013b1664bd86e30c278665594df092f24903.tar.gz
Add preliminary QNX RTP support.
-rw-r--r--Makefile.conf20
-rwxr-xr-xconfigure9
-rw-r--r--includes/cf/qnx.h70
3 files changed, 92 insertions, 7 deletions
diff --git a/Makefile.conf b/Makefile.conf
index 6d5f8325..a8c64ac6 100644
--- a/Makefile.conf
+++ b/Makefile.conf
@@ -411,6 +411,26 @@ MINORVERSION=MinorVersion
#CLIENTBINDIR = /etc
##--qnx--
+
+## QNX RTP (v6, NTO)
+##--qnxnto--
+#CF = cf/qnx.h
+#ADMMANDIR = /opt/man/man8
+#ADMMANEXT = .8
+#FFMANDIR = /opt/man/man5
+#FFMANEXT = .5
+#LIBMANDIR = /opt/man/man3
+#LIBMANEXT = .3
+#MANCAT = man
+#COPTS=-w3 -Dlint $(BINDDEF)
+#LFLAGS=-l socket
+#MANINSTALL = /bin/cp
+#INSTALL = /bin/cp
+#BINDIR = /opt/sbin
+#USERBINDIR= /opt/bin
+#CLIENTBINDIR = /opt/sbin
+##--qnxnto--
+
## CygWin32
##--cygwin32--
#CF = cf/cygwin32.h
diff --git a/configure b/configure
index 72901a0b..3f504beb 100755
--- a/configure
+++ b/configure
@@ -157,7 +157,14 @@ if [ "$sysname" = "" ]; then
sysname_print=hpux
fi;;
QNX)
- sysname=qnx;;
+ release=`uname -r`
+ major=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
+ case $major in
+ 6)
+ sysname=qnxnto;;
+ *)
+ sysname=qnx;;
+ esac;;
NEXTSTEP)
sysname=nextstep;;
UnixWare)
diff --git a/includes/cf/qnx.h b/includes/cf/qnx.h
index f49e9229..17a54995 100644
--- a/includes/cf/qnx.h
+++ b/includes/cf/qnx.h
@@ -54,11 +54,17 @@
#include <sys/wait.h>
#include <signal.h>
+#ifdef __QNXNTO__
+#include <sys/param.h>
+#endif
+
#include <netdb.h>
extern int h_errno;
#include <net/if.h>
-#define INADDR_LOOPBACK ((u_long)0x7f000001)
+#ifndef __QNXNTO__
+# define INADDR_LOOPBACK ((u_long)0x7f000001)
+#endif
/* Varargs stuff... */
#include <stdarg.h>
@@ -88,23 +94,36 @@ extern int h_errno;
#define ADD_TIME(d, s1, s2) (*(d) = *(s1) + *(s2))
#define SET_MAX_TIME(x) (*(x) = INT_MAX)
+#ifndef __QNXNTO__
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned long u_int32_t;
typedef signed short int16_t;
typedef signed long int32_t;
+#endif
+
+#ifdef __QNXNTO__
+typedef int socklen_t;
+#endif
#define strcasecmp( s1, s2 ) stricmp( s1, s2 )
#define strncasecmp( s1, s2, n ) strnicmp( s1, s2, n )
-#define vsnprintf( buf, size, fmt, list ) vsprintf( buf, fbuf, list )
#define random() rand()
#define HAVE_SA_LEN
#define BROKEN_TM_GMT
#define USE_SOCKETS
-#define NO_SNPRINTF
#undef AF_LINK
+#ifndef __QNXNTO__
+# define NO_SNPRINTF
+# define vsnprintf( buf, size, fmt, list ) vsprintf( buf, fbuf, list )
+#endif
+
+#ifdef __QNXNTO__
+# define GET_HOST_ID_MISSING
+#endif
+
/*
NOTE: to get the routing of the 255.255.255.255 broadcasts to work
under QNX, you need to issue the following command before starting
@@ -116,9 +135,48 @@ typedef signed long int32_t;
machine that dhcpd is running on.
*/
-#if defined (NSUPDATE)
-#error NSUPDATE is not supported on QNX at this time!!
+#ifndef __QNXNTO__
+# if defined (NSUPDATE)
+# error NSUPDATE is not supported on QNX at this time!!
+# endif
#endif
+
+
#ifdef NEED_PRAND_CONF
-UHOH... (this isn't present in the BIND distribution either)
+#ifndef HAVE_DEV_RANDOM
+/* You should find and install the /dev/random driver */
+ # define HAVE_DEV_RANDOM 1
+ #endif /* HAVE_DEV_RANDOM */
+
+const char *cmds[] = {
+ "/bin/ps -a 2>&1",
+ "/bin/sin 2>&1",
+ "/sbin/arp -an 2>&1",
+ "/bin/netstat -an 2>&1",
+ "/bin/df 2>&1",
+ "/bin/sin fds 2>&1",
+ "/bin/netstat -s 2>&1",
+ "/bin/sin memory 2>&1",
+ NULL
+};
+
+const char *dirs[] = {
+ "/tmp",
+ ".",
+ "/",
+ "/var/spool",
+ "/dev",
+ "/var/spool/mail",
+ "/home",
+ NULL
+};
+
+const char *files[] = {
+ "/proc/ipstats",
+ "/proc/dumper",
+ "/proc/self/as",
+ "/var/log/messages",
+ NULL
+};
#endif /* NEED_PRAND_CONF */
+