2 * ntp_types.h - defines how int32 and u_int32 are treated.
3 * For 64 bit systems like the DEC Alpha, they have to be defined
5 * For 32 bit systems, define them as long and u_long
7 #include "ntp_machine.h"
13 * This is another naming conflict.
14 * On NetBSD for MAC the macro "mac" is defined as 1
15 * this is fun for us as a packet structure contains an
16 * optional "mac" member - severe confusion results 8-)
17 * As we hopefully do not have to rely on that macro we
25 * Set up for prototyping
28 #if defined(__STDC__) || defined(HAVE_PROTOTYPES)
30 #else /* not __STDC__ and not HAVE_PROTOTYPES */
32 #endif /* not __STDC__ and HAVE_PROTOTYPES */
36 * VMS DECC (v4.1), {u_char,u_short,u_long} are only in SOCKET.H,
37 * and u_int isn't defined anywhere
41 typedef unsigned int u_int;
43 * Note: VMS DECC has long == int (even on __alpha),
44 * so the distinction below doesn't matter
53 # define u_int32 unsigned int
55 #else /* not sizeof(int) == 4 */
56 # if (SIZEOF_LONG == 4)
57 # else /* not sizeof(long) == 4 */
62 # define u_int32 unsigned long
64 # endif /* not sizeof(long) == 4 */
65 # include "Bletch: what's 32 bits on this machine?"
66 #endif /* not sizeof(int) == 4 */
68 typedef unsigned short associd_t; /* association ID */
69 typedef u_int32 keyid_t; /* cryptographic key ID */
70 typedef u_int32 tstamp_t; /* NTP seconds timestamp */
72 #endif /* _NTP_TYPES_ */