Annotation of 43BSDReno/include/protocols/timed.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1983 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution and use in source and binary forms are permitted
        !             6:  * provided that: (1) source distributions retain this entire copyright
        !             7:  * notice and comment, and (2) distributions including binaries display
        !             8:  * the following acknowledgement:  ``This product includes software
        !             9:  * developed by the University of California, Berkeley and its contributors''
        !            10:  * in the documentation or other materials provided with the distribution
        !            11:  * and in all advertising materials mentioning features or use of this
        !            12:  * software. Neither the name of the University nor the names of its
        !            13:  * contributors may be used to endorse or promote products derived
        !            14:  * from this software without specific prior written permission.
        !            15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            16:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            18:  *
        !            19:  *     @(#)timed.h     1.9 (Berkeley) 6/1/90
        !            20:  */
        !            21: 
        !            22: /*
        !            23:  * Time Synchronization Protocol
        !            24:  */
        !            25: 
        !            26: #define        TSPVERSION      1
        !            27: #define ANYADDR        NULL
        !            28: 
        !            29: struct tsp {
        !            30:        u_char  tsp_type;
        !            31:        u_char  tsp_vers;
        !            32:        u_short tsp_seq;
        !            33:        union {
        !            34:                struct timeval tspu_time;
        !            35:                char tspu_hopcnt;
        !            36:        } tsp_u;
        !            37:        char tsp_name[MAXHOSTNAMELEN];
        !            38: };
        !            39: 
        !            40: #define        tsp_time        tsp_u.tspu_time
        !            41: #define        tsp_hopcnt      tsp_u.tspu_hopcnt
        !            42:  
        !            43: /*
        !            44:  * Command types.
        !            45:  */
        !            46: #define        TSP_ANY                 0       /* match any types */
        !            47: #define        TSP_ADJTIME             1       /* send adjtime */
        !            48: #define        TSP_ACK                 2       /* generic acknowledgement */
        !            49: #define        TSP_MASTERREQ           3       /* ask for master's name */ 
        !            50: #define        TSP_MASTERACK           4       /* acknowledge master request */
        !            51: #define        TSP_SETTIME             5       /* send network time */
        !            52: #define        TSP_MASTERUP            6       /* inform slaves that master is up */
        !            53: #define        TSP_SLAVEUP             7       /* slave is up but not polled */
        !            54: #define        TSP_ELECTION            8       /* advance candidature for master */
        !            55: #define        TSP_ACCEPT              9       /* support candidature of master */
        !            56: #define        TSP_REFUSE              10      /* reject candidature of master */
        !            57: #define        TSP_CONFLICT            11      /* two or more masters present */
        !            58: #define        TSP_RESOLVE             12      /* masters' conflict resolution */
        !            59: #define        TSP_QUIT                13      /* reject candidature if master is up */
        !            60: #define        TSP_DATE                14      /* reset the time (date command) */
        !            61: #define        TSP_DATEREQ             15      /* remote request to reset the time */
        !            62: #define        TSP_DATEACK             16      /* acknowledge time setting  */
        !            63: #define        TSP_TRACEON             17      /* turn tracing on */
        !            64: #define        TSP_TRACEOFF            18      /* turn tracing off */
        !            65: #define        TSP_MSITE               19      /* find out master's site */
        !            66: #define        TSP_MSITEREQ            20      /* remote master's site request */
        !            67: #define        TSP_TEST                21      /* for testing election algo */
        !            68: #define        TSP_SETDATE             22      /* New from date command */
        !            69: #define        TSP_SETDATEREQ          23      /* New remote for above */
        !            70: #define        TSP_LOOP                24      /* loop detection packet */
        !            71: 
        !            72: #define        TSPTYPENUMBER           25
        !            73: 
        !            74: #ifdef TSPTYPES
        !            75: char *tsptype[TSPTYPENUMBER] =
        !            76:   { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP", 
        !            77:   "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT", 
        !            78:   "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ",
        !            79:   "TEST", "SETDATE", "SETDATEREQ", "LOOP" };
        !            80: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.