Lines Matching refs:bp
66 register const struct bootp *bp; in bootp_print() local
70 bp = (const struct bootp *)cp; in bootp_print()
71 TCHECK(bp->bp_op); in bootp_print()
74 tok2str(bootp_op_values, "unknown (0x%02x)", bp->bp_op)); in bootp_print()
76 if (bp->bp_htype == 1 && bp->bp_hlen == 6 && bp->bp_op == BOOTPREQUEST) { in bootp_print()
77 TCHECK2(bp->bp_chaddr[0], 6); in bootp_print()
78 printf(" from %s", etheraddr_string(bp->bp_chaddr)); in bootp_print()
86 TCHECK(bp->bp_secs); in bootp_print()
89 if (bp->bp_htype != 1) in bootp_print()
90 printf(", htype %d", bp->bp_htype); in bootp_print()
93 if (bp->bp_htype != 1 || bp->bp_hlen != 6) in bootp_print()
94 printf(", hlen %d", bp->bp_hlen); in bootp_print()
97 if (bp->bp_hops) in bootp_print()
98 printf(", hops %d", bp->bp_hops); in bootp_print()
99 if (EXTRACT_32BITS(&bp->bp_xid)) in bootp_print()
100 printf(", xid 0x%x", EXTRACT_32BITS(&bp->bp_xid)); in bootp_print()
101 if (EXTRACT_16BITS(&bp->bp_secs)) in bootp_print()
102 printf(", secs %d", EXTRACT_16BITS(&bp->bp_secs)); in bootp_print()
105 bittok2str(bootp_flag_values, "none", EXTRACT_16BITS(&bp->bp_flags))); in bootp_print()
107 printf(" (0x%04x)", EXTRACT_16BITS(&bp->bp_flags)); in bootp_print()
110 TCHECK(bp->bp_ciaddr); in bootp_print()
111 if (EXTRACT_32BITS(&bp->bp_ciaddr.s_addr)) in bootp_print()
112 printf("\n\t Client-IP %s", ipaddr_string(&bp->bp_ciaddr)); in bootp_print()
115 TCHECK(bp->bp_yiaddr); in bootp_print()
116 if (EXTRACT_32BITS(&bp->bp_yiaddr.s_addr)) in bootp_print()
117 printf("\n\t Your-IP %s", ipaddr_string(&bp->bp_yiaddr)); in bootp_print()
120 TCHECK(bp->bp_siaddr); in bootp_print()
121 if (EXTRACT_32BITS(&bp->bp_siaddr.s_addr)) in bootp_print()
122 printf("\n\t Server-IP %s", ipaddr_string(&bp->bp_siaddr)); in bootp_print()
125 TCHECK(bp->bp_giaddr); in bootp_print()
126 if (EXTRACT_32BITS(&bp->bp_giaddr.s_addr)) in bootp_print()
127 printf("\n\t Gateway-IP %s", ipaddr_string(&bp->bp_giaddr)); in bootp_print()
130 if (bp->bp_htype == 1 && bp->bp_hlen == 6) { in bootp_print()
131 TCHECK2(bp->bp_chaddr[0], 6); in bootp_print()
132 printf("\n\t Client-Ethernet-Address %s", etheraddr_string(bp->bp_chaddr)); in bootp_print()
135 TCHECK2(bp->bp_sname[0], 1); /* check first char only */ in bootp_print()
136 if (*bp->bp_sname) { in bootp_print()
138 if (fn_print(bp->bp_sname, snapend)) { in bootp_print()
145 TCHECK2(bp->bp_file[0], 1); /* check first char only */ in bootp_print()
146 if (*bp->bp_file) { in bootp_print()
148 if (fn_print(bp->bp_file, snapend)) { in bootp_print()
157 TCHECK(bp->bp_vend[0]); in bootp_print()
158 if (memcmp((const char *)bp->bp_vend, vm_rfc1048, in bootp_print()
160 rfc1048_print(bp->bp_vend); in bootp_print()
161 else if (memcmp((const char *)bp->bp_vend, vm_cmu, in bootp_print()
163 cmu_print(bp->bp_vend); in bootp_print()
167 ul = EXTRACT_32BITS(&bp->bp_vend); in bootp_print()
367 rfc1048_print(register const u_char *bp) in rfc1048_print() argument
381 printf("\n\t Magic Cookie 0x%08x", EXTRACT_32BITS(bp)); in rfc1048_print()
382 bp += sizeof(int32_t); in rfc1048_print()
385 while (TTEST2(*bp, 1)) { in rfc1048_print()
386 tag = *bp++; in rfc1048_print()
392 TCHECK2(*(bp + 1), 2); in rfc1048_print()
393 tag = EXTRACT_16BITS(bp + 1); in rfc1048_print()
407 TCHECK2(*bp, 1); in rfc1048_print()
408 len = *bp++; in rfc1048_print()
416 while (TTEST2(*bp, 1) && *bp == TAG_PAD) { in rfc1048_print()
417 bp++; in rfc1048_print()
424 if (!TTEST2(*bp, len)) { in rfc1048_print()
430 uc = *bp++; in rfc1048_print()
438 uc = *bp++; in rfc1048_print()
454 us = EXTRACT_16BITS(bp); in rfc1048_print()
455 bp += 2; in rfc1048_print()
481 if (fn_printn(bp, len, snapend)) { in rfc1048_print()
486 bp += len; in rfc1048_print()
497 ul = EXTRACT_32BITS(bp); in rfc1048_print()
505 bp += sizeof(ul); in rfc1048_print()
516 memcpy((char *)&ul, (const char *)bp, sizeof(ul)); in rfc1048_print()
518 bp += sizeof(ul); in rfc1048_print()
519 memcpy((char *)&ul, (const char *)bp, sizeof(ul)); in rfc1048_print()
521 bp += sizeof(ul); in rfc1048_print()
532 us = EXTRACT_16BITS(bp); in rfc1048_print()
534 bp += sizeof(us); in rfc1048_print()
545 switch (*bp) { in rfc1048_print()
553 printf("%u?", *bp); in rfc1048_print()
556 ++bp; in rfc1048_print()
570 printf("%02x", *bp); in rfc1048_print()
572 printf("%u", *bp); in rfc1048_print()
573 ++bp; in rfc1048_print()
590 tag = *bp++; in rfc1048_print()
602 tag = *bp++; in rfc1048_print()
612 bp += len; in rfc1048_print()
616 if (*bp) in rfc1048_print()
617 printf("[%s] ", client_fqdn_flags(*bp)); in rfc1048_print()
618 bp++; in rfc1048_print()
619 if (*bp || *(bp+1)) in rfc1048_print()
620 printf("%u/%u ", *bp, *(bp+1)); in rfc1048_print()
621 bp += 2; in rfc1048_print()
623 if (fn_printn(bp, len - 3, snapend)) { in rfc1048_print()
628 bp += len - 3; in rfc1048_print()
641 type = *bp++; in rfc1048_print()
645 if (fn_printn(bp, len, snapend)) { in rfc1048_print()
650 bp += len; in rfc1048_print()
658 printf("%02x", *bp); in rfc1048_print()
659 ++bp; in rfc1048_print()
669 subopt = *bp++; in rfc1048_print()
670 suboptlen = *bp++; in rfc1048_print()
677 bp += len; in rfc1048_print()
690 fn_printn(bp, suboptlen, NULL); in rfc1048_print()
694 print_unknown_data(bp, "\n\t\t", suboptlen); in rfc1048_print()
698 bp += suboptlen; in rfc1048_print()
711 bp += len; in rfc1048_print()
718 mask_width = *bp++; in rfc1048_print()
723 bp += len; in rfc1048_print()
731 bp += len; in rfc1048_print()
742 printf("%d", *bp++); in rfc1048_print()
748 memcpy((char *)&ul, (const char *)bp, sizeof(ul)); in rfc1048_print()
750 bp += sizeof(ul); in rfc1048_print()
760 bp += len; in rfc1048_print()
769 bp += len; in rfc1048_print()
778 cmu_print(register const u_char *bp) in cmu_print() argument
787 cmu = (const struct cmu_vend *)bp; in cmu_print()