1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: /*	@(#)timed.h	1.6	(Berkeley)	5/28/86	*/
   8: 
   9: /*
  10:  * Time Synchronization Protocol
  11:  */
  12: 
  13: #define TSPVERSION  1
  14: #define ANYADDR     NULL
  15: 
  16: struct tsp {
  17:     u_char  tsp_type;
  18:     u_char  tsp_vers;
  19:     u_short tsp_seq;
  20:     union {
  21:         struct timeval tspu_time;
  22:         char tspu_hopcnt;
  23:     } tsp_u;
  24:     char tsp_name[MAXHOSTNAMELEN];
  25: };
  26: 
  27: #define tsp_time    tsp_u.tspu_time
  28: #define tsp_hopcnt  tsp_u.tspu_hopcnt
  29: 
  30: /*
  31:  * Command types.
  32:  */
  33: #define TSP_ANY         0   /* match any types */
  34: #define TSP_ADJTIME     1   /* send adjtime */
  35: #define TSP_ACK         2   /* generic acknowledgement */
  36: #define TSP_MASTERREQ       3   /* ask for master's name */
  37: #define TSP_MASTERACK       4   /* acknowledge master request */
  38: #define TSP_SETTIME     5   /* send network time */
  39: #define TSP_MASTERUP        6   /* inform slaves that master is up */
  40: #define TSP_SLAVEUP     7   /* slave is up but not polled */
  41: #define TSP_ELECTION        8   /* advance candidature for master */
  42: #define TSP_ACCEPT      9   /* support candidature of master */
  43: #define TSP_REFUSE      10  /* reject candidature of master */
  44: #define TSP_CONFLICT        11  /* two or more masters present */
  45: #define TSP_RESOLVE     12  /* masters' conflict resolution */
  46: #define TSP_QUIT        13  /* reject candidature if master is up */
  47: #define TSP_DATE        14  /* reset the time (date command) */
  48: #define TSP_DATEREQ     15  /* remote request to reset the time */
  49: #define TSP_DATEACK     16  /* acknowledge time setting  */
  50: #define TSP_TRACEON     17  /* turn tracing on */
  51: #define TSP_TRACEOFF        18  /* turn tracing off */
  52: #define TSP_MSITE       19  /* find out master's site */
  53: #define TSP_MSITEREQ        20  /* remote master's site request */
  54: #define TSP_TEST        21  /* for testing election algo */
  55: #define TSP_SETDATE     22  /* New from date command */
  56: #define TSP_SETDATEREQ      23  /* New remote for above */
  57: #define TSP_LOOP        24  /* loop detection packet */
  58: 
  59: #define TSPTYPENUMBER       25
  60: 
  61: #ifdef TSPTYPES
  62: char *tsptype[TSPTYPENUMBER] =
  63:   { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP",
  64:   "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT",
  65:   "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ",
  66:   "TEST", "SETDATE", "SETDATEREQ", "LOOP" };
  67: #endif

Defined variables

tsptype defined in line 62; never used

Defined struct's

tsp defined in line 16; never used

Defined macros

ANYADDR defined in line 14; never used
TSPTYPENUMBER defined in line 59; used 1 times
  • in line 62
TSPVERSION defined in line 13; never used
TSP_ACCEPT defined in line 42; never used
TSP_ACK defined in line 35; never used
TSP_ADJTIME defined in line 34; never used
TSP_ANY defined in line 33; never used
TSP_CONFLICT defined in line 44; never used
TSP_DATE defined in line 47; never used
TSP_DATEACK defined in line 49; never used
TSP_DATEREQ defined in line 48; never used
TSP_ELECTION defined in line 41; never used
TSP_LOOP defined in line 57; never used
TSP_MASTERACK defined in line 37; never used
TSP_MASTERREQ defined in line 36; never used
TSP_MASTERUP defined in line 39; never used
TSP_MSITE defined in line 52; never used
TSP_MSITEREQ defined in line 53; never used
TSP_QUIT defined in line 46; never used
TSP_REFUSE defined in line 43; never used
TSP_RESOLVE defined in line 45; never used
TSP_SETDATE defined in line 55; never used
TSP_SETDATEREQ defined in line 56; never used
TSP_SETTIME defined in line 38; never used
TSP_SLAVEUP defined in line 40; never used
TSP_TEST defined in line 54; never used
TSP_TRACEOFF defined in line 51; never used
TSP_TRACEON defined in line 50; never used
tsp_hopcnt defined in line 28; never used
tsp_time defined in line 27; never used
Last modified: 1986-05-29
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 602
Valid CSS Valid XHTML 1.0 Strict