htonl and friends.
-/* $OpenBSD: endian.h,v 1.3 1996/10/30 22:39:03 niklas Exp $ */
+/* $OpenBSD: endian.h,v 1.4 1997/04/04 03:05:28 millert Exp $ */
/* $NetBSD: endian.h,v 1.3 1996/10/13 19:57:59 cgd Exp $ */
/*
typedef u_int16_t in_port_t;
__BEGIN_DECLS
-in_addr_t htonl __P((in_addr_t));
-in_port_t htons __P((in_port_t));
-in_addr_t ntohl __P((in_addr_t));
-in_port_t ntohs __P((in_port_t));
+u_int32_t htonl __P((u_int32_t));
+u_int16_t htons __P((u_int16_t));
+u_int32_t ntohl __P((u_int32_t));
+u_int16_t ntohs __P((u_int16_t));
__END_DECLS
/*
#else
-#define NTOHL(x) (x) = ntohl((in_addr_t)x)
-#define NTOHS(x) (x) = ntohs((in_port_t)x)
-#define HTONL(x) (x) = htonl((in_addr_t)x)
-#define HTONS(x) (x) = htons((in_port_t)x)
+#define NTOHL(x) (x) = ntohl((u_int32_t)x)
+#define NTOHS(x) (x) = ntohs((u_int16_t)x)
+#define HTONL(x) (x) = htonl((u_int32_t)x)
+#define HTONS(x) (x) = htons((u_int16_t)x)
#endif
#endif /* !_POSIX_SOURCE */
#endif /* !_ENDIAN_H_ */
-/* $OpenBSD: endian.h,v 1.2 1996/11/25 13:11:16 niklas Exp $ */
+/* $OpenBSD: endian.h,v 1.3 1997/04/04 03:05:29 millert Exp $ */
/* $NetBSD: endian.h,v 1.4 1994/10/26 21:09:38 cgd Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
u_int32_t htonl __P((u_int32_t));
u_int16_t htons __P((u_int16_t));
-/* $OpenBSD: endian.h,v 1.2 1996/11/25 13:11:18 niklas Exp $ */
+/* $OpenBSD: endian.h,v 1.3 1997/04/04 03:05:30 millert Exp $ */
/* $NetBSD: endian.h,v 1.2 1996/03/14 23:11:10 mark Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
u_int32_t htonl __P((u_int32_t));
u_int16_t htons __P((u_int16_t));
-/* $OpenBSD: endian.h,v 1.5 1996/11/25 14:44:26 niklas Exp $ */
+/* $OpenBSD: endian.h,v 1.6 1997/04/04 03:05:31 millert Exp $ */
/* $NetBSD: endian.h,v 1.16 1995/06/01 17:19:18 mycroft Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
u_int32_t htonl __P((u_int32_t));
u_int16_t htons __P((u_int16_t));
-/* $OpenBSD: endian.h,v 1.5 1997/04/02 20:40:47 niklas Exp $ */
+/* $OpenBSD: endian.h,v 1.6 1997/04/04 03:05:31 millert Exp $ */
/* $NetBSD: endian.h,v 1.10 1996/10/13 02:59:55 christos Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
#if 0
/*
* SUCH DAMAGE.
*
* from: @(#)endian.h 8.1 (Berkeley) 6/11/93
- * $Id: endian.h,v 1.4 1997/03/03 20:20:58 rahnds Exp $
+ * $Id: endian.h,v 1.5 1997/04/04 03:05:32 millert Exp $
*/
#ifndef _ENDIAN_H_
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
-unsigned long htonl __P((unsigned long));
-unsigned short htons __P((unsigned short));
-unsigned long ntohl __P((unsigned long));
-unsigned short ntohs __P((unsigned short));
+u_int32_t htonl __P((u_int32_t));
+u_int16_t htons __P((u_int16_t));
+u_int32_t ntohl __P((u_int32_t));
+u_int16_t ntohs __P((u_int16_t));
__END_DECLS
/*
#else
-#define NTOHL(x) (x) = ntohl((u_long)x)
-#define NTOHS(x) (x) = ntohs((u_short)x)
-#define HTONL(x) (x) = htonl((u_long)x)
-#define HTONS(x) (x) = htons((u_short)x)
+#define NTOHL(x) (x) = ntohl((u_int32_t)x)
+#define NTOHS(x) (x) = ntohs((u_int16_t)x)
+#define HTONL(x) (x) = htonl((u_int32_t)x)
+#define HTONS(x) (x) = htons((u_int16_t)x)
#endif
#endif /* ! _POSIX_SOURCE */
#endif /* !_ENDIAN_H_ */
-/* $OpenBSD: endian.h,v 1.2 1996/11/25 13:11:31 niklas Exp $ */
+/* $OpenBSD: endian.h,v 1.3 1997/04/04 03:05:33 millert Exp $ */
/* $NetBSD: endian.h,v 1.8 1995/06/18 07:13:46 phil Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
u_int32_t htonl __P((u_int32_t));
u_int16_t htons __P((u_int16_t));
typedef u_int16_t in_port_t;
__BEGIN_DECLS
-in_addr_t htonl __P((in_addr_t));
-in_port_t htons __P((in_port_t));
-in_addr_t ntohl __P((in_addr_t));
-in_port_t ntohs __P((in_port_t));
+u_int32_t htonl __P((u_int32_t));
+u_int16_t htons __P((u_int16_t));
+u_int32_t ntohl __P((u_int32_t));
+u_int16_t ntohs __P((u_int16_t));
__END_DECLS
/*
#else
-#define NTOHL(x) (x) = ntohl((in_addr_t)x)
-#define NTOHS(x) (x) = ntohs((in_port_t)x)
-#define HTONL(x) (x) = htonl((in_addr_t)x)
-#define HTONS(x) (x) = htons((in_port_t)x)
+#define NTOHL(x) (x) = ntohl((u_int32_t)x)
+#define NTOHS(x) (x) = ntohs((u_int16_t)x)
+#define HTONL(x) (x) = htonl((u_int32_t)x)
+#define HTONS(x) (x) = htons((u_int16_t)x)
#endif
#endif /* ! _POSIX_SOURCE */
#endif /* !_ENDIAN_H_ */
-/* $OpenBSD: endian.h,v 1.3 1996/12/28 06:25:05 rahnds Exp $ */
+/* $OpenBSD: endian.h,v 1.4 1997/04/04 03:05:34 millert Exp $ */
/* $NetBSD: endian.h,v 1.2 1996/10/13 03:16:41 christos Exp $ */
/*-
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
u_int32_t htonl __P((u_int32_t));
u_int16_t htons __P((u_int16_t));
#else
-#define NTOHL(x) (x) = ntohl((in_addr_t)x)
-#define NTOHS(x) (x) = ntohs((in_port_t)x)
-#define HTONL(x) (x) = htonl((in_addr_t)x)
-#define HTONS(x) (x) = htons((in_port_t)x)
+#define NTOHL(x) (x) = ntohl((u_int32_t)x)
+#define NTOHS(x) (x) = ntohs((u_int16_t)x)
+#define HTONL(x) (x) = htonl((u_int32_t)x)
+#define HTONS(x) (x) = htons((u_int16_t)x)
#endif
#endif /* _POSIX_SOURCE */
-/* $OpenBSD: endian.h,v 1.3 1996/11/25 13:11:36 niklas Exp $ */
+/* $OpenBSD: endian.h,v 1.4 1997/04/04 03:05:35 millert Exp $ */
/* $NetBSD: endian.h,v 1.3 1996/02/13 17:04:58 christos Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
u_int32_t htonl __P((u_int32_t));
u_int16_t htons __P((u_int16_t));
-/* $OpenBSD: endian.h,v 1.4 1997/01/15 23:24:37 maja Exp $ */
+/* $OpenBSD: endian.h,v 1.5 1997/04/04 03:05:36 millert Exp $ */
/* $NetBSD: endian.h,v 1.8 1996/10/13 03:28:00 christos Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
u_int32_t htonl __P((u_int32_t));
u_int16_t htons __P((u_int16_t));
-/* $OpenBSD: endian.h,v 1.1.1.1 1997/02/06 16:02:43 pefo Exp $ */
+/* $OpenBSD: endian.h,v 1.2 1997/04/04 03:05:37 millert Exp $ */
/* $NetBSD: endian.h,v 1.4 1994/10/26 21:09:38 cgd Exp $ */
/*
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
-unsigned long htonl __P((unsigned long));
-unsigned short htons __P((unsigned short));
-unsigned long ntohl __P((unsigned long));
-unsigned short ntohs __P((unsigned short));
+u_int32_t htonl __P((u_int32_t));
+u_int16_t htons __P((u_int16_t));
+u_int32_t ntohl __P((u_int32_t));
+u_int16_t ntohs __P((u_int16_t));
__END_DECLS
/*
#else
-#define NTOHL(x) (x) = ntohl((u_long)x)
-#define NTOHS(x) (x) = ntohs((u_short)x)
-#define HTONL(x) (x) = htonl((u_long)x)
-#define HTONS(x) (x) = htons((u_short)x)
+#define NTOHL(x) (x) = ntohl((u_int32_t)x)
+#define NTOHS(x) (x) = ntohs((u_int16_t)x)
+#define HTONL(x) (x) = htonl((u_int32_t)x)
+#define HTONS(x) (x) = htons((u_int16_t)x)
#endif
#endif /* ! _POSIX_SOURCE */
#endif /* !_ENDIAN_H_ */