#define _SS_MAXSIZE 128
#define _SS_ALIGNSIZE (sizeof(ntp_uint64_t))
#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
-#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) - sizeof(u_int8_t))
-#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) - sizeof(u_int8_t) - \
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) - sizeof(ntp_u_int8_t))
+#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) - sizeof(ntp_u_int8_t) - \
_SS_PAD1SIZE - _SS_ALIGNSIZE)
#else
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(short))
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
struct sockaddr_storage {
#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
- u_int8_t ss_len; /* address length */
- u_int8_t ss_family; /* address family */
+ ntp_u_int8_t ss_len; /* address length */
+ ntp_u_int8_t ss_family; /* address family */
#else
short ss_family; /* address family */
#endif
struct in6_addr {
union {
- u_int8_t __u6_addr8[16];
- u_int16_t __u6_addr16[8];
- u_int32_t __u6_addr32[4];
+ ntp_u_int8_t __u6_addr8[16];
+ ntp_u_int16_t __u6_addr16[8];
+ ntp_u_int32_t __u6_addr32[4];
} __u6_addr; /* 128-bit IP6 address */
};
#ifndef HAVE_SOCKADDR_IN6
struct sockaddr_in6 {
#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
- u_int8_t sin6_len; /* length of this struct(sa_family_t)*/
- u_int8_t sin6_family; /* AF_INET6 (sa_family_t) */
+ ntp_u_int8_t sin6_len; /* length of this struct(sa_family_t)*/
+ ntp_u_int8_t sin6_family; /* AF_INET6 (sa_family_t) */
#else
short sin6_family; /* AF_INET6 (sa_family_t) */
#endif
- u_int16_t sin6_port; /* Transport layer port # (in_port_t)*/
- u_int32_t sin6_flowinfo; /* IP6 flow information */
+ ntp_u_int16_t sin6_port; /* Transport layer port # (in_port_t)*/
+ ntp_u_int32_t sin6_flowinfo; /* IP6 flow information */
struct in6_addr sin6_addr; /* IP6 address */
- u_int32_t sin6_scope_id; /* scope zone index */
+ ntp_u_int32_t sin6_scope_id; /* scope zone index */
};
#endif
*/
#ifndef IN6_IS_ADDR_UNSPECIFIED
#define IN6_IS_ADDR_UNSPECIFIED(a) \
- ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
- (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
- (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
- (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
+ ((*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
#endif
/*
* Multicast
# include "Bletch: what's 32 bits on this machine?"
#endif /* not sizeof(int) == 4 */
-#ifndef HAVE_TYPE_U_INT8_T
-typedef u_char u_int8_t;
-typedef u_short u_int16_t;
-typedef u_int32 u_int32_t;
-#endif /* HAVE_TYPE_U_INT8_T */
+typedef u_char ntp_u_int8_t;
+typedef u_short ntp_u_int16_t;
+typedef u_int32 ntp_u_int32_t;
typedef struct ntp_uint64_t { u_int32 val[2]; } ntp_uint64_t;