+invalid:
+ nd_print_invalid(ndo);
+}
+
+static void
+print_attr_location_information(netdissect_options *ndo,
+ const u_char *data, u_int length, u_short attr_code _U_)
+{
+ uint16_t index;
+ uint8_t code, entity;
+
+ ND_ICHECK_U(length, <, 21);
+
+ index = GET_BE_U_2(data);
+ data += 2;
+
+ code = GET_U_1(data);
+ data++;
+
+ entity = GET_U_1(data);
+ data++;
+
+ ND_PRINT("index %u, code %s, entity %s, ",
+ index,
+ tok2str(location_information_code_vector, "Unknown (%u)", code),
+ tok2str(location_information_entity_vector, "Unknown (%u)", entity)
+ );
+
+ ND_PRINT("sighting time ");
+ p_ntp_time(ndo, (const struct l_fixedpt *)data);
+ ND_PRINT(", ");
+ data += 8;
+
+ ND_PRINT("time to live ");
+ p_ntp_time(ndo, (const struct l_fixedpt *)data);
+ ND_PRINT(", ");
+ data += 8;
+
+ ND_PRINT("method \"");
+ nd_printjn(ndo, data, length - 20);
+ ND_PRINT("\"");
+
+ return;
+
+invalid:
+ nd_print_invalid(ndo);
+}
+
+static void
+print_attr_location_data(netdissect_options *ndo,
+ const u_char *data, u_int length, u_short attr_code _U_)
+{
+ uint16_t index;
+
+ ND_ICHECK_U(length, <, 3);
+
+ index = GET_BE_U_2(data);
+ data += 2;
+ ND_PRINT("index %u, location", index);
+
+ /* The Location field of the String field of the Location-Data attribute
+ * can have two completely different structures depending on the value of
+ * the Code field of a Location-Info attribute, which supposedly precedes
+ * the current attribute. Unfortunately, this choice of encoding makes it
+ * non-trivial to decode the Location field without preserving some state
+ * between the attributes.
+ */
+ hex_and_ascii_print(ndo, "\n\t ", data, length - 2);