|
@ -1,4 +1,4 @@ |
|
|
/* $OpenBSD: ntp_msg.c,v 1.8 2004/10/13 12:37:47 henning Exp $ */ |
|
|
|
|
|
|
|
|
/* $OpenBSD: ntp_msg.c,v 1.9 2004/10/13 13:35:19 henning Exp $ */ |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
@ -42,10 +42,10 @@ ntp_getmsg(char *p, ssize_t len, struct ntp_msg *msg) |
|
|
p += sizeof(msg->ppoll); |
|
|
p += sizeof(msg->ppoll); |
|
|
memcpy(&msg->precision, p, sizeof(msg->precision)); |
|
|
memcpy(&msg->precision, p, sizeof(msg->precision)); |
|
|
p += sizeof(msg->precision); |
|
|
p += sizeof(msg->precision); |
|
|
memcpy(&msg->distance.int_part, p, sizeof(msg->distance.int_part)); |
|
|
|
|
|
p += sizeof(msg->distance.int_part); |
|
|
|
|
|
memcpy(&msg->distance.fraction, p, sizeof(msg->distance.fraction)); |
|
|
|
|
|
p += sizeof(msg->distance.fraction); |
|
|
|
|
|
|
|
|
memcpy(&msg->rootdelay.int_part, p, sizeof(msg->rootdelay.int_part)); |
|
|
|
|
|
p += sizeof(msg->rootdelay.int_part); |
|
|
|
|
|
memcpy(&msg->rootdelay.fraction, p, sizeof(msg->rootdelay.fraction)); |
|
|
|
|
|
p += sizeof(msg->rootdelay.fraction); |
|
|
memcpy(&msg->dispersion.int_part, p, sizeof(msg->dispersion.int_part)); |
|
|
memcpy(&msg->dispersion.int_part, p, sizeof(msg->dispersion.int_part)); |
|
|
p += sizeof(msg->dispersion.int_part); |
|
|
p += sizeof(msg->dispersion.int_part); |
|
|
memcpy(&msg->dispersion.fraction, p, sizeof(msg->dispersion.fraction)); |
|
|
memcpy(&msg->dispersion.fraction, p, sizeof(msg->dispersion.fraction)); |
|
@ -89,10 +89,10 @@ ntp_sendmsg(int fd, struct sockaddr *sa, struct ntp_msg *msg, ssize_t len, |
|
|
p += sizeof(msg->ppoll); |
|
|
p += sizeof(msg->ppoll); |
|
|
memcpy(p, &msg->precision, sizeof(msg->precision)); |
|
|
memcpy(p, &msg->precision, sizeof(msg->precision)); |
|
|
p += sizeof(msg->precision); |
|
|
p += sizeof(msg->precision); |
|
|
memcpy(p, &msg->distance.int_part, sizeof(msg->distance.int_part)); |
|
|
|
|
|
p += sizeof(msg->distance.int_part); |
|
|
|
|
|
memcpy(p, &msg->distance.fraction, sizeof(msg->distance.fraction)); |
|
|
|
|
|
p += sizeof(msg->distance.fraction); |
|
|
|
|
|
|
|
|
memcpy(p, &msg->rootdelay.int_part, sizeof(msg->rootdelay.int_part)); |
|
|
|
|
|
p += sizeof(msg->rootdelay.int_part); |
|
|
|
|
|
memcpy(p, &msg->rootdelay.fraction, sizeof(msg->rootdelay.fraction)); |
|
|
|
|
|
p += sizeof(msg->rootdelay.fraction); |
|
|
memcpy(p, &msg->dispersion.int_part, sizeof(msg->dispersion.int_part)); |
|
|
memcpy(p, &msg->dispersion.int_part, sizeof(msg->dispersion.int_part)); |
|
|
p += sizeof(msg->dispersion.int_part); |
|
|
p += sizeof(msg->dispersion.int_part); |
|
|
memcpy(p, &msg->dispersion.fraction, sizeof(msg->dispersion.fraction)); |
|
|
memcpy(p, &msg->dispersion.fraction, sizeof(msg->dispersion.fraction)); |
|
|