SCCS-vsn: sys/tahoe/include/param.h 1.5
SCCS-vsn: sys/vax/include/param.h 7.3
SCCS-vsn: sys/netinet/in.h 7.2
SCCS-vsn: sys/netns/ns.h 7.2
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)in.h 7.1 (Berkeley) %G%
+ * @(#)in.h 7.2 (Berkeley) %G%
#define INADDR_ANY (u_long)0x00000000
#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
#define INADDR_ANY (u_long)0x00000000
#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
+#ifndef KERNEL
+#define INADDR_NONE 0xffffffff /* -1 return */
+#endif
/*
* Socket address, internet style.
/*
* Socket address, internet style.
*/
#define IP_OPTIONS 1 /* set/get IP per-packet options */
*/
#define IP_OPTIONS 1 /* set/get IP per-packet options */
-#if !defined(vax) && !defined(ntohl) && !defined(lint)
-/*
- * Macros for number representation conversion.
- */
-#define ntohl(x) (x)
-#define ntohs(x) (x)
-#define htonl(x) (x)
-#define htons(x) (x)
-#endif
-
-#if !defined(ntohl) && (defined(vax) || defined(lint))
-u_short ntohs(), htons();
-u_long ntohl(), htonl();
-#endif
-
#ifdef KERNEL
extern struct domain inetdomain;
extern struct protosw inetsw[];
#ifdef KERNEL
extern struct domain inetdomain;
extern struct protosw inetsw[];
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ns.h 7.1 (Berkeley) %G%
+ * @(#)ns.h 7.2 (Berkeley) %G%
#define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \
((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0))
#define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \
((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0))
-#if !defined(vax) && !defined(ntohl) && !defined(lint)
-/*
- * Macros for number representation conversion.
- */
-#define ntohl(x) (x)
-#define ntohs(x) (x)
-#define htonl(x) (x)
-#define htons(x) (x)
-#endif
-
-#if !defined(ntohl) && (defined(vax) || defined(lint))
-u_short ntohs(), htons();
-u_long ntohl(), htonl();
-#endif
-
#ifdef KERNEL
extern struct domain nsdomain;
union ns_host ns_thishost;
#ifdef KERNEL
extern struct domain nsdomain;
union ns_host ns_thishost;
-/* param.h 1.4 86/11/03 */
+/* param.h 1.5 87/01/16 */
/*
* Machine dependent constants for TAHOE.
/*
* Machine dependent constants for TAHOE.
#define PDP 3412 /* LSB first in word, MSW first in long (pdp) */
#define ENDIAN BIG /* byte order on tahoe */
#define PDP 3412 /* LSB first in word, MSW first in long (pdp) */
#define ENDIAN BIG /* byte order on tahoe */
+/*
+ * Macros for network/external number representation conversion.
+ */
+#if ENDIAN == BIG && !defined(lint)
+#define ntohl(x) (x)
+#define ntohs(x) (x)
+#define htonl(x) (x)
+#define htons(x) (x)
+#else
+u_short ntohs(), htons();
+u_long ntohl(), htonl();
+#endif
+
#define NBPG 1024 /* bytes/page */
#define PGOFSET (NBPG-1) /* byte offset into page */
#define PGSHIFT 10 /* LOG2(NBPG) */
#define NBPG 1024 /* bytes/page */
#define PGOFSET (NBPG-1) /* byte offset into page */
#define PGSHIFT 10 /* LOG2(NBPG) */
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)param.h 7.2 (Berkeley) %G%
+ * @(#)param.h 7.3 (Berkeley) %G%
#define PDP 3412 /* LSB first in word, MSW first in long (pdp) */
#define ENDIAN LITTLE /* byte order on vax */
#define PDP 3412 /* LSB first in word, MSW first in long (pdp) */
#define ENDIAN LITTLE /* byte order on vax */
+/*
+ * Macros for network/external number representation conversion.
+ */
+#if ENDIAN == BIG && !defined(lint)
+#define ntohl(x) (x)
+#define ntohs(x) (x)
+#define htonl(x) (x)
+#define htons(x) (x)
+#else
+u_short ntohs(), htons();
+u_long ntohl(), htonl();
+#endif
+
#define NBPG 512 /* bytes/page */
#define PGOFSET (NBPG-1) /* byte offset into page */
#define PGSHIFT 9 /* LOG2(NBPG) */
#define NBPG 512 /* bytes/page */
#define PGOFSET (NBPG-1) /* byte offset into page */
#define PGSHIFT 9 /* LOG2(NBPG) */
#else KERNEL
#define DELAY(n) { register int N = (n); while (--N > 0); }
#endif KERNEL
#else KERNEL
#define DELAY(n) { register int N = (n); while (--N > 0); }
#endif KERNEL