+ uint8_t control, R, E, M, opcode;
+ uint16_t sequence, status, assoc, offset, count;
+
+ if (length < NTP_CTRLMSG_MINLEN)
+ goto invalid;
+
+ ND_TCHECK_1(cd->control);
+ control = GET_U_1(cd->control);
+ R = (control & 0x80) != 0;
+ E = (control & 0x40) != 0;
+ M = (control & 0x20) != 0;
+ opcode = control & 0x1f;
+ ND_PRINT(", %s, %s, %s, OpCode=%u\n",
+ R ? "Response" : "Request", E ? "Error" : "OK",
+ M ? "More" : "Last", opcode);
+
+ ND_TCHECK_2(cd->sequence);
+ sequence = GET_BE_U_2(cd->sequence);
+ ND_PRINT("\tSequence=%hu", sequence);
+
+ ND_TCHECK_2(cd->status);
+ status = GET_BE_U_2(cd->status);
+ ND_PRINT(", Status=%#hx", status);
+
+ ND_TCHECK_2(cd->assoc);
+ assoc = GET_BE_U_2(cd->assoc);
+ ND_PRINT(", Assoc.=%hu", assoc);
+
+ ND_TCHECK_2(cd->offset);
+ offset = GET_BE_U_2(cd->offset);
+ ND_PRINT(", Offset=%hu", offset);
+
+ ND_TCHECK_2(cd->count);
+ count = GET_BE_U_2(cd->count);
+ ND_PRINT(", Count=%hu", count);
+
+ if (NTP_CTRLMSG_MINLEN + count > length)
+ goto invalid;
+ if (count != 0) {
+ ND_TCHECK_LEN(cd->data, count);
+ ND_PRINT("\n\tTO-BE-DONE: data not interpreted");
+ }
+ return;