From: Ted Lemon Date: Wed, 5 Mar 1997 06:16:07 +0000 (+0000) Subject: Add UPF support X-Git-Tag: DHCP-970305~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f26c2dcbc13f2135243e9e7e1a2265a77e6a7f0;p=thirdparty%2Fdhcp.git Add UPF support --- diff --git a/includes/cf/ultrix.h b/includes/cf/ultrix.h index 36f53af42..1f1fbbcbb 100644 --- a/includes/cf/ultrix.h +++ b/includes/cf/ultrix.h @@ -98,6 +98,12 @@ extern int h_errno; #define TIME time_t #define GET_TIME(x) time ((x)) +/* Ultrix doesn't provide an endian.h, but it only runs on little-endian + machines, so we'll just hack around the issue. */ +#define BIG_ENDIAN 1 +#define LITTLE_ENDIAN 2 +#define BYTE_ORDER LITTLE_ENDIAN + #if defined (USE_DEFAULT_NETWORK) -# define USE_SOCKETS +# define USE_UPF #endif diff --git a/includes/osdep.h b/includes/osdep.h index 02af9dcd4..b2b23ed28 100644 --- a/includes/osdep.h +++ b/includes/osdep.h @@ -131,6 +131,11 @@ # define USE_NIT_RECEIVE #endif +#ifdef USE_UPF +# define USE_UPF_SEND +# define USE_UPF_RECEIVE +#endif + /* Porting:: If you add support for sending packets directly out an interface, @@ -139,7 +144,7 @@ Currently, all low-level packet interfaces use BSD sockets as a fallback. */ -#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) +#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || defined (USE_UPF_SEND) # define USE_SOCKET_FALLBACK # define USE_FALLBACK #endif @@ -150,7 +155,8 @@ and need to be able to assemble packets, add the USE_XXX_SEND definition for your interface to the list tested below. */ -#if defined (USE_RAW_SEND) || defined (USE_BPF_SEND) || defined (USE_NIT_SEND) +#if defined (USE_RAW_SEND) || defined (USE_BPF_SEND) || \ + defined (USE_NIT_SEND) || defined (USE_UPF_SEND) # define PACKET_ASSEMBLY #endif @@ -160,8 +166,8 @@ and need to be able to decode raw packets, add the USE_XXX_RECEIVE definition for your interface to the list tested below. */ -#if defined (USE_RAW_RECEIVE) || defined (USE_BPF_RECEIVE) \ - || defined (USE_NIT_RECEIVE) +#if defined (USE_RAW_RECEIVE) || defined (USE_BPF_SEND) || \ + defined (USE_NIT_RECEIVE) || defined (USE_UPF_SEND) # define PACKET_DECODING #endif