# 2.11BSD#431 - /usr/include/protocols/timed.h

##### Variables

    tsptype           X

##### Macros

    ANYADDR           X
    TSPTYPENUMBER     X
    TSPVERSION        X
    TSP_ACCEPT        X
    TSP_ACK           X
    TSP_ADJTIME       X
    TSP_ANY           X
    TSP_CONFLICT      X
    TSP_DATE          X
    TSP_DATEACK       X
    TSP_DATEREQ       X
    TSP_ELECTION      X
    TSP_LOOP          X
    TSP_MASTERACK     X
    TSP_MASTERREQ     X
    TSP_MASTERUP      X
    TSP_MSITE         X
    TSP_MSITEREQ      X
    TSP_QUIT          X
    TSP_REFUSE        X
    TSP_RESOLVE       X
    TSP_SETDATE       X
    TSP_SETDATEREQ    X
    TSP_SETTIME       X
    TSP_SLAVEUP       X
    TSP_TEST          X
    TSP_TRACEOFF      X
    TSP_TRACEON       X
    tsp_hopcnt        X
    tsp_time          X

##### struct's

    tsp               X

       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; used 7 times

- in /usr/src/bin/date.c line 354
- in /usr/src/usr.sbin/timed/cmds.c line 178, 325
- in /usr/src/usr.sbin/timed/readmsg.c line 70, 410, 423, 434

#### Defined struct's

tsp defined in line 16; used 120 times

- in /usr/src/bin/date.c line 258(2), 308(2), 331(2)
- in /usr/src/usr.sbin/timed/acksend.c line 20(2), 30-31(4), 41(2), 57(2)
- in /usr/src/usr.sbin/timed/byteorder.c line 20(2), 39(2)
- in /usr/src/usr.sbin/timed/candidate.c line 27-29(4), 45(2)
- in /usr/src/usr.sbin/timed/cmds.c line 126(2), 155(2), 167(2), 208(2), 244(2), 267(2), 299(2), 311(2)
- in /usr/src/usr.sbin/timed/correct.c line 28-30(4)
- in /usr/src/usr.sbin/timed/master.c line 46-51(6), 85(2), 123(2), 367-368(4), 479(2), 485(2), 505-506(4)
- in /usr/src/usr.sbin/timed/readmsg.c line 35-37(4), 52(2), 153(2), 254(2), 265(2), 286(2), 305(2), 321(2), 340(2), 361(2), 375(2), 388(2), 403(2)
- in /usr/src/usr.sbin/timed/slave.c line 26-30(4), 39(2), 50(2), 136(2), 223(2), 241(2), 276(2), 309(2), 422(2), 491(2)
- in /usr/src/usr.sbin/timed/timed.c line 422(2)

#### Defined macros

ANYADDR defined in line 14; used 17 times

- in /usr/src/usr.sbin/timed/acksend.c line 49
- in /usr/src/usr.sbin/timed/candidate.c line 54
- in /usr/src/usr.sbin/timed/master.c line 95, 209, 494
- in /usr/src/usr.sbin/timed/slave.c line 148, 269, 302, 392, 416, 467, 508
- in /usr/src/usr.sbin/timed/timed.c line 431, 443, 451, 459, 477

TSPTYPENUMBER defined in line 59; used 1 times

- in line 62

TSPVERSION defined in line 13; used 18 times

- in /usr/src/bin/date.c line 294
- in /usr/src/usr.sbin/timed/acksend.c line 45
- in /usr/src/usr.sbin/timed/candidate.c line 42
- in /usr/src/usr.sbin/timed/cmds.c line 152, 238, 296
- in /usr/src/usr.sbin/timed/master.c line 80, 120, 482
- in /usr/src/usr.sbin/timed/readmsg.c line 161, 279, 314, 345
- in /usr/src/usr.sbin/timed/slave.c line 47, 131, 236, 261, 413

TSP_ACCEPT defined in line 42; used 1 times

- in /usr/src/usr.sbin/timed/slave.c line 351

TSP_ACK defined in line 35; used 22 times

- in /usr/src/bin/date.c line 343
- in /usr/src/usr.sbin/timed/candidate.c line 92
- in /usr/src/usr.sbin/timed/cmds.c line 174, 318
- in /usr/src/usr.sbin/timed/correct.c line 56
- in /usr/src/usr.sbin/timed/master.c line 186, 215, 252, 374, 523
- in /usr/src/usr.sbin/timed/readmsg.c line 278, 313, 355
- in /usr/src/usr.sbin/timed/slave.c line 272, 358, 368, 398, 416-418(2), 475, 516
- in /usr/src/usr.sbin/timed/timed.c line 488

TSP_ADJTIME defined in line 34; used 1 times

- in /usr/src/usr.sbin/timed/correct.c line 53

TSP_ANY defined in line 33; used 4 times

- in /usr/src/usr.sbin/timed/candidate.c line 54
- in /usr/src/usr.sbin/timed/master.c line 95
- in /usr/src/usr.sbin/timed/readmsg.c line 22
- in /usr/src/usr.sbin/timed/slave.c line 148

TSP_CONFLICT defined in line 44; used 1 times

- in /usr/src/usr.sbin/timed/timed.c line 485

TSP_DATE defined in line 47; never used
TSP_DATEACK defined in line 49; used 6 times

