Add error return codes for gethostby*() routines
[unix-history] / usr / src / include / protocols / timed.h
CommitLineData
e6b048e2
RG
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
b05ff25b 7/* @(#)timed.h 1.2 (Berkeley) %G% */
e6b048e2
RG
8
9/*
10 * Time Synchronization Protocol
11 */
12
13#define TSPVERSION 1
14#define ANYADDR NULL
15
16struct tsp {
17 u_char tsp_type;
18 u_char tsp_vers;
19 short tsp_seq;
20 struct timeval tsp_time;
b05ff25b 21 char tsp_name[MAXHOSTNAMELEN];
e6b048e2
RG
22};
23
24/*
25 * Command types.
26 */
27#define TSP_ANY 0 /* match any types */
28#define TSP_ADJTIME 1 /* send adjtime */
29#define TSP_ACK 2 /* generic acknowledgement */
30#define TSP_MASTERREQ 3 /* ask for master's name */
31#define TSP_MASTERACK 4 /* acknowledge master request */
32#define TSP_SETTIME 5 /* send network time */
33#define TSP_MASTERUP 6 /* inform slaves that master is up */
34#define TSP_SLAVEUP 7 /* slave is up but not polled */
35#define TSP_ELECTION 8 /* advance candidature for master */
36#define TSP_ACCEPT 9 /* support candidature of master */
37#define TSP_REFUSE 10 /* reject candidature of master */
38#define TSP_CONFLICT 11 /* two or more masters present */
39#define TSP_RESOLVE 12 /* masters' conflict resolution */
40#define TSP_QUIT 13 /* reject candidature if master is up */
41#define TSP_DATE 14 /* reset the time (date command) */
42#define TSP_DATEREQ 15 /* remote request to reset the time */
43#define TSP_DATEACK 16 /* acknowledge time setting */
44#define TSP_TRACEON 17 /* turn tracing on */
45#define TSP_TRACEOFF 18 /* turn tracing off */
46#define TSP_MSITE 19 /* find out master's site */
47#define TSP_MSITEREQ 20 /* remote master's site request */
48#define TSP_TEST 21 /* for testing election algo */
49
50#define TSPTYPENUMBER 22
51
52#ifdef TSPTYPES
53char *tsptype[TSPTYPENUMBER] =
b05ff25b 54 { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP",
e6b048e2
RG
55 "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT",
56 "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE",
57 "MSITEREQ", "TEST" };
58#endif