+ ND_PRINT("%s optlen goes past header length",
+ tok2str(dccp_option_values, "Option %u", GET_U_1(option)));
+ return 0;
+ }
+ ND_TCHECK_LEN(option, optlen);
+
+ if (GET_U_1(option) >= 128) {
+ ND_PRINT("CCID option %u", GET_U_1(option));
+ switch (optlen) {
+ case 4:
+ ND_PRINT(" %u", GET_BE_U_2(option + 2));
+ break;
+ case 6:
+ ND_PRINT(" %u", GET_BE_U_4(option + 2));
+ break;
+ default:
+ break;
+ }
+ } else {
+ ND_PRINT("%s",
+ tok2str(dccp_option_values, "Option %u", GET_U_1(option)));
+ switch (GET_U_1(option)) {
+ case 32:
+ case 33:
+ case 34:
+ case 35:
+ if (optlen < 3) {
+ ND_PRINT(" optlen too short");
+ return optlen;
+ }
+ if (GET_U_1(option + 2) < 10){
+ ND_PRINT(" %s",
+ dccp_feature_nums[GET_U_1(option + 2)]);
+ for (i = 0; i < optlen - 3; i++)
+ ND_PRINT(" %u",
+ GET_U_1(option + 3 + i));
+ }
+ break;
+ case 36:
+ if (optlen > 2) {
+ ND_PRINT(" 0x");
+ for (i = 0; i < optlen - 2; i++)
+ ND_PRINT("%02x",
+ GET_U_1(option + 2 + i));
+ }
+ break;
+ case 37:
+ for (i = 0; i < optlen - 2; i++)
+ ND_PRINT(" %u", GET_U_1(option + 2 + i));
+ break;
+ case 38:
+ if (optlen > 2) {
+ ND_PRINT(" 0x");
+ for (i = 0; i < optlen - 2; i++)
+ ND_PRINT("%02x",
+ GET_U_1(option + 2 + i));
+ }
+ break;
+ case 39:
+ if (optlen > 2) {
+ ND_PRINT(" 0x");
+ for (i = 0; i < optlen - 2; i++)
+ ND_PRINT("%02x",
+ GET_U_1(option + 2 + i));
+ }
+ break;
+ case 40:
+ if (optlen > 2) {
+ ND_PRINT(" 0x");
+ for (i = 0; i < optlen - 2; i++)
+ ND_PRINT("%02x",
+ GET_U_1(option + 2 + i));
+ }
+ break;
+ case 41:
+ /*
+ * 13.1. Timestamp Option
+ *
+ * +--------+--------+--------+--------+--------+--------+
+ * |00101001|00000110| Timestamp Value |
+ * +--------+--------+--------+--------+--------+--------+
+ * Type=41 Length=6
+ */
+ if (optlen == 6)
+ ND_PRINT(" %u", GET_BE_U_4(option + 2));
+ else
+ ND_PRINT(" [optlen != 6]");
+ break;
+ case 42:
+ /*
+ * 13.3. Timestamp Echo Option
+ *
+ * +--------+--------+--------+--------+--------+--------+
+ * |00101010|00000110| Timestamp Echo |
+ * +--------+--------+--------+--------+--------+--------+
+ * Type=42 Len=6
+ *
+ * +--------+--------+------- ... -------+--------+--------+
+ * |00101010|00001000| Timestamp Echo | Elapsed Time |
+ * +--------+--------+------- ... -------+--------+--------+
+ * Type=42 Len=8 (4 bytes)
+ *
+ * +--------+--------+------- ... -------+------- ... -------+
+ * |00101010|00001010| Timestamp Echo | Elapsed Time |
+ * +--------+--------+------- ... -------+------- ... -------+
+ * Type=42 Len=10 (4 bytes) (4 bytes)
+ */