Lines Matching refs:ndo
98 cdp_print(netdissect_options *ndo, in cdp_print() argument
105 ND_PRINT((ndo, "%s", tstr)); in cdp_print()
112 ND_PRINT((ndo, "CDPv%u, ttl: %us", *(tptr + CDP_HEADER_VERSION_OFFSET), in cdp_print()
114 if (ndo->ndo_vflag) in cdp_print()
115 …ND_PRINT((ndo, ", checksum: 0x%04x (unverified), length %u", EXTRACT_16BITS(tptr+CDP_HEADER_CHECKS… in cdp_print()
123 if (ndo->ndo_vflag) in cdp_print()
124 ND_PRINT((ndo, "\n\t%s (0x%02x), TLV length: %u byte%s (too short)", in cdp_print()
130 ND_PRINT((ndo, ", %s TLV length %u too short", in cdp_print()
140 if (ndo->ndo_vflag || type == 1) { /* in non-verbose mode just print Device-ID */ in cdp_print()
142 if (ndo->ndo_vflag) in cdp_print()
143 ND_PRINT((ndo, "\n\t%s (0x%02x), value length: %u byte%s: ", in cdp_print()
152 if (!ndo->ndo_vflag) in cdp_print()
153 ND_PRINT((ndo, ", Device-ID ")); in cdp_print()
154 ND_PRINT((ndo, "'")); in cdp_print()
155 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
156 ND_PRINT((ndo, "'")); in cdp_print()
159 if (cdp_print_addr(ndo, tptr, len) < 0) in cdp_print()
163 ND_PRINT((ndo, "'")); in cdp_print()
164 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
165 ND_PRINT((ndo, "'")); in cdp_print()
170 ND_PRINT((ndo, "(0x%08x): %s", in cdp_print()
175 ND_PRINT((ndo, "\n\t ")); in cdp_print()
178 ND_PRINT((ndo, "%c", j)); in cdp_print()
180 ND_PRINT((ndo, "\t ")); in cdp_print()
184 ND_PRINT((ndo, "'")); in cdp_print()
185 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
186 ND_PRINT((ndo, "'")); in cdp_print()
189 if (cdp_print_prefixes(ndo, tptr, len) < 0) in cdp_print()
195 ND_PRINT((ndo, "'")); in cdp_print()
196 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
197 ND_PRINT((ndo, "'")); in cdp_print()
202 ND_PRINT((ndo, "%d", EXTRACT_16BITS(tptr))); in cdp_print()
207 ND_PRINT((ndo, "%s", *(tptr) ? "full": "half")); in cdp_print()
216 ND_PRINT((ndo, "app %d, vlan %d", *(tptr), EXTRACT_16BITS(tptr + 1))); in cdp_print()
219 ND_PRINT((ndo, "%1.2fW", cdp_get_number(tptr, len) / 1000.0)); in cdp_print()
224 ND_PRINT((ndo, "%u bytes", EXTRACT_32BITS(tptr))); in cdp_print()
229 ND_PRINT((ndo, "0x%02x", *(tptr))); in cdp_print()
234 ND_PRINT((ndo, "0x%02x", *(tptr))); in cdp_print()
237 ND_PRINT((ndo, "'")); in cdp_print()
238 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
239 ND_PRINT((ndo, "'")); in cdp_print()
242 if (cdp_print_addr(ndo, tptr, len) < 0) in cdp_print()
248 ND_PRINT((ndo, "0x%02x", *(tptr))); in cdp_print()
250 ND_PRINT((ndo, "/")); in cdp_print()
251 (void)fn_printn(ndo, tptr + 1, len - 1, NULL); in cdp_print()
255 print_unknown_data(ndo, tptr, "\n\t ", len); in cdp_print()
261 if (ndo->ndo_vflag < 1) in cdp_print()
262 ND_PRINT((ndo, ", length %u", caplen)); in cdp_print()
266 ND_PRINT((ndo, "%s", tstr)); in cdp_print()
281 cdp_print_addr(netdissect_options *ndo, in cdp_print_addr() argument
322 ND_PRINT((ndo, "IPv4 (%u) %s", num, ipaddr_string(ndo, p))); in cdp_print_addr()
339 ND_PRINT((ndo, "IPv6 (%u) %s", num, ip6addr_string(ndo, p))); in cdp_print_addr()
350 ND_PRINT((ndo, "pt=0x%02x, pl=%d, pb=", *(p - 2), pl)); in cdp_print_addr()
352 ND_PRINT((ndo, " %02x", *p++)); in cdp_print_addr()
357 ND_PRINT((ndo, ", al=%d, a=", al)); in cdp_print_addr()
363 ND_PRINT((ndo, " %02x", *p++)); in cdp_print_addr()
367 ND_PRINT((ndo, " ")); in cdp_print_addr()
378 cdp_print_prefixes(netdissect_options *ndo, in cdp_print_prefixes() argument
384 ND_PRINT((ndo, " IPv4 Prefixes (%d):", l / 5)); in cdp_print_prefixes()
387 ND_PRINT((ndo, " %u.%u.%u.%u/%u", p[0], p[1], p[2], p[3], p[4])); in cdp_print_prefixes()