Lines Matching +full:reset +full:- +full:time +full:- +full:sec
22 /* \summary: Berkeley UNIX Time Synchronization Protocol */
28 #include "netdissect-stdinc.h"
46 nd_byte tsp_name[256]; /* null-terminated string up to 256 */
60 #define TSP_SETTIME 5 /* send network time */
69 #define TSP_DATE 14 /* reset the time (date command) */
70 #define TSP_DATEREQ 15 /* remote request to reset the time */
71 #define TSP_DATEACK 16 /* acknowledge time setting */
115 int sec, usec;
117 ndo->ndo_protocol = "timed";
118 tsp_type = GET_U_1(tsp->tsp_type);
121 ND_PRINT(" vers %u", GET_U_1(tsp->tsp_vers));
123 ND_PRINT(" seq %u", GET_BE_U_2(tsp->tsp_seq));
127 ND_PRINT(" hopcnt %u", GET_U_1(tsp->tsp_hopcnt));
133 sec = GET_BE_S_4(tsp->tsp_time.tv_sec);
134 usec = GET_BE_S_4(tsp->tsp_time.tv_usec);
139 ND_PRINT(" time ");
140 if (sec < 0 && usec != 0) {
141 sec++;
142 if (sec == 0)
143 ND_PRINT("-");
144 usec = 1000000 - usec;
146 ND_PRINT("%d.%06d", sec, usec);
150 nd_printjnp(ndo, tsp->tsp_name, sizeof(tsp->tsp_name));