Lines Matching defs:bp
66 register const struct bootp *bp;
70 bp = (const struct bootp *)cp;
71 TCHECK(bp->bp_op);
74 tok2str(bootp_op_values, "unknown (0x%02x)", bp->bp_op));
76 if (bp->bp_htype == 1 && bp->bp_hlen == 6 && bp->bp_op == BOOTPREQUEST) {
77 TCHECK2(bp->bp_chaddr[0], 6);
78 printf(" from %s", etheraddr_string(bp->bp_chaddr));
86 TCHECK(bp->bp_secs);
89 if (bp->bp_htype != 1)
90 printf(", htype %d", bp->bp_htype);
93 if (bp->bp_htype != 1 || bp->bp_hlen != 6)
94 printf(", hlen %d", bp->bp_hlen);
97 if (bp->bp_hops)
98 printf(", hops %d", bp->bp_hops);
99 if (bp->bp_xid)
100 printf(", xid 0x%x", EXTRACT_32BITS(&bp->bp_xid));
101 if (bp->bp_secs)
102 printf(", secs %d", EXTRACT_16BITS(&bp->bp_secs));
105 bittok2str(bootp_flag_values, "none", EXTRACT_16BITS(&bp->bp_flags)));
107 printf(" (0x%04x)", EXTRACT_16BITS(&bp->bp_flags));
110 TCHECK(bp->bp_ciaddr);
111 if (bp->bp_ciaddr.s_addr)
112 printf("\n\t Client-IP %s", ipaddr_string(&bp->bp_ciaddr));
115 TCHECK(bp->bp_yiaddr);
116 if (bp->bp_yiaddr.s_addr)
117 printf("\n\t Your-IP %s", ipaddr_string(&bp->bp_yiaddr));
120 TCHECK(bp->bp_siaddr);
121 if (bp->bp_siaddr.s_addr)
122 printf("\n\t Server-IP %s", ipaddr_string(&bp->bp_siaddr));
125 TCHECK(bp->bp_giaddr);
126 if (bp->bp_giaddr.s_addr)
127 printf("\n\t Gateway-IP %s", ipaddr_string(&bp->bp_giaddr));
130 if (bp->bp_htype == 1 && bp->bp_hlen == 6) {
131 TCHECK2(bp->bp_chaddr[0], 6);
132 printf("\n\t Client-Ethernet-Address %s", etheraddr_string(bp->bp_chaddr));
135 TCHECK2(bp->bp_sname[0], 1); /* check first char only */
136 if (*bp->bp_sname) {
138 if (fn_print(bp->bp_sname, snapend)) {
145 TCHECK2(bp->bp_file[0], 1); /* check first char only */
146 if (*bp->bp_file) {
148 if (fn_print(bp->bp_file, snapend)) {
157 TCHECK(bp->bp_vend[0]);
158 if (memcmp((const char *)bp->bp_vend, vm_rfc1048,
160 rfc1048_print(bp->bp_vend);
161 else if (memcmp((const char *)bp->bp_vend, vm_cmu,
163 cmu_print(bp->bp_vend);
167 ul = EXTRACT_32BITS(&bp->bp_vend);
363 rfc1048_print(register const u_char *bp)
377 printf("\n\t Magic Cookie 0x%08x", EXTRACT_32BITS(bp));
378 bp += sizeof(int32_t);
381 while (TTEST2(*bp, 1)) {
382 tag = *bp++;
388 TCHECK2(*(bp + 1), 2);
389 tag = EXTRACT_16BITS(bp + 1);
403 TCHECK2(*bp, 1);
404 len = *bp++;
412 while (TTEST2(*bp, 1) && *bp == TAG_PAD) {
413 bp++;
420 if (!TTEST2(*bp, len)) {
426 uc = *bp++;
434 uc = *bp++;
450 us = EXTRACT_16BITS(bp);
451 bp += 2;
477 if (fn_printn(bp, len, snapend)) {
482 bp += len;
493 ul = EXTRACT_32BITS(bp);
501 bp += sizeof(ul);
512 memcpy((char *)&ul, (const char *)bp, sizeof(ul));
514 bp += sizeof(ul);
515 memcpy((char *)&ul, (const char *)bp, sizeof(ul));
517 bp += sizeof(ul);
528 us = EXTRACT_16BITS(bp);
530 bp += sizeof(us);
541 switch (*bp) {
549 printf("%u?", *bp);
552 ++bp;
566 printf("%02x", *bp);
568 printf("%u", *bp);
569 ++bp;
584 bp += len;
588 tag = *bp++;
598 bp += len;
602 tag = *bp++;
612 bp += len;
616 if (*bp)
617 printf("[%s] ", client_fqdn_flags(*bp));
618 bp++;
619 if (*bp || *(bp+1))
620 printf("%u/%u ", *bp, *(bp+1));
621 bp += 2;
623 if (fn_printn(bp, len - 3, snapend)) {
628 bp += len - 3;
639 bp += len;
643 type = *bp++;
647 if (fn_printn(bp, len, snapend)) {
652 bp += len;
660 printf("%02x", *bp);
661 ++bp;
671 subopt = *bp++;
672 suboptlen = *bp++;
679 bp += len;
690 fn_printn(bp, suboptlen, NULL);
694 print_unknown_data(bp, "\n\t\t", suboptlen);
698 bp += suboptlen;
711 bp += len;
718 mask_width = *bp++;
723 bp += len;
731 bp += len;
742 printf("%d", *bp++);
748 memcpy((char *)&ul, (const char *)bp, sizeof(ul));
750 bp += sizeof(ul);
760 bp += len;
769 bp += len;
778 cmu_print(register const u_char *bp)
787 cmu = (const struct cmu_vend *)bp;