Lines Matching defs:tptr
92 const u_char *tptr;
99 tptr = pptr; /* temporary pointer */
101 if (!TTEST2(*tptr, CDP_HEADER_LEN))
103 printf("CDPv%u, ttl: %us", *tptr, *(tptr+1));
105 printf(", checksum: %u (unverified), length %u", EXTRACT_16BITS(tptr), length);
106 tptr += CDP_HEADER_LEN;
108 while (tptr < (pptr+length)) {
110 if (!TTEST2(*tptr, 4)) /* read out Type and Length */
112 type = EXTRACT_16BITS(tptr);
113 len = EXTRACT_16BITS(tptr+2); /* object length includes the 4 bytes header length */
114 tptr += 4;
117 if (!TTEST2(*tptr, len))
135 fn_printn(tptr, len, NULL);
139 if (cdp_print_addr(tptr, len) < 0)
144 fn_printn(tptr, len, NULL);
149 EXTRACT_32BITS(tptr),
150 bittok2str(cdp_capability_values, "none",EXTRACT_32BITS(tptr)));
155 j = *(tptr+i);
163 fn_printn(tptr, len, NULL);
167 if (cdp_print_prefixes(tptr, len) < 0)
174 fn_printn(tptr, len, NULL);
178 printf("%d",EXTRACT_16BITS(tptr));
181 printf("%s", *(tptr) ? "full": "half");
189 *(tptr), EXTRACT_16BITS(tptr+1));
193 cdp_get_number(tptr, len)/1000.0 );
196 printf("%u bytes", EXTRACT_32BITS(tptr));
199 printf("0x%02x", *(tptr) );
202 printf("0x%02x", *(tptr));
206 fn_printn(tptr, len, NULL);
210 if (cdp_print_addr(tptr, len) < 0)
214 printf("0x%02x", *(tptr));
217 fn_printn(tptr + 1, len - 1, NULL);
221 print_unknown_data(tptr,"\n\t ",len);
228 tptr = tptr+len;