Lines Matching refs:tptr

97 	const u_char *tptr;  in cdp_print()  local
104 tptr = pptr; /* temporary pointer */ in cdp_print()
106 ND_TCHECK2(*tptr, CDP_HEADER_LEN); in cdp_print()
107 ND_PRINT((ndo, "CDPv%u, ttl: %us", *(tptr + CDP_HEADER_VERSION_OFFSET), in cdp_print()
108 *(tptr + CDP_HEADER_TTL_OFFSET))); in cdp_print()
110 …ND_PRINT((ndo, ", checksum: 0x%04x (unverified), length %u", EXTRACT_16BITS(tptr+CDP_HEADER_CHECKS… in cdp_print()
111 tptr += CDP_HEADER_LEN; in cdp_print()
113 while (tptr < (pptr+length)) { in cdp_print()
114 ND_TCHECK2(*tptr, CDP_TLV_HEADER_LEN); /* read out Type and Length */ in cdp_print()
115 type = EXTRACT_16BITS(tptr+CDP_TLV_TYPE_OFFSET); in cdp_print()
116 …len = EXTRACT_16BITS(tptr+CDP_TLV_LEN_OFFSET); /* object length includes the 4 bytes header lengt… in cdp_print()
130 tptr += CDP_TLV_HEADER_LEN; in cdp_print()
133 ND_TCHECK2(*tptr, len); in cdp_print()
150 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
154 if (cdp_print_addr(ndo, tptr, len) < 0) in cdp_print()
159 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
166 EXTRACT_32BITS(tptr), in cdp_print()
167 bittok2str(cdp_capability_values, "none", EXTRACT_32BITS(tptr)))); in cdp_print()
172 j = *(tptr+i); in cdp_print()
180 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
184 if (cdp_print_prefixes(ndo, tptr, len) < 0) in cdp_print()
191 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
197 ND_PRINT((ndo, "%d", EXTRACT_16BITS(tptr))); in cdp_print()
202 ND_PRINT((ndo, "%s", *(tptr) ? "full": "half")); in cdp_print()
211 ND_PRINT((ndo, "app %d, vlan %d", *(tptr), EXTRACT_16BITS(tptr + 1))); in cdp_print()
214 ND_PRINT((ndo, "%1.2fW", cdp_get_number(tptr, len) / 1000.0)); in cdp_print()
219 ND_PRINT((ndo, "%u bytes", EXTRACT_32BITS(tptr))); in cdp_print()
224 ND_PRINT((ndo, "0x%02x", *(tptr))); in cdp_print()
229 ND_PRINT((ndo, "0x%02x", *(tptr))); in cdp_print()
233 (void)fn_printn(ndo, tptr, len, NULL); in cdp_print()
237 if (cdp_print_addr(ndo, tptr, len) < 0) in cdp_print()
243 ND_PRINT((ndo, "0x%02x", *(tptr))); in cdp_print()
246 (void)fn_printn(ndo, tptr + 1, len - 1, NULL); in cdp_print()
250 print_unknown_data(ndo, tptr, "\n\t ", len); in cdp_print()
254 tptr = tptr+len; in cdp_print()