Home | History | Annotate | Download | only in tcpdump

Lines Matching refs: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))
133 printf(", Device-ID '%.*s'", len, tptr);
135 printf("'%.*s'", len, tptr);
138 if (cdp_print_addr(tptr, len) < 0)
142 printf("'%.*s'", len, tptr);
146 EXTRACT_32BITS(tptr),
147 bittok2str(cdp_capability_values, "none",EXTRACT_32BITS(tptr)));
152 j = *(tptr+i);
159 printf("'%.*s'", len, tptr);
162 if (cdp_print_prefixes(tptr, len) < 0)
168 printf("'%.*s'", len,tptr);
171 printf("%d",EXTRACT_16BITS(tptr));
174 printf("%s", *(tptr) ? "full": "half");
182 *(tptr), EXTRACT_16BITS(tptr+1));
186 cdp_get_number(tptr, len)/1000.0 );
189 printf("%u bytes", EXTRACT_32BITS(tptr));
192 printf("0x%02x", *(tptr) );
195 printf("0x%02x", *(tptr));
198 printf("'%.*s'", len, tptr);
201 if (cdp_print_addr(tptr, len) < 0)
205 printf("0x%02x/%.*s", *(tptr), len - 1, tptr + 1 );
208 print_unknown_data(tptr,"\n\t ",len);
215 tptr = tptr+len;