Diff for /src/usr.sbin/timed/timedc/cmds.c between versions 1.2 and 1.3

version 1.2, 2003/06/17 04:30:03 version 1.3, 2004/03/13 21:08:39
Line 32 Line 32
  *   *
  * @(#)cmds.c   8.1 (Berkeley) 6/6/93   * @(#)cmds.c   8.1 (Berkeley) 6/6/93
  * $FreeBSD: src/usr.sbin/timed/timedc/cmds.c,v 1.6.2.2 2001/08/31 08:02:06 kris Exp $   * $FreeBSD: src/usr.sbin/timed/timedc/cmds.c,v 1.6.2.2 2001/08/31 08:02:06 kris Exp $
 * $DragonFly: src/usr.sbin/timed/timedc/cmds.c,v 1.1 2003/06/16 07:38:51 dillon Exp $ * $DragonFly$
  */   */
   
 #include "timedc.h"  #include "timedc.h"
Line 80  void bytehostorder(struct tsp *); Line 80  void bytehostorder(struct tsp *);
 /* compute the difference between our date and another machine  /* compute the difference between our date and another machine
  */   */
 static int                              /* difference in days from our time */  static int                              /* difference in days from our time */
daydiff(hostname)daydiff(char *hostname)
        char *hostname; 
 {  {
         int i;          int i;
         int trials;          int trials;
Line 91  daydiff(hostname) Line 90  daydiff(hostname)
         int fromlen;          int fromlen;
         unsigned long sec;          unsigned long sec;
   
   
         /* wait 2 seconds between 10 tries */          /* wait 2 seconds between 10 tries */
         tout.tv_sec = 2;          tout.tv_sec = 2;
         tout.tv_usec = 0;          tout.tv_usec = 0;
Line 166  daydiff(hostname) Line 164  daydiff(hostname)
  * measurement.   * measurement.
  */   */
 void  void
clockdiff(argc, argv)clockdiff(int argc, char *argv[])
        int argc; 
        char *argv[]; 
 {  {
         int measure_status;          int measure_status;
         extern int measure(u_long, u_long, char *, struct sockaddr_in*, int);          extern int measure(u_long, u_long, char *, struct sockaddr_in*, int);
        register int avg_cnt;        int avg_cnt;
        register long avg;        long avg;
         struct servent *sp;          struct servent *sp;
   
         if (argc < 2)  {          if (argc < 2)  {
Line 265  clockdiff(argc, argv) Line 261  clockdiff(argc, argv)
  * finds location of master timedaemon   * finds location of master timedaemon
  */   */
 void  void
msite(argc, argv)msite(int argc, char *argv[])
        int argc; 
        char *argv[]; 
 {  {
         int cc;          int cc;
         fd_set ready;          fd_set ready;
Line 362  msite(argc, argv) Line 356  msite(argc, argv)
  * quits timedc   * quits timedc
  */   */
 void  void
quit()quit(void)
 {  {
   
         exit(0);          exit(0);
 }  }
   
Line 374  quit() Line 369  quit()
  * reliability of communication channel.   * reliability of communication channel.
  */   */
 void  void
testing(argc, argv)testing(int argc, char *argv[])
        int argc; 
        char *argv[]; 
 {  {
         struct servent *srvp;          struct servent *srvp;
         struct sockaddr_in sin;          struct sockaddr_in sin;
Line 424  testing(argc, argv) Line 417  testing(argc, argv)
  * Enables or disables tracing on local timedaemon   * Enables or disables tracing on local timedaemon
  */   */
 void  void
tracing(argc, argv)tracing(int argc, char *argv[])
        int argc; 
        char *argv[]; 
 {  {
         int onflag;          int onflag;
         int length;          int length;
Line 515  tracing(argc, argv) Line 506  tracing(argc, argv)
 }  }
   
 int  int
priv_resources()priv_resources(void)
 {  {
         int port;          int port;
         struct sockaddr_in sin;          struct sockaddr_in sin;

Removed from v.1.2  
changed lines
  Added in v.1.3