Lines Matching refs:bp

285 	register const struct bootp *bp;  in bootp_print()  local
289 bp = (const struct bootp *)cp; in bootp_print()
290 ND_TCHECK(bp->bp_op); in bootp_print()
293 tok2str(bootp_op_values, "unknown (0x%02x)", bp->bp_op))); in bootp_print()
295 if (bp->bp_htype == 1 && bp->bp_hlen == 6 && bp->bp_op == BOOTPREQUEST) { in bootp_print()
296 ND_TCHECK2(bp->bp_chaddr[0], 6); in bootp_print()
297 ND_PRINT((ndo, " from %s", etheraddr_string(ndo, bp->bp_chaddr))); in bootp_print()
305 ND_TCHECK(bp->bp_secs); in bootp_print()
308 if (bp->bp_htype != 1) in bootp_print()
309 ND_PRINT((ndo, ", htype %d", bp->bp_htype)); in bootp_print()
312 if (bp->bp_htype != 1 || bp->bp_hlen != 6) in bootp_print()
313 ND_PRINT((ndo, ", hlen %d", bp->bp_hlen)); in bootp_print()
316 if (bp->bp_hops) in bootp_print()
317 ND_PRINT((ndo, ", hops %d", bp->bp_hops)); in bootp_print()
318 if (EXTRACT_32BITS(&bp->bp_xid)) in bootp_print()
319 ND_PRINT((ndo, ", xid 0x%x", EXTRACT_32BITS(&bp->bp_xid))); in bootp_print()
320 if (EXTRACT_16BITS(&bp->bp_secs)) in bootp_print()
321 ND_PRINT((ndo, ", secs %d", EXTRACT_16BITS(&bp->bp_secs))); in bootp_print()
324 bittok2str(bootp_flag_values, "none", EXTRACT_16BITS(&bp->bp_flags)))); in bootp_print()
326 ND_PRINT((ndo, " (0x%04x)", EXTRACT_16BITS(&bp->bp_flags))); in bootp_print()
329 ND_TCHECK(bp->bp_ciaddr); in bootp_print()
330 if (EXTRACT_32BITS(&bp->bp_ciaddr.s_addr)) in bootp_print()
331 ND_PRINT((ndo, "\n\t Client-IP %s", ipaddr_string(ndo, &bp->bp_ciaddr))); in bootp_print()
334 ND_TCHECK(bp->bp_yiaddr); in bootp_print()
335 if (EXTRACT_32BITS(&bp->bp_yiaddr.s_addr)) in bootp_print()
336 ND_PRINT((ndo, "\n\t Your-IP %s", ipaddr_string(ndo, &bp->bp_yiaddr))); in bootp_print()
339 ND_TCHECK(bp->bp_siaddr); in bootp_print()
340 if (EXTRACT_32BITS(&bp->bp_siaddr.s_addr)) in bootp_print()
341 ND_PRINT((ndo, "\n\t Server-IP %s", ipaddr_string(ndo, &bp->bp_siaddr))); in bootp_print()
344 ND_TCHECK(bp->bp_giaddr); in bootp_print()
345 if (EXTRACT_32BITS(&bp->bp_giaddr.s_addr)) in bootp_print()
346 ND_PRINT((ndo, "\n\t Gateway-IP %s", ipaddr_string(ndo, &bp->bp_giaddr))); in bootp_print()
349 if (bp->bp_htype == 1 && bp->bp_hlen == 6) { in bootp_print()
350 ND_TCHECK2(bp->bp_chaddr[0], 6); in bootp_print()
351 ND_PRINT((ndo, "\n\t Client-Ethernet-Address %s", etheraddr_string(ndo, bp->bp_chaddr))); in bootp_print()
354 ND_TCHECK2(bp->bp_sname[0], 1); /* check first char only */ in bootp_print()
355 if (*bp->bp_sname) { in bootp_print()
357 if (fn_print(ndo, bp->bp_sname, ndo->ndo_snapend)) { in bootp_print()
364 ND_TCHECK2(bp->bp_file[0], 1); /* check first char only */ in bootp_print()
365 if (*bp->bp_file) { in bootp_print()
367 if (fn_print(ndo, bp->bp_file, ndo->ndo_snapend)) { in bootp_print()
376 ND_TCHECK(bp->bp_vend[0]); in bootp_print()
377 if (memcmp((const char *)bp->bp_vend, vm_rfc1048, in bootp_print()
379 rfc1048_print(ndo, bp->bp_vend); in bootp_print()
380 else if (memcmp((const char *)bp->bp_vend, vm_cmu, in bootp_print()
382 cmu_print(ndo, bp->bp_vend); in bootp_print()
386 ul = EXTRACT_32BITS(&bp->bp_vend); in bootp_print()
590 register const u_char *bp) in rfc1048_print() argument
604 ND_PRINT((ndo, "\n\t Magic Cookie 0x%08x", EXTRACT_32BITS(bp))); in rfc1048_print()
605 bp += sizeof(int32_t); in rfc1048_print()
608 while (ND_TTEST2(*bp, 1)) { in rfc1048_print()
609 tag = *bp++; in rfc1048_print()
615 ND_TCHECK2(*(bp + 1), 2); in rfc1048_print()
616 tag = EXTRACT_16BITS(bp + 1); in rfc1048_print()
630 ND_TCHECK2(*bp, 1); in rfc1048_print()
631 len = *bp++; in rfc1048_print()
639 while (ND_TTEST2(*bp, 1) && *bp == TAG_PAD) { in rfc1048_print()
640 bp++; in rfc1048_print()
647 if (!ND_TTEST2(*bp, len)) { in rfc1048_print()
653 uc = *bp++; in rfc1048_print()
661 uc = *bp++; in rfc1048_print()
677 us = EXTRACT_16BITS(bp); in rfc1048_print()
678 bp += 2; in rfc1048_print()
704 if (fn_printn(ndo, bp, len, ndo->ndo_snapend)) { in rfc1048_print()
709 bp += len; in rfc1048_print()
720 ul = EXTRACT_32BITS(bp); in rfc1048_print()
728 bp += sizeof(ul); in rfc1048_print()
739 memcpy((char *)&ul, (const char *)bp, sizeof(ul)); in rfc1048_print()
741 bp += sizeof(ul); in rfc1048_print()
742 memcpy((char *)&ul, (const char *)bp, sizeof(ul)); in rfc1048_print()
744 bp += sizeof(ul); in rfc1048_print()
755 us = EXTRACT_16BITS(bp); in rfc1048_print()
757 bp += sizeof(us); in rfc1048_print()
768 switch (*bp) { in rfc1048_print()
776 ND_PRINT((ndo, "%u?", *bp)); in rfc1048_print()
779 ++bp; in rfc1048_print()
793 ND_PRINT((ndo, "%02x", *bp)); in rfc1048_print()
795 ND_PRINT((ndo, "%u", *bp)); in rfc1048_print()
796 ++bp; in rfc1048_print()
812 tag = *bp++; in rfc1048_print()
823 tag = *bp++; in rfc1048_print()
832 bp += len; in rfc1048_print()
836 if (*bp) in rfc1048_print()
837 ND_PRINT((ndo, "[%s] ", client_fqdn_flags(*bp))); in rfc1048_print()
838 bp++; in rfc1048_print()
839 if (*bp || *(bp+1)) in rfc1048_print()
840 ND_PRINT((ndo, "%u/%u ", *bp, *(bp+1))); in rfc1048_print()
841 bp += 2; in rfc1048_print()
843 if (fn_printn(ndo, bp, len - 3, ndo->ndo_snapend)) { in rfc1048_print()
848 bp += len - 3; in rfc1048_print()
861 type = *bp++; in rfc1048_print()
865 if (fn_printn(ndo, bp, len, ndo->ndo_snapend)) { in rfc1048_print()
870 bp += len; in rfc1048_print()
878 ND_PRINT((ndo, "%02x", *bp)); in rfc1048_print()
879 ++bp; in rfc1048_print()
889 subopt = *bp++; in rfc1048_print()
890 suboptlen = *bp++; in rfc1048_print()
897 bp += len; in rfc1048_print()
910 if (fn_printn(ndo, bp, suboptlen, ndo->ndo_snapend)) in rfc1048_print()
915 print_unknown_data(ndo, bp, "\n\t\t", suboptlen); in rfc1048_print()
919 bp += suboptlen; in rfc1048_print()
931 bp += len; in rfc1048_print()
938 mask_width = *bp++; in rfc1048_print()
943 bp += len; in rfc1048_print()
951 bp += len; in rfc1048_print()
962 ND_PRINT((ndo, "%d", *bp++)); in rfc1048_print()
968 memcpy((char *)&ul, (const char *)bp, sizeof(ul)); in rfc1048_print()
970 bp += sizeof(ul); in rfc1048_print()
984 bp += len; in rfc1048_print()
989 suboptlen = *bp++; in rfc1048_print()
995 bp += len; in rfc1048_print()
1001 bp += len; in rfc1048_print()
1006 if (fn_printn(ndo, bp, suboptlen, ndo->ndo_snapend)) { in rfc1048_print()
1014 bp += suboptlen; in rfc1048_print()
1022 bp += len; in rfc1048_print()
1031 bp += len; in rfc1048_print()
1041 register const u_char *bp) in cmu_print() argument
1050 cmu = (const struct cmu_vend *)bp; in cmu_print()