- case IP6OPT_BINDING_UPDATE:
- if (len - i < IP6OPT_BU_MINLEN) {
- printf("(bu: trunc)");
- goto trunc;
- }
- if (bp[i + 1] < IP6OPT_BU_MINLEN - 2) {
- printf("(bu: invalid len %d)", bp[i + 1]);
- goto trunc;
- }
- printf("(bu: ");
- if (bp[i + 2] & 0x80)
- printf("A");
- if (bp[i + 2] & 0x40)
- printf("H");
- if (bp[i + 2] & 0x20)
- printf("S");
- if (bp[i + 2] & 0x10)
- printf("D");
- if ((bp[i + 2] & 0x0f) || bp[i + 3] || bp[i + 4])
- printf("res");
- printf(", sequence: %u", bp[i + 5]);
- printf(", lifetime: %u", EXTRACT_32BITS(&bp[i + 6]));
-
- if (bp[i + 1] > IP6OPT_BU_MINLEN - 2) {
- ip6_sopt_print(&bp[i + IP6OPT_BU_MINLEN],
- (optlen - IP6OPT_BU_MINLEN));
- }
- printf(")");
- break;
- case IP6OPT_BINDING_ACK:
- if (len - i < IP6OPT_BA_MINLEN) {
- printf("(ba: trunc)");
- goto trunc;
- }
- if (bp[i + 1] < IP6OPT_BA_MINLEN - 2) {
- printf("(ba: invalid len %d)", bp[i + 1]);
- goto trunc;
- }
- printf("(ba: ");
- printf("status: %u", bp[i + 2]);
- if (bp[i + 3])
- printf("res");
- printf(", sequence: %u", bp[i + 4]);
- printf(", lifetime: %u", EXTRACT_32BITS(&bp[i + 5]));
- printf(", refresh: %u", EXTRACT_32BITS(&bp[i + 9]));
-
- if (bp[i + 1] > IP6OPT_BA_MINLEN - 2) {
- ip6_sopt_print(&bp[i + IP6OPT_BA_MINLEN],
- (optlen - IP6OPT_BA_MINLEN));
- }
- printf(")");
- break;
- case IP6OPT_BINDING_REQ:
- if (len - i < IP6OPT_BR_MINLEN) {
- printf("(br: trunc)");
- goto trunc;
- }
- printf("(br");
- if (bp[i + 1] > IP6OPT_BR_MINLEN - 2) {
- ip6_sopt_print(&bp[i + IP6OPT_BR_MINLEN],
- (optlen - IP6OPT_BR_MINLEN));
- }
- printf(")");
- break;