]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
IPV6 cleanup of the simulator patches.
authorHarlan Stenn <stenn@ntp.org>
Thu, 18 Apr 2002 07:16:31 +0000 (03:16 -0400)
committerHarlan Stenn <stenn@ntp.org>
Thu, 18 Apr 2002 07:16:31 +0000 (03:16 -0400)
bk: 3cbe72cfjRN6w61SuLPJJlNSG5e1vw

1  2 
configure.in
include/ntp.h
libntp/Makefile.am
ntpd/ntp_io.c
ntpd/ntp_peer.c
ntpd/ntp_proto.c

diff --cc configure.in
Simple merge
diff --cc include/ntp.h
Simple merge
index e55d57cb452371ed1c82aeba26724cbbd11d594b,47423306860ade197b2817732af6d6ce75ec9648..66211f302a85849c65694e35001a3c96567e7de3
@@@ -9,11 -9,12 +9,13 @@@ libntp_a_SRCS = a_md5encrypt.c adjtime.
        hextolfp.c humandate.c icom.c ieee754io.c inttoa.c iosignal.c \
        lib_strbuf.c machines.c md5c.c memmove.c mfp_mul.c mfptoa.c \
        mfptoms.c mktime.c modetoa.c mstolfp.c msutotsf.c msyslog.c netof.c \
 -      numtoa.c numtohost.c octtoint.c prettydate.c ranny.c recvbuff.c \
 -      refnumtoa.c snprintf.c statestr.c strdup.c strerror.c strstr.c\
 +      ntp_rfc2553.c numtoa.c numtohost.c octtoint.c prettydate.c \
 +      ranny.c recvbuff.c refnumtoa.c snprintf.c socktoa.c socktohost.c \
 +      statestr.c strdup.c strerror.c strstr.c \
-       syssignal.c systime.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
+       syssignal.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
        uglydate.c uinttoa.c utvtoa.c ymd2yd.c
+ libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
+ libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
  EXTRA_libntp_a_SOURCES = adjtimex.c log.c random.c
  INCLUDES = -I$(top_srcdir)/include
  ETAGS_ARGS = Makefile.am
diff --cc ntpd/ntp_io.c
index 96f3fbc543474da5ec81648927b8f6e4a013a957,adea76885ee66a3f1a83db55c0635d18e092f46c..cdc30eb520a26587cfb58e7a4f9ff9401300ca16
  #include "ntp_refclock.h"
  #include "ntp_if.h"
  #include "ntp_stdlib.h"
 +#include "ntp.h"
  
+ #ifdef SIM
+ #include "ntpsim.h"
+ #endif
  #include <stdio.h>
  #include <signal.h>
  #ifdef HAVE_SYS_PARAM_H
@@@ -1539,8 -1179,12 +1543,12 @@@ sendpkt
          err = io_completion_port_sendto(inter, pkt, len, dest);
        if (err != ERROR_SUCCESS)
  #else
 -      cc = sendto(inter->fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
 -                  sizeof(struct sockaddr_in));
+ #ifdef SIM
+         cc = srvr_rply(&ntp_node,  dest, inter, pkt);
+ #else /* SIM */
 +      cc = sendto(inter->fd, (char *)pkt, (unsigned int)len, 0, (struct sockaddr *)dest,
 +                  SOCKLEN(dest));
+ #endif /* SIM */
        if (cc == -1)
  #endif
        {
diff --cc ntpd/ntp_peer.c
Simple merge
index 921bf5b95a9d0e93cffb2d69d45099b335bcc497,64408a62eba1eb30964bff3a52847fa404f0cccf..25de1ee173b49d2b2c4946c9af0374c99ba63318
@@@ -287,8 -286,9 +287,9 @@@ receive
        int     authlen;                /* offset of MAC field */
        int     is_authentic;           /* cryptosum ok */
        keyid_t skeyid;                 /* cryptographic keys */
 -      struct sockaddr_in *dstadr_sin; /* active runway */
 +      struct sockaddr_storage *dstadr_sin;    /* active runway */
        l_fp    p_org;                  /* originate timestamp */
+       l_fp    p_xmt;                  /* transmit timestamp */
  #ifdef OPENSSL
        keyid_t pkeyid, tkeyid;         /* cryptographic keys */
        struct autokey *ap;             /* autokey structure pointer */