offset += 4;
}
if (name_flag) {
+ uint8_t inft_name_length_field;
+
ifname_subobj = (const struct icmp_interface_identification_ifname_subobject_t *) offset;
- ND_PRINT("\n\t\t Interface Name: %.*s",
- GET_U_1(ifname_subobj->length),
- ifname_subobj->if_name);
- offset += 1 + GET_U_1(ifname_subobj->length);
+ inft_name_length_field = GET_U_1(ifname_subobj->length);
+ ND_PRINT("\n\t\t Interface Name, length %u: %.*s",
+ inft_name_length_field,
+ inft_name_length_field,
+ ifname_subobj->if_name);
+ offset += 1 + inft_name_length_field;
}
if (mtu_flag) {
ND_PRINT("\n\t\t MTU: %u", GET_BE_U_4(offset));
This object describes the IP interface upon which a datagram arrived
Interface Index: 15
IP Address sub-object: 10.10.10.10
- Interface Name: This-is-the-name-of-the-Interface-that-we-are-looking-for-[:-)] [|icmp]
+ Interface Name, length 63: This-is-the-name-of-the-Interface-that-we-are-looking-for-[:-)] [|icmp]
This object describes the IP interface upon which a datagram arrived
Interface Index: 15
IP Address sub-object: 10.10.10.10
- Interface Name: This-is-the-name-of-the-Interface-that-we-are-looking-for-[:-)]
+ Interface Name, length 63: This-is-the-name-of-the-Interface-that-we-are-looking-for-[:-)]