Fri Jan 22 23:13:20 2016 UTC ()
Erm, fix previous.
(also, as this protocol is externally defined it probably should use its
own constant and not either of these system-defined hostname lengths...)


(dholland)
diff -r1.12 -r1.13 src/include/protocols/timed.h

cvs diff -r1.12 -r1.13 src/include/protocols/timed.h (expand / switch to unified diff)

--- src/include/protocols/timed.h 2016/01/22 23:11:50 1.12
+++ src/include/protocols/timed.h 2016/01/22 23:13:20 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: timed.h,v 1.12 2016/01/22 23:11:50 dholland Exp $ */ 1/* $NetBSD: timed.h,v 1.13 2016/01/22 23:13:20 dholland Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1983, 1993 4 * Copyright (c) 1983, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -45,27 +45,27 @@ @@ -45,27 +45,27 @@
45#define ANYADDR NULL 45#define ANYADDR NULL
46 46
47struct tsp { 47struct tsp {
48 uint8_t tsp_type; 48 uint8_t tsp_type;
49 uint8_t tsp_vers; 49 uint8_t tsp_vers;
50 uint16_t tsp_seq; 50 uint16_t tsp_seq;
51 union { 51 union {
52 struct { 52 struct {
53 int32_t tv_sec; 53 int32_t tv_sec;
54 int32_t tv_usec; 54 int32_t tv_usec;
55 } tspu_time; 55 } tspu_time;
56 char tspu_hopcnt; 56 char tspu_hopcnt;
57 } tsp_u; 57 } tsp_u;
58 char tsp_name[_POSIX_HOST_NAME_MAX]; 58 char tsp_name[_POSIX_HOST_NAME_MAX+1];
59}; 59};
60 60
61#define tsp_time tsp_u.tspu_time 61#define tsp_time tsp_u.tspu_time
62#define tsp_hopcnt tsp_u.tspu_hopcnt 62#define tsp_hopcnt tsp_u.tspu_hopcnt
63  63
64/* 64/*
65 * Command types. 65 * Command types.
66 */ 66 */
67#define TSP_ANY 0 /* match any types */ 67#define TSP_ANY 0 /* match any types */
68#define TSP_ADJTIME 1 /* send adjtime */ 68#define TSP_ADJTIME 1 /* send adjtime */
69#define TSP_ACK 2 /* generic acknowledgement */ 69#define TSP_ACK 2 /* generic acknowledgement */
70#define TSP_MASTERREQ 3 /* ask for master's name */  70#define TSP_MASTERREQ 3 /* ask for master's name */
71#define TSP_MASTERACK 4 /* acknowledge master request */ 71#define TSP_MASTERACK 4 /* acknowledge master request */