+ ND_PRINT("tos %u, %u (%u octets)",
+ GET_U_1(nr->tos),
+ GET_BE_U_4(nr->packets),
+ GET_BE_U_4(nr->octets));
+ /* This was not all of struct nfrec_v5. */
+ ND_TCHECK_SIZE(nr);
+ }
+}
+
+static void
+cnfp_v6_print(netdissect_options *ndo, const u_char *cp)
+{
+ const struct nfhdr_v6 *nh;
+ const struct nfrec_v6 *nr;
+ const char *p_name;
+ uint8_t proto;
+ u_int nrecs, ver;
+#if 0
+ time_t t;
+#endif
+
+ nh = (const struct nfhdr_v6 *)cp;
+
+ ver = GET_BE_U_2(nh->version);
+ nrecs = GET_BE_U_4(nh->count);
+#if 0
+ /*
+ * This is seconds since the UN*X epoch, and is followed by
+ * nanoseconds. XXX - format it, rather than just dumping the
+ * raw seconds-since-the-Epoch.
+ */
+ t = GET_BE_U_4(nh->utc_sec);
+#endif
+
+ ND_PRINT("NetFlow v%x, %u.%03u uptime, %u.%09u, ", ver,
+ GET_BE_U_4(nh->msys_uptime)/1000,
+ GET_BE_U_4(nh->msys_uptime)%1000,
+ GET_BE_U_4(nh->utc_sec), GET_BE_U_4(nh->utc_nsec));
+
+ ND_PRINT("#%u, ", GET_BE_U_4(nh->sequence));
+ /* This was not all of struct nfhdr_v6. */
+ ND_TCHECK_SIZE(nh);
+ nr = (const struct nfrec_v6 *)&nh[1];
+
+ ND_PRINT("%2u recs", nrecs);
+
+ for (; nrecs != 0; nr++, nrecs--) {
+ ND_PRINT("\n started %u.%03u, last %u.%03u",
+ GET_BE_U_4(nr->start_time)/1000,
+ GET_BE_U_4(nr->start_time)%1000,
+ GET_BE_U_4(nr->last_time)/1000,
+ GET_BE_U_4(nr->last_time)%1000);
+
+ ND_PRINT("\n %s/%u:%u:%u ",
+ intoa(GET_IPV4_TO_NETWORK_ORDER(nr->src_ina)),
+ GET_U_1(nr->src_mask), GET_BE_U_2(nr->src_as),
+ GET_BE_U_2(nr->srcport));
+
+ ND_PRINT("> %s/%u:%u:%u ",
+ intoa(GET_IPV4_TO_NETWORK_ORDER(nr->dst_ina)),
+ GET_U_1(nr->dst_mask), GET_BE_U_2(nr->dst_as),
+ GET_BE_U_2(nr->dstport));
+
+ ND_PRINT(">> %s\n ",
+ intoa(GET_IPV4_TO_NETWORK_ORDER(nr->nhop_ina)));
+
+ proto = GET_U_1(nr->proto);
+ if (!ndo->ndo_nflag && (p_name = netdb_protoname(proto)) != NULL)
+ ND_PRINT("%s ", p_name);
+ else
+ ND_PRINT("%u ", proto);
+
+ /* tcp flags for tcp only */
+ if (proto == IPPROTO_TCP) {
+ u_int flags;
+ flags = GET_U_1(nr->tcp_flags);
+ if (flags)
+ ND_PRINT("%s ", bittok2str_nosep(tcp_flag_values, "", flags));