- in /usr/src/usr.sbin/timed/master.c line 119
- in /usr/src/usr.sbin/timed/readmsg.c line 382
- in /usr/src/usr.sbin/timed/slave.c line 218, 270, 303-305(2)

TSP_DATEREQ defined in line 48; never used
TSP_ELECTION defined in line 41; used 2 times

- in /usr/src/usr.sbin/timed/candidate.c line 41
- in /usr/src/usr.sbin/timed/timed.c line 459

TSP_LOOP defined in line 57; used 3 times

- in /usr/src/usr.sbin/timed/master.c line 79
- in /usr/src/usr.sbin/timed/readmsg.c line 212
- in /usr/src/usr.sbin/timed/slave.c line 130

TSP_MASTERACK defined in line 37; used 7 times

- in /usr/src/usr.sbin/timed/master.c line 209
- in /usr/src/usr.sbin/timed/readmsg.c line 369
- in /usr/src/usr.sbin/timed/slave.c line 392, 467, 508
- in /usr/src/usr.sbin/timed/timed.c line 432, 477

TSP_MASTERREQ defined in line 36; used 2 times

- in /usr/src/usr.sbin/timed/timed.c line 429, 443

TSP_MASTERUP defined in line 39; used 2 times

- in /usr/src/usr.sbin/timed/master.c line 481
- in /usr/src/usr.sbin/timed/timed.c line 451

TSP_MSITE defined in line 52; used 3 times

- in /usr/src/usr.sbin/timed/cmds.c line 151
- in /usr/src/usr.sbin/timed/readmsg.c line 187, 211

TSP_MSITEREQ defined in line 53; used 1 times

- in /usr/src/usr.sbin/timed/slave.c line 412

TSP_QUIT defined in line 46; used 7 times

- in /usr/src/usr.sbin/timed/master.c line 183, 212, 249
- in /usr/src/usr.sbin/timed/slave.c line 364, 395, 471, 512

TSP_REFUSE defined in line 43; used 2 times

- in /usr/src/usr.sbin/timed/candidate.c line 88
- in /usr/src/usr.sbin/timed/slave.c line 349

TSP_RESOLVE defined in line 45; used 4 times

- in /usr/src/usr.sbin/timed/master.c line 207
- in /usr/src/usr.sbin/timed/slave.c line 390, 465, 506

TSP_SETDATE defined in line 55; used 3 times

- in /usr/src/bin/date.c line 293
- in /usr/src/usr.sbin/timed/readmsg.c line 186, 207

TSP_SETDATEREQ defined in line 56; used 1 times

- in /usr/src/usr.sbin/timed/slave.c line 260

TSP_SETTIME defined in line 38; used 2 times

- in /usr/src/usr.sbin/timed/master.c line 371, 512

TSP_SLAVEUP defined in line 40; used 3 times

- in /usr/src/usr.sbin/timed/master.c line 494
- in /usr/src/usr.sbin/timed/slave.c line 46, 235

TSP_TEST defined in line 54; used 3 times

- in /usr/src/usr.sbin/timed/cmds.c line 237
- in /usr/src/usr.sbin/timed/readmsg.c line 189, 209

TSP_TRACEOFF defined in line 51; used 3 times

- in /usr/src/usr.sbin/timed/cmds.c line 291
- in /usr/src/usr.sbin/timed/readmsg.c line 191, 215

TSP_TRACEON defined in line 50; used 3 times

- in /usr/src/usr.sbin/timed/cmds.c line 288
- in /usr/src/usr.sbin/timed/readmsg.c line 185, 214

tsp_hopcnt defined in line 28; used 5 times

- in /usr/src/usr.sbin/timed/master.c line 82
- in /usr/src/usr.sbin/timed/readmsg.c line 213, 413
- in /usr/src/usr.sbin/timed/slave.c line 133, 484

tsp_time defined in line 27; used 28 times

- in /usr/src/bin/date.c line 301-302(2), 338-339(4)
- in /usr/src/usr.sbin/timed/byteorder.c line 29-30(4), 48-49(4)
- in /usr/src/usr.sbin/timed/correct.c line 52
- in /usr/src/usr.sbin/timed/master.c line 114-115(2), 147-148(2), 373, 520
- in /usr/src/usr.sbin/timed/readmsg.c line 426-427(2)
- in /usr/src/usr.sbin/timed/slave.c line 189-192(3), 206-210(2)

#### Usage of this include

timed.h used 13 times

- in /usr/src/bin/date.c line 235
- in /usr/src/usr.sbin/timed/acksend.c line 12
- in /usr/src/usr.sbin/timed/byteorder.c line 12
- in /usr/src/usr.sbin/timed/candidate.c line 12
- in /usr/src/usr.sbin/timed/cmds.c line 16
- in /usr/src/usr.sbin/timed/correct.c line 12
- in /usr/src/usr.sbin/timed/master.c line 12
- in /usr/src/usr.sbin/timed/measure.c line 12
- in /usr/src/usr.sbin/timed/networkdelta.c line 12
- in /usr/src/usr.sbin/timed/pdp/cksum.c line 13
- in /usr/src/usr.sbin/timed/readmsg.c line 12
- in /usr/src/usr.sbin/timed/slave.c line 12
- in /usr/src/usr.sbin/timed/timed.c line 17

Last modified: 1987-06-20 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1443 |