Home | History | Annotate | Download | only in tcpdump

Lines Matching refs:bp

74 ip6_sopt_print(const u_char *bp, int len)
80 if (bp[i] == IP6OPT_PAD1)
84 optlen = bp[i + 1] + 2;
91 switch (bp[i]) {
107 printf(", ui: 0x%04x ", EXTRACT_16BITS(&bp[i + 2]));
114 printf(", alt-CoA: %s", ip6addr_string(&bp[i+2]));
121 printf(", auth spi: 0x%08x", EXTRACT_32BITS(&bp[i + 2]));
125 printf(", sopt_type %d: trunc)", bp[i]);
128 printf(", sopt_type 0x%02x: len=%d", bp[i], bp[i + 1]);
139 ip6_opt_print(const u_char *bp, int len)
145 if (bp[i] == IP6OPT_PAD1)
149 optlen = bp[i + 1] + 2;
156 switch (bp[i]) {
172 if (bp[i + 1] != IP6OPT_RTALERT_LEN - 2) {
173 printf("(rtalert: invalid len %d)", bp[i + 1]);
176 printf("(rtalert: 0x%04x) ", EXTRACT_16BITS(&bp[i + 2]));
183 if (bp[i + 1] != IP6OPT_JUMBO_LEN - 2) {
184 printf("(jumbo: invalid len %d)", bp[i + 1]);
187 printf("(jumbo: %u) ", EXTRACT_32BITS(&bp[i + 2]));
194 if (bp[i + 1] < IP6OPT_HOMEADDR_MINLEN - 2) {
195 printf("(homeaddr: invalid len %d)", bp[i + 1]);
198 printf("(homeaddr: %s", ip6addr_string(&bp[i + 2]));
199 if (bp[i + 1] > IP6OPT_HOMEADDR_MINLEN - 2) {
200 ip6_sopt_print(&bp[i + IP6OPT_HOMEADDR_MINLEN],
210 if (bp[i + 1] < IP6OPT_BU_MINLEN - 2) {
211 printf("(bu: invalid len %d)", bp[i + 1]);
215 if (bp[i + 2] & 0x80)
217 if (bp[i + 2] & 0x40)
219 if (bp[i + 2] & 0x20)
221 if (bp[i + 2] & 0x10)
223 if ((bp[i + 2] & 0x0f) || bp[i + 3] || bp[i + 4])
225 printf(", sequence: %u", bp[i + 5]);
226 printf(", lifetime: %u", EXTRACT_32BITS(&bp[i + 6]));
228 if (bp[i + 1] > IP6OPT_BU_MINLEN - 2) {
229 ip6_sopt_print(&bp[i + IP6OPT_BU_MINLEN],
239 if (bp[i + 1] < IP6OPT_BA_MINLEN - 2) {
240 printf("(ba: invalid len %d)", bp[i + 1]);
244 printf("status: %u", bp[i + 2]);
245 if (bp[i + 3])
247 printf(", sequence: %u", bp[i + 4]);
248 printf(", lifetime: %u", EXTRACT_32BITS(&bp[i + 5]));
249 printf(", refresh: %u", EXTRACT_32BITS(&bp[i + 9]));
251 if (bp[i + 1] > IP6OPT_BA_MINLEN - 2) {
252 ip6_sopt_print(&bp[i + IP6OPT_BA_MINLEN],
263 if (bp[i + 1] > IP6OPT_BR_MINLEN - 2) {
264 ip6_sopt_print(&bp[i + IP6OPT_BR_MINLEN],
271 printf("(type %d: trunc)", bp[i]);
274 printf("(opt_type 0x%02x: len=%d) ", bp[i], bp[i + 1]);
289 hbhopt_print(register const u_char *bp)
291 const struct ip6_hbh *dp = (struct ip6_hbh *)bp;
309 dstopt_print(register const u_char *bp)
311 const struct ip6_dest *dp = (struct ip6_dest *)bp;