+ ND_PRINT((ndo, ", pad1"));
+ break;
+ case IP6OPT_PADN:
+ if (len - i < IP6OPT_MINLEN) {
+ ND_PRINT((ndo, ", padn: trunc"));
+ goto trunc;
+ }
+ ND_PRINT((ndo, ", padn"));
+ break;
+ default:
+ if (len - i < IP6OPT_MINLEN) {
+ ND_PRINT((ndo, ", sopt_type %d: trunc)", bp[i]));
+ goto trunc;
+ }
+ ND_PRINT((ndo, ", sopt_type 0x%02x: len=%d", bp[i], bp[i + 1]));
+ break;
+ }
+ }
+ return;
+
+trunc:
+ ND_PRINT((ndo, "[trunc] "));
+}
+
+static void
+ip6_opt_print(netdissect_options *ndo, const u_char *bp, int len)
+{
+ int i;
+ int optlen = 0;
+
+ if (len == 0)
+ return;
+ for (i = 0; i < len; i += optlen) {
+ if (bp[i] == IP6OPT_PAD1)