2 * /src/NTP/ntp-4/libntp/binio.c,v 4.2 1999/02/21 12:17:34 kardel RELEASE_19990228_A
4 * $Created: Sun Jul 20 12:55:33 1997 $
6 * Copyright (C) 1997, 1998 by Frank Kardel
18 retval = *((*bufpp)++);
19 retval |= *((*bufpp)++) << 8;
21 return (retval & 0x8000) ? (~0xFFFF | retval) : retval;
26 unsigned char **bufpp,
30 *((*bufpp)++) = val & 0xFF;
31 *((*bufpp)++) = (val >> 8) & 0xFF;
41 retval = *((*bufpp)++);
42 retval |= *((*bufpp)++) << 8;
43 retval |= *((*bufpp)++) << 16;
44 retval |= *((*bufpp)++) << 24;
51 unsigned char **bufpp,
55 *((*bufpp)++) = val & 0xFF;
56 *((*bufpp)++) = (val >> 8) & 0xFF;
57 *((*bufpp)++) = (val >> 16) & 0xFF;
58 *((*bufpp)++) = (val >> 24) & 0xFF;
68 retval = *((*bufpp)++) << 8;
69 retval |= *((*bufpp)++);
71 return (retval & 0x8000) ? (~0xFFFF | retval) : retval;
76 unsigned char **bufpp,
80 *((*bufpp)++) = (val >> 8) & 0xFF;
81 *((*bufpp)++) = val & 0xFF;
91 retval = *((*bufpp)++) << 24;
92 retval |= *((*bufpp)++) << 16;
93 retval |= *((*bufpp)++) << 8;
94 retval |= *((*bufpp)++);
101 unsigned char **bufpp,
105 *((*bufpp)++) = (val >> 24) & 0xFF;
106 *((*bufpp)++) = (val >> 16) & 0xFF;
107 *((*bufpp)++) = (val >> 8 ) & 0xFF;
108 *((*bufpp)++) = val & 0xFF;
113 * Revision 4.2 1999/02/21 12:17:34 kardel
114 * 4.91f reconcilation
116 * Revision 4.1 1998/06/28 16:47:50 kardel
117 * added {get,put}_msb_{short,long} functions
119 * Revision 4.0 1998/04/10 19:46:16 kardel
120 * Start 4.0 release version numbering
122 * Revision 1.1 1998/04/10 19:27:46 kardel
123 * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
125 * Revision 1.1 1997/10/06 21:05:46 kardel
126 * new parse structure