+ else if (IP_V(ip) == 6 && ip6->ip6_plen) {
+ /* for IPv6, UDP checksum is mandatory */
+ if (ND_TTEST2(cp[0], length)) {
+ sum = udp6_cksum(ndo, ip6, up, length + sizeof(struct udphdr));
+ udp_sum = EXTRACT_16BITS(&up->uh_sum);
+
+ if (sum != 0) {
+ ND_PRINT((ndo, "[bad udp cksum 0x%04x -> 0x%04x!] ",
+ udp_sum,
+ in_cksum_shouldbe(udp_sum, sum)));
+ } else
+ ND_PRINT((ndo, "[udp sum ok] "));
+ }
+ }
+ }
+
+ if (!ndo->ndo_qflag) {
+ if (IS_SRC_OR_DST_PORT(NAMESERVER_PORT))
+ ns_print(ndo, (const u_char *)(up + 1), length, 0);
+ else if (IS_SRC_OR_DST_PORT(MULTICASTDNS_PORT))
+ ns_print(ndo, (const u_char *)(up + 1), length, 1);
+ else if (IS_SRC_OR_DST_PORT(TIMED_PORT))
+ timed_print(ndo, (const u_char *)(up + 1));
+ else if (IS_SRC_OR_DST_PORT(TFTP_PORT))
+ tftp_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(BOOTPC_PORT) || IS_SRC_OR_DST_PORT(BOOTPS_PORT))
+ bootp_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(RIP_PORT))
+ rip_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(AODV_PORT))
+ aodv_print(ndo, (const u_char *)(up + 1), length,
+ ip6 != NULL);
+ else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT))
+ isakmp_print(ndo, (const u_char *)(up + 1), length, bp2);
+ else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_NATT))
+ isakmp_rfc3948_print(ndo, (const u_char *)(up + 1), length, bp2);
+#if 1 /*???*/
+ else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER1) || IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER2))
+ isakmp_print(ndo, (const u_char *)(up + 1), length, bp2);
+#endif
+ else if (IS_SRC_OR_DST_PORT(SNMP_PORT) || IS_SRC_OR_DST_PORT(SNMPTRAP_PORT))
+ snmp_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(NTP_PORT))
+ ntp_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(KERBEROS_PORT) || IS_SRC_OR_DST_PORT(KERBEROS_SEC_PORT))
+ krb_print(ndo, (const void *)(up + 1));
+ else if (IS_SRC_OR_DST_PORT(L2TP_PORT))
+ l2tp_print(ndo, (const u_char *)(up + 1), length);
+#ifdef ENABLE_SMB
+ else if (IS_SRC_OR_DST_PORT(NETBIOS_NS_PORT))
+ nbt_udp137_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(NETBIOS_DGRAM_PORT))
+ nbt_udp138_print(ndo, (const u_char *)(up + 1), length);
+#endif
+ else if (dport == VAT_PORT)
+ vat_print(ndo, (const void *)(up + 1), up);
+ else if (IS_SRC_OR_DST_PORT(ZEPHYR_SRV_PORT) || IS_SRC_OR_DST_PORT(ZEPHYR_CLT_PORT))
+ zephyr_print(ndo, (const void *)(up + 1), length);
+ /*
+ * Since there are 10 possible ports to check, I think
+ * a <> test would be more efficient
+ */
+ else if ((sport >= RX_PORT_LOW && sport <= RX_PORT_HIGH) ||
+ (dport >= RX_PORT_LOW && dport <= RX_PORT_HIGH))
+ rx_print(ndo, (const void *)(up + 1), length, sport, dport,
+ (const u_char *) ip);
+ else if (IS_SRC_OR_DST_PORT(RIPNG_PORT))
+ ripng_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(DHCP6_SERV_PORT) || IS_SRC_OR_DST_PORT(DHCP6_CLI_PORT))
+ dhcp6_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(AHCP_PORT))
+ ahcp_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(BABEL_PORT) || IS_SRC_OR_DST_PORT(BABEL_PORT_OLD))
+ babel_print(ndo, (const u_char *)(up + 1), length);
+ else if (IS_SRC_OR_DST_PORT(HNCP_PORT))
+ hncp_print(ndo, (const u_char *)(up + 1), length);