Lines Matching refs:ndo

143 pimv1_join_prune_print(netdissect_options *ndo,  in pimv1_join_prune_print()  argument
154 ND_PRINT((ndo, " RPF %s ", ipaddr_string(ndo, bp))); in pimv1_join_prune_print()
157 ND_PRINT((ndo, "Hold ")); in pimv1_join_prune_print()
158 unsigned_relts_print(ndo, hold); in pimv1_join_prune_print()
160 ND_PRINT((ndo, "%s (%s/%d, %s", njoin ? "Join" : "Prune", in pimv1_join_prune_print()
161 ipaddr_string(ndo, &bp[26]), bp[25] & 0x3f, in pimv1_join_prune_print()
162 ipaddr_string(ndo, &bp[12]))); in pimv1_join_prune_print()
164 ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[16]))); in pimv1_join_prune_print()
165 ND_PRINT((ndo, ") %s%s %s", in pimv1_join_prune_print()
175 if (ndo->ndo_vflag > 1) in pimv1_join_prune_print()
176 ND_PRINT((ndo, "\n")); in pimv1_join_prune_print()
177 ND_PRINT((ndo, " Upstream Nbr: %s", ipaddr_string(ndo, bp))); in pimv1_join_prune_print()
183 if (ndo->ndo_vflag > 1) in pimv1_join_prune_print()
184 ND_PRINT((ndo, "\n")); in pimv1_join_prune_print()
185 ND_PRINT((ndo, " Hold time: ")); in pimv1_join_prune_print()
186 unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2])); in pimv1_join_prune_print()
187 if (ndo->ndo_vflag < 2) in pimv1_join_prune_print()
206 ND_PRINT((ndo, "\n\tGroup: %s", ipaddr_string(ndo, bp))); in pimv1_join_prune_print()
213 ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[0]))); in pimv1_join_prune_print()
221 ND_PRINT((ndo, " joined: %d pruned: %d", njoin, nprune)); in pimv1_join_prune_print()
234 ND_PRINT((ndo, "\n\t%s %s%s%s%s/%d", type, in pimv1_join_prune_print()
238 ipaddr_string(ndo, &bp[2]), in pimv1_join_prune_print()
246 ND_PRINT((ndo, "[|pim]")); in pimv1_join_prune_print()
251 pimv1_print(netdissect_options *ndo, in pimv1_print() argument
259 ND_PRINT((ndo, " %s", tok2str(pimv1_type_str, "[type %u]", type))); in pimv1_print()
265 ND_PRINT((ndo, " Dense-mode")); in pimv1_print()
268 ND_PRINT((ndo, " Sparse-mode")); in pimv1_print()
271 ND_PRINT((ndo, " Sparse-Dense-mode")); in pimv1_print()
274 ND_PRINT((ndo, " mode-%d", bp[8] >> 4)); in pimv1_print()
278 if (ndo->ndo_vflag) { in pimv1_print()
280 ND_PRINT((ndo, " (Hold-time ")); in pimv1_print()
281 unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[10])); in pimv1_print()
282 ND_PRINT((ndo, ")")); in pimv1_print()
288 ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[20]), in pimv1_print()
289 ipaddr_string(ndo, &bp[24]))); in pimv1_print()
293 ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[8]), in pimv1_print()
294 ipaddr_string(ndo, &bp[12]))); in pimv1_print()
297 if (ndo->ndo_vflag) { in pimv1_print()
299 ND_PRINT((ndo, " group %s", ipaddr_string(ndo, &bp[8]))); in pimv1_print()
301 ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[12]))); in pimv1_print()
302 ND_PRINT((ndo, " RP %s hold ", ipaddr_string(ndo, &bp[16]))); in pimv1_print()
303 unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[22])); in pimv1_print()
308 ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[16]), in pimv1_print()
309 ipaddr_string(ndo, &bp[8]))); in pimv1_print()
311 ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[12]))); in pimv1_print()
313 ND_PRINT((ndo, " %s pref %d metric %d", in pimv1_print()
321 if (ndo->ndo_vflag) { in pimv1_print()
324 pimv1_join_prune_print(ndo, &bp[8], len - 8); in pimv1_print()
330 ND_PRINT((ndo, " [v%d]", bp[4] >> 4)); in pimv1_print()
334 ND_PRINT((ndo, "[|pim]")); in pimv1_print()
345 cisco_autorp_print(netdissect_options *ndo, in cisco_autorp_print() argument
355 ND_PRINT((ndo, " auto-rp ")); in cisco_autorp_print()
359 ND_PRINT((ndo, "candidate-advert")); in cisco_autorp_print()
362 ND_PRINT((ndo, "mapping")); in cisco_autorp_print()
365 ND_PRINT((ndo, "type-0x%02x", type)); in cisco_autorp_print()
373 ND_PRINT((ndo, " Hold ")); in cisco_autorp_print()
376 unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2])); in cisco_autorp_print()
378 ND_PRINT((ndo, "FOREVER")); in cisco_autorp_print()
404 ND_PRINT((ndo, " RP %s", ipaddr_string(ndo, bp))); in cisco_autorp_print()
411 case 0: ND_PRINT((ndo, " PIMv?")); in cisco_autorp_print()
413 case 1: ND_PRINT((ndo, " PIMv1")); in cisco_autorp_print()
415 case 2: ND_PRINT((ndo, " PIMv2")); in cisco_autorp_print()
417 case 3: ND_PRINT((ndo, " PIMv1+2")); in cisco_autorp_print()
421 ND_PRINT((ndo, " [rsvd=0x%02x]", bp[0] & 0xfc)); in cisco_autorp_print()
435 ND_PRINT((ndo, "%c%s%s/%d", s, bp[0] & 1 ? "!" : "", in cisco_autorp_print()
436 ipaddr_string(ndo, &bp[2]), bp[1])); in cisco_autorp_print()
438 ND_PRINT((ndo, " bidir")); in cisco_autorp_print()
441 ND_PRINT((ndo, "[rsvd=0x%02x]", bp[0] & 0xfc)); in cisco_autorp_print()
450 ND_PRINT((ndo, "[|autorp]")); in cisco_autorp_print()
455 pim_print(netdissect_options *ndo, in pim_print() argument
467 if (!ndo->ndo_vflag) { in pim_print()
468 ND_PRINT((ndo, "PIMv%u, %s, length %u", in pim_print()
474 ND_PRINT((ndo, "PIMv%u, length %u\n\t%s", in pim_print()
478 pimv2_print(ndo, bp, len, bp2); in pim_print()
482 ND_PRINT((ndo, "PIMv%u, length %u", in pim_print()
490 ND_PRINT((ndo, "[|pim]")); in pim_print()
559 pimv2_addr_print(netdissect_options *ndo, in pimv2_addr_print() argument
609 ND_PRINT((ndo, "%s", ipaddr_string(ndo, bp))); in pimv2_addr_print()
613 ND_PRINT((ndo, "%s", ip6addr_string(ndo, bp))); in pimv2_addr_print()
623 ND_PRINT((ndo, "%s", ipaddr_string(ndo, bp + 2))); in pimv2_addr_print()
625 ND_PRINT((ndo, "/%u", bp[1])); in pimv2_addr_print()
630 ND_PRINT((ndo, "%s", ip6addr_string(ndo, bp + 2))); in pimv2_addr_print()
632 ND_PRINT((ndo, "/%u", bp[1])); in pimv2_addr_print()
637 ND_PRINT((ndo, "(0x%02x)", bp[0])); in pimv2_addr_print()
639 ND_PRINT((ndo, "(%s%s%s", in pimv2_addr_print()
644 ND_PRINT((ndo, "+0x%02x", bp[0] & 0xf8)); in pimv2_addr_print()
646 ND_PRINT((ndo, ")")); in pimv2_addr_print()
664 pimv2_check_checksum(netdissect_options *ndo, const u_char *bp, in pimv2_check_checksum() argument
686 cksum = nextproto6_cksum(ndo, ip6, bp, len, len, IPPROTO_PIM); in pimv2_check_checksum()
694 pimv2_print(netdissect_options *ndo, in pimv2_print() argument
707 ND_PRINT((ndo, ", RFC2117-encoding")); in pimv2_print()
712 ND_PRINT((ndo, ", cksum 0x%04x ", EXTRACT_16BITS(&pim->pim_cksum))); in pimv2_print()
714 ND_PRINT((ndo, "(unverified)")); in pimv2_print()
721 cksum_status = pimv2_check_checksum(ndo, bp, bp2, 8); in pimv2_print()
729 cksum_status = pimv2_check_checksum(ndo, bp, bp2, len); in pimv2_print()
735 cksum_status = pimv2_check_checksum(ndo, bp, bp2, len); in pimv2_print()
740 ND_PRINT((ndo, "(correct)")); in pimv2_print()
744 ND_PRINT((ndo, "(incorrect)")); in pimv2_print()
748 ND_PRINT((ndo, "(unverified)")); in pimv2_print()
765 ND_PRINT((ndo, "\n\t %s Option (%u), length %u, Value: ", in pimv2_print()
778 ND_PRINT((ndo, "ERROR: Option Length != 2 Bytes (%u)", olen)); in pimv2_print()
780 unsigned_relts_print(ndo, EXTRACT_16BITS(bp)); in pimv2_print()
786 ND_PRINT((ndo, "ERROR: Option Length != 4 Bytes (%u)", olen)); in pimv2_print()
794 ND_PRINT((ndo, "\n\t T-bit=%d, LAN delay %dms, Override interval %dms", in pimv2_print()
803 ND_PRINT((ndo, "Bi-Directional Capability (Old)")); in pimv2_print()
806 ND_PRINT((ndo, "%u", EXTRACT_32BITS(bp))); in pimv2_print()
809 ND_PRINT((ndo, "ERROR: Option Length != 4 Bytes (%u)", olen)); in pimv2_print()
816 ND_PRINT((ndo, "ERROR: Option Length != 4 Bytes (%u)", olen)); in pimv2_print()
818 ND_PRINT((ndo, "0x%08x", EXTRACT_32BITS(bp))); in pimv2_print()
824 ND_PRINT((ndo, "ERROR: Option Length != 4 Bytes (%u)", olen)); in pimv2_print()
826 ND_PRINT((ndo, "v%d", *bp)); in pimv2_print()
828 ND_PRINT((ndo, ", interval ")); in pimv2_print()
829 unsigned_relts_print(ndo, *(bp+1)); in pimv2_print()
832 ND_PRINT((ndo, " ?0x%04x?", EXTRACT_16BITS(bp+2))); in pimv2_print()
842 if (ndo->ndo_vflag > 1) { in pimv2_print()
846 ND_PRINT((ndo, "\n\t ")); in pimv2_print()
847 advance = pimv2_addr_print(ndo, ptr, plen, pimv2_unicast, pimv2_addr_len, 0); in pimv2_print()
856 if (ndo->ndo_vflag <= 1) in pimv2_print()
857 print_unknown_data(ndo, bp, "\n\t ", olen); in pimv2_print()
861 if (ndo->ndo_vflag> 1) in pimv2_print()
862 print_unknown_data(ndo, bp, "\n\t ", olen); in pimv2_print()
877 ND_PRINT((ndo, ", Flags [ %s ]\n\t", in pimv2_print()
891 ND_PRINT((ndo, "IP-Null-header %s > %s", in pimv2_print()
892 ipaddr_string(ndo, &ip->ip_src), in pimv2_print()
893 ipaddr_string(ndo, &ip->ip_dst))); in pimv2_print()
897 ip_print(ndo, bp, len); in pimv2_print()
901 ip6_print(ndo, bp, len); in pimv2_print()
905 ND_PRINT((ndo, "IP ver %d", IP_V(ip))); in pimv2_print()
912 ND_PRINT((ndo, " group=")); in pimv2_print()
913 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_group, pimv2_addr_len, 0)) < 0) in pimv2_print()
916 ND_PRINT((ndo, " source=")); in pimv2_print()
917 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_unicast, pimv2_addr_len, 0)) < 0) in pimv2_print()
970 ND_PRINT((ndo, ", upstream-neighbor: ")); in pimv2_print()
971 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_unicast, pimv2_addr_len, 0)) < 0) in pimv2_print()
980 ND_PRINT((ndo, "\n\t %u group(s)", ngroup)); in pimv2_print()
982 ND_PRINT((ndo, ", holdtime: ")); in pimv2_print()
984 ND_PRINT((ndo, "infinite")); in pimv2_print()
986 unsigned_relts_print(ndo, holdtime); in pimv2_print()
990 ND_PRINT((ndo, "\n\t group #%u: ", i+1)); in pimv2_print()
991 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_group, pimv2_addr_len, 0)) < 0) in pimv2_print()
999 ND_PRINT((ndo, ", joined sources: %u, pruned sources: %u", njoin, nprune)); in pimv2_print()
1002 ND_PRINT((ndo, "\n\t joined source #%u: ", j+1)); in pimv2_print()
1003 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_source, pimv2_addr_len, 0)) < 0) in pimv2_print()
1008 ND_PRINT((ndo, "\n\t pruned source #%u: ", j+1)); in pimv2_print()
1009 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_source, pimv2_addr_len, 0)) < 0) in pimv2_print()
1025 ND_PRINT((ndo, " tag=%x", EXTRACT_16BITS(bp))); in pimv2_print()
1031 ND_PRINT((ndo, " hashmlen=%d", bp[0])); in pimv2_print()
1035 ND_PRINT((ndo, " BSRprio=%d", bp[1])); in pimv2_print()
1040 ND_PRINT((ndo, " BSR=")); in pimv2_print()
1041 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_unicast, pimv2_addr_len, 0)) < 0) in pimv2_print()
1048 ND_PRINT((ndo, " (group%d: ", i)); in pimv2_print()
1049 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_group, pimv2_addr_len, 0)) < 0) in pimv2_print()
1058 ND_PRINT((ndo, " RPcnt=%d", bp[0])); in pimv2_print()
1062 ND_PRINT((ndo, " FRPcnt=%d", frpcnt = bp[1])); in pimv2_print()
1070 ND_PRINT((ndo, " RP%d=", j)); in pimv2_print()
1071 if ((advance = pimv2_addr_print(ndo, bp, len, in pimv2_print()
1082 ND_PRINT((ndo, ",holdtime=")); in pimv2_print()
1083 unsigned_relts_print(ndo, EXTRACT_16BITS(bp)); in pimv2_print()
1087 ND_PRINT((ndo, ",prio=%d", bp[2])); in pimv2_print()
1093 ND_PRINT((ndo, ")")); in pimv2_print()
1098 ND_PRINT((ndo, " group=")); in pimv2_print()
1099 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_group, pimv2_addr_len, 0)) < 0) in pimv2_print()
1102 ND_PRINT((ndo, " src=")); in pimv2_print()
1103 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_unicast, pimv2_addr_len, 0)) < 0) in pimv2_print()
1110 ND_PRINT((ndo, " RPT")); in pimv2_print()
1111 ND_PRINT((ndo, " pref=%u", EXTRACT_32BITS(&bp[0]) & 0x7fffffff)); in pimv2_print()
1112 ND_PRINT((ndo, " metric=%u", EXTRACT_32BITS(&bp[4]))); in pimv2_print()
1123 ND_PRINT((ndo, " prefix-cnt=%d", bp[0])); in pimv2_print()
1128 ND_PRINT((ndo, " prio=%d", bp[1])); in pimv2_print()
1132 ND_PRINT((ndo, " holdtime=")); in pimv2_print()
1133 unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2])); in pimv2_print()
1138 ND_PRINT((ndo, " RP=")); in pimv2_print()
1139 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_unicast, pimv2_addr_len, 0)) < 0) in pimv2_print()
1146 ND_PRINT((ndo, " Group%d=", i)); in pimv2_print()
1147 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_group, pimv2_addr_len, 0)) < 0) in pimv2_print()
1156 ND_PRINT((ndo, " src=")); in pimv2_print()
1157 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_unicast, pimv2_addr_len, 0)) < 0) in pimv2_print()
1161 ND_PRINT((ndo, " grp=")); in pimv2_print()
1162 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_group, pimv2_addr_len, 0)) < 0) in pimv2_print()
1166 ND_PRINT((ndo, " forwarder=")); in pimv2_print()
1167 if ((advance = pimv2_addr_print(ndo, bp, len, pimv2_unicast, pimv2_addr_len, 0)) < 0) in pimv2_print()
1174 ND_PRINT((ndo, " TUNR ")); in pimv2_print()
1175 unsigned_relts_print(ndo, EXTRACT_16BITS(bp)); in pimv2_print()
1180 ND_PRINT((ndo, " [type %d]", PIM_TYPE(pim->pim_typever))); in pimv2_print()
1187 ND_PRINT((ndo, "[|pim]")); in pimv2_print()