+/*
+ * Print a sequence of bytes, separated by a single space.
+ * Stop if truncated (via GET_U_1/longjmp) or after n bytes,
+ * whichever is first.
+ */
+void
+nd_print_bytes_hex(netdissect_options *ndo, const u_char *cp, u_int n)
+{
+ while (n > 0) {
+ ND_PRINT("%02x", GET_U_1(cp));
+ n--;
+ cp++;
+ if (n > 0)
+ ND_PRINT(" ");
+ }
+}
+