}
ND_PRINT((ndo, "\n\t port and protocol vlan id (PPVID): %u, flags [%s] (0x%02x)",
EXTRACT_BE_U_2(tptr + 5),
}
ND_PRINT((ndo, "\n\t port and protocol vlan id (PPVID): %u, flags [%s] (0x%02x)",
EXTRACT_BE_U_2(tptr + 5),
- bittok2str(lldp_8021_port_protocol_id_values, "none", EXTRACT_U_1((tptr + 4))),
- *(tptr + 4)));
+ bittok2str(lldp_8021_port_protocol_id_values, "none", EXTRACT_U_1(tptr + 4)),
+ EXTRACT_U_1(tptr + 4)));
/*Print Priority Assignment Table */
print_ets_priority_assignment_table(ndo, tptr + 5);
/*Print TC Bandwidth Table */
/*Print Priority Assignment Table */
print_ets_priority_assignment_table(ndo, tptr + 5);
/*Print TC Bandwidth Table */
- bittok2str(lldp_8023_autonegotiation_values, "none", EXTRACT_U_1((tptr + 4))),
- *(tptr + 4)));
+ bittok2str(lldp_8023_autonegotiation_values, "none", EXTRACT_U_1(tptr + 4)),
+ EXTRACT_U_1(tptr + 4)));
ND_PRINT((ndo, "\n\t PMD autoneg capability [%s] (0x%04x)",
bittok2str(lldp_pmd_capability_values,"unknown", EXTRACT_BE_U_2(tptr + 5)),
EXTRACT_BE_U_2(tptr + 5)));
ND_PRINT((ndo, "\n\t PMD autoneg capability [%s] (0x%04x)",
bittok2str(lldp_pmd_capability_values,"unknown", EXTRACT_BE_U_2(tptr + 5)),
EXTRACT_BE_U_2(tptr + 5)));
bittok2str(lldp_tia_capabilities_values, "none",
EXTRACT_BE_U_2(tptr + 4)), EXTRACT_BE_U_2(tptr + 4)));
ND_PRINT((ndo, "\n\t Device type [%s] (0x%02x)",
bittok2str(lldp_tia_capabilities_values, "none",
EXTRACT_BE_U_2(tptr + 4)), EXTRACT_BE_U_2(tptr + 4)));
ND_PRINT((ndo, "\n\t Device type [%s] (0x%02x)",
- tok2str(lldp_tia_device_type_values, "unknown", EXTRACT_U_1((tptr + 6))),
- *(tptr + 6)));
+ tok2str(lldp_tia_device_type_values, "unknown", EXTRACT_U_1(tptr + 6)),
+ EXTRACT_U_1(tptr + 6)));
- tok2str(lldp_tia_application_type_values, "none", EXTRACT_U_1((tptr + 4))),
- *(tptr + 4)));
+ tok2str(lldp_tia_application_type_values, "none", EXTRACT_U_1(tptr + 4)),
+ EXTRACT_U_1(tptr + 4)));
ND_PRINT((ndo, ", Flags [%s]", bittok2str(
lldp_tia_network_policy_bits_values, "none", EXTRACT_U_1((tptr + 5)))));
ND_PRINT((ndo, "\n\t Vlan id %u",
ND_PRINT((ndo, ", Flags [%s]", bittok2str(
lldp_tia_network_policy_bits_values, "none", EXTRACT_U_1((tptr + 5)))));
ND_PRINT((ndo, "\n\t Vlan id %u",
return hexdump;
}
ND_PRINT((ndo, "\n\t Latitude resolution %u, latitude value %" PRIu64,
return hexdump;
}
ND_PRINT((ndo, "\n\t Latitude resolution %u, latitude value %" PRIu64,
ND_PRINT((ndo, "\n\t Longitude resolution %u, longitude value %" PRIu64,
ND_PRINT((ndo, "\n\t Longitude resolution %u, longitude value %" PRIu64,
- tok2str(lldp_tia_location_altitude_type_values, "unknown",EXTRACT_U_1((tptr + 15)) >> 4),
+ tok2str(lldp_tia_location_altitude_type_values, "unknown",EXTRACT_U_1(tptr + 15) >> 4),
(EXTRACT_U_1(tptr + 15) >> 4)));
ND_PRINT((ndo, "\n\t Altitude resolution %u, altitude value 0x%x",
(EXTRACT_BE_U_2(tptr + 15)>>6)&0x3f,
((EXTRACT_BE_U_4(tptr + 16) & 0x3fffffff))));
ND_PRINT((ndo, "\n\t Datum %s (0x%02x)",
(EXTRACT_U_1(tptr + 15) >> 4)));
ND_PRINT((ndo, "\n\t Altitude resolution %u, altitude value 0x%x",
(EXTRACT_BE_U_2(tptr + 15)>>6)&0x3f,
((EXTRACT_BE_U_4(tptr + 16) & 0x3fffffff))));
ND_PRINT((ndo, "\n\t Datum %s (0x%02x)",
- tok2str(lldp_tia_location_datum_type_values, "unknown", EXTRACT_U_1((tptr + 20))),
- *(tptr + 20)));
+ tok2str(lldp_tia_location_datum_type_values, "unknown", EXTRACT_U_1(tptr + 20)),
+ EXTRACT_U_1(tptr + 20)));
}
ND_PRINT((ndo, "\n\t LCI length %u, LCI what %s (0x%02x), Country-code ",
lci_len,
}
ND_PRINT((ndo, "\n\t LCI length %u, LCI what %s (0x%02x), Country-code ",
lci_len,
- tok2str(lldp_tia_location_lci_what_values, "unknown", EXTRACT_U_1((tptr + 6))),
- *(tptr + 6)));
+ tok2str(lldp_tia_location_lci_what_values, "unknown", EXTRACT_U_1(tptr + 6)),
+ EXTRACT_U_1(tptr + 6)));
ND_PRINT((ndo, ", Power source [%s]",
tok2str(lldp_tia_power_source_values, "none", (EXTRACT_U_1((tptr + 4)) & 0x30) >> 4)));
ND_PRINT((ndo, "\n\t Power priority [%s] (0x%02x)",
ND_PRINT((ndo, ", Power source [%s]",
tok2str(lldp_tia_power_source_values, "none", (EXTRACT_U_1((tptr + 4)) & 0x30) >> 4)));
ND_PRINT((ndo, "\n\t Power priority [%s] (0x%02x)",
- tok2str(lldp_tia_power_priority_values, "none", EXTRACT_U_1((tptr + 4)) & 0x0f),
- (EXTRACT_U_1(tptr + 4) & 0x0f)));
+ tok2str(lldp_tia_power_priority_values, "none", EXTRACT_U_1(tptr + 4) & 0x0f),
+ EXTRACT_U_1(tptr + 4) & 0x0f));
power_val = EXTRACT_BE_U_2(tptr + 5);
if (power_val < LLDP_TIA_POWER_VAL_MAX) {
ND_PRINT((ndo, ", Power %.1f Watts", ((float)power_val) / 10));
power_val = EXTRACT_BE_U_2(tptr + 5);
if (power_val < LLDP_TIA_POWER_VAL_MAX) {
ND_PRINT((ndo, ", Power %.1f Watts", ((float)power_val) / 10));
}
ND_PRINT((ndo, "\n\t Control - Protocol Control (type 0x%x, length %d)",
LLDP_DCBX_CONTROL_TLV, tlv_len));
}
ND_PRINT((ndo, "\n\t Control - Protocol Control (type 0x%x, length %d)",
LLDP_DCBX_CONTROL_TLV, tlv_len));
- ND_PRINT((ndo, "\n\t Oper_Version: %d", *tptr));
- ND_PRINT((ndo, "\n\t Max_Version: %d", *(tptr + 1)));
+ ND_PRINT((ndo, "\n\t Oper_Version: %d", EXTRACT_U_1(tptr)));
+ ND_PRINT((ndo, "\n\t Max_Version: %d", EXTRACT_U_1(tptr + 1)));
ND_PRINT((ndo, "\n\t Sequence Number: %d", EXTRACT_BE_U_4(tptr + 2)));
ND_PRINT((ndo, "\n\t Acknowledgement Number: %d",
EXTRACT_BE_U_4(tptr + 6)));
ND_PRINT((ndo, "\n\t Sequence Number: %d", EXTRACT_BE_U_4(tptr + 2)));
ND_PRINT((ndo, "\n\t Acknowledgement Number: %d",
EXTRACT_BE_U_4(tptr + 6)));
}
ND_PRINT((ndo, "\n\t Feature - Priority Group (type 0x%x, length %d)",
LLDP_DCBX_PRIORITY_GROUPS_TLV, tlv_len));
}
ND_PRINT((ndo, "\n\t Feature - Priority Group (type 0x%x, length %d)",
LLDP_DCBX_PRIORITY_GROUPS_TLV, tlv_len));
- ND_PRINT((ndo, "\n\t Oper_Version: %d", *tptr));
- ND_PRINT((ndo, "\n\t Max_Version: %d", *(tptr + 1)));
- ND_PRINT((ndo, "\n\t Info block(0x%02X): ", *(tptr + 2)));
+ ND_PRINT((ndo, "\n\t Oper_Version: %d", EXTRACT_U_1(tptr)));
+ ND_PRINT((ndo, "\n\t Max_Version: %d", EXTRACT_U_1(tptr + 1)));
+ ND_PRINT((ndo, "\n\t Info block(0x%02X): ", EXTRACT_U_1(tptr + 2)));
tval = EXTRACT_U_1(tptr + 2);
ND_PRINT((ndo, "Enable bit: %d, Willing bit: %d, Error Bit: %d",
(tval & 0x80) ? 1 : 0, (tval & 0x40) ? 1 : 0,
(tval & 0x20) ? 1 : 0));
tval = EXTRACT_U_1(tptr + 2);
ND_PRINT((ndo, "Enable bit: %d, Willing bit: %d, Error Bit: %d",
(tval & 0x80) ? 1 : 0, (tval & 0x40) ? 1 : 0,
(tval & 0x20) ? 1 : 0));
- ND_PRINT((ndo, "\n\t Pg percentage[%d]: %d", i, *(tptr + 8 + i)));
- ND_PRINT((ndo, "\n\t NumTCsSupported: %d", *(tptr + 8 + 8)));
+ ND_PRINT((ndo, "\n\t Pg percentage[%d]: %d", i, EXTRACT_U_1(tptr + 8 + i)));
+ ND_PRINT((ndo, "\n\t NumTCsSupported: %d", EXTRACT_U_1(tptr + 8 + 8)));
ND_PRINT((ndo, "\n\t Feature - Priority Flow Control"));
ND_PRINT((ndo, " (type 0x%x, length %d)",
LLDP_DCBX_PRIORITY_FLOW_CONTROL_TLV, tlv_len));
ND_PRINT((ndo, "\n\t Feature - Priority Flow Control"));
ND_PRINT((ndo, " (type 0x%x, length %d)",
LLDP_DCBX_PRIORITY_FLOW_CONTROL_TLV, tlv_len));
- ND_PRINT((ndo, "\n\t Oper_Version: %d", *tptr));
- ND_PRINT((ndo, "\n\t Max_Version: %d", *(tptr + 1)));
- ND_PRINT((ndo, "\n\t Info block(0x%02X): ", *(tptr + 2)));
+ ND_PRINT((ndo, "\n\t Oper_Version: %d", EXTRACT_U_1(tptr)));
+ ND_PRINT((ndo, "\n\t Max_Version: %d", EXTRACT_U_1(tptr + 1)));
+ ND_PRINT((ndo, "\n\t Info block(0x%02X): ", EXTRACT_U_1(tptr + 2)));
tval = EXTRACT_U_1(tptr + 2);
ND_PRINT((ndo, "Enable bit: %d, Willing bit: %d, Error Bit: %d",
(tval & 0x80) ? 1 : 0, (tval & 0x40) ? 1 : 0,
(tval & 0x20) ? 1 : 0));
tval = EXTRACT_U_1(tptr + 2);
ND_PRINT((ndo, "Enable bit: %d, Willing bit: %d, Error Bit: %d",
(tval & 0x80) ? 1 : 0, (tval & 0x40) ? 1 : 0,
(tval & 0x20) ? 1 : 0));
for (i = 0; i <= 7; i++)
ND_PRINT((ndo, "\n\t Priority Bit %d: %s",
i, (tval & (1 << i)) ? "Enabled" : "Disabled"));
for (i = 0; i <= 7; i++)
ND_PRINT((ndo, "\n\t Priority Bit %d: %s",
i, (tval & (1 << i)) ? "Enabled" : "Disabled"));
}
ND_PRINT((ndo, "\n\t Feature - Application (type 0x%x, length %d)",
LLDP_DCBX_APPLICATION_TLV, tlv_len));
}
ND_PRINT((ndo, "\n\t Feature - Application (type 0x%x, length %d)",
LLDP_DCBX_APPLICATION_TLV, tlv_len));
- ND_PRINT((ndo, "\n\t Oper_Version: %d", *tptr));
- ND_PRINT((ndo, "\n\t Max_Version: %d", *(tptr + 1)));
- ND_PRINT((ndo, "\n\t Info block(0x%02X): ", *(tptr + 2)));
+ ND_PRINT((ndo, "\n\t Oper_Version: %d", EXTRACT_U_1(tptr)));
+ ND_PRINT((ndo, "\n\t Max_Version: %d", EXTRACT_U_1(tptr + 1)));
+ ND_PRINT((ndo, "\n\t Info block(0x%02X): ", EXTRACT_U_1(tptr + 2)));
tval = EXTRACT_U_1(tptr + 2);
ND_PRINT((ndo, "Enable bit: %d, Willing bit: %d, Error Bit: %d",
(tval & 0x80) ? 1 : 0, (tval & 0x40) ? 1 : 0,
(tval & 0x20) ? 1 : 0));
tval = EXTRACT_U_1(tptr + 2);
ND_PRINT((ndo, "Enable bit: %d, Willing bit: %d, Error Bit: %d",
(tval & 0x80) ? 1 : 0, (tval & 0x40) ? 1 : 0,
(tval & 0x20) ? 1 : 0));
(uval >> 22),
(uval >> 22) ? "Socket Number" : "L2 EtherType"));
ND_PRINT((ndo, "\n\t OUI: 0x%06x", uval & 0x3fffff));
(uval >> 22),
(uval >> 22) ? "Socket Number" : "L2 EtherType"));
ND_PRINT((ndo, "\n\t OUI: 0x%06x", uval & 0x3fffff));
ND_PRINT((ndo, "\n\t %s Interface Numbering (%u): %u",
tok2str(lldp_intf_numb_subtype_values, "Unknown", intf_num_subtype),
intf_num_subtype,
ND_PRINT((ndo, "\n\t %s Interface Numbering (%u): %u",
tok2str(lldp_intf_numb_subtype_values, "Unknown", intf_num_subtype),
intf_num_subtype,
ND_PRINT((ndo, "\n\t Subtype %s (%u): ",
tok2str(lldp_chassis_subtype_values, "Unknown", subtype),
subtype));
ND_PRINT((ndo, "\n\t Subtype %s (%u): ",
tok2str(lldp_chassis_subtype_values, "Unknown", subtype),
subtype));
ND_PRINT((ndo, "\n\t Subtype %s (%u): ",
tok2str(lldp_port_subtype_values, "Unknown", subtype),
subtype));
ND_PRINT((ndo, "\n\t Subtype %s (%u): ",
tok2str(lldp_port_subtype_values, "Unknown", subtype),
subtype));