Lines Matching refs:bp

57 bootp_print(struct bootp *bp, int length, u_short sport, u_short dport)  in bootp_print()  argument
74 switch (bp->bp_op) { in bootp_print()
89 printf(" bootp-#%d", bp->bp_op); in bootp_print()
93 if (bp->bp_htype != 1) in bootp_print()
94 printf(" htype:%d", bp->bp_htype); in bootp_print()
97 if (bp->bp_hlen != 6) in bootp_print()
98 printf(" hlen:%d", bp->bp_hlen); in bootp_print()
101 if (bp->bp_hlen) { in bootp_print()
105 TCHECK(bp->bp_chaddr[0], 6); in bootp_print()
107 if (bp->bp_op == BOOTREQUEST) in bootp_print()
109 else if (bp->bp_op == BOOTREPLY) in bootp_print()
113 if (e == 0 || bcmp((char *) bp->bp_chaddr, e, 6)) in bootp_print()
114 dump_hex(bp->bp_chaddr, bp->bp_hlen); in bootp_print()
117 if (bp->bp_hops) in bootp_print()
118 printf(" hops:%d", bp->bp_hops); in bootp_print()
120 if (bp->bp_xid) in bootp_print()
121 printf(" xid:%d", ntohl(bp->bp_xid)); in bootp_print()
123 if (bp->bp_secs) in bootp_print()
124 printf(" secs:%d", ntohs(bp->bp_secs)); in bootp_print()
127 TCHECK(bp->bp_ciaddr, sizeof(bp->bp_ciaddr)); in bootp_print()
128 if (bp->bp_ciaddr.s_addr) in bootp_print()
129 printf(" C:%s", ipaddr_string(&bp->bp_ciaddr)); in bootp_print()
132 TCHECK(bp->bp_yiaddr, sizeof(bp->bp_yiaddr)); in bootp_print()
133 if (bp->bp_yiaddr.s_addr) in bootp_print()
134 printf(" Y:%s", ipaddr_string(&bp->bp_yiaddr)); in bootp_print()
137 TCHECK(bp->bp_siaddr, sizeof(bp->bp_siaddr)); in bootp_print()
138 if (bp->bp_siaddr.s_addr) in bootp_print()
139 printf(" S:%s", ipaddr_string(&bp->bp_siaddr)); in bootp_print()
142 TCHECK(bp->bp_giaddr, sizeof(bp->bp_giaddr)); in bootp_print()
143 if (bp->bp_giaddr.s_addr) in bootp_print()
144 printf(" G:%s", ipaddr_string(&bp->bp_giaddr)); in bootp_print()
146 TCHECK(bp->bp_sname[0], sizeof(bp->bp_sname)); in bootp_print()
147 if (*bp->bp_sname) { in bootp_print()
149 if (printfn(bp->bp_sname, ep)) { in bootp_print()
154 TCHECK(bp->bp_file[0], sizeof(bp->bp_file)); in bootp_print()
155 if (*bp->bp_file) { in bootp_print()
157 if (printfn(bp->bp_file, ep)) { in bootp_print()
166 vdlen = sizeof(bp->bp_vend); in bootp_print()
168 if (vdlen < (ep - bp->bp_vend)) in bootp_print()
169 vdlen = (ep - bp->bp_vend); in bootp_print()
171 TCHECK(bp->bp_vend[0], vdlen); in bootp_print()
173 if (!bcmp(bp->bp_vend, vm_rfc1048, sizeof(u_int32))) in bootp_print()
174 rfc1048_print(bp->bp_vend, vdlen); in bootp_print()
175 else if (!bcmp(bp->bp_vend, vm_cmu, sizeof(u_int32))) in bootp_print()
176 cmu_print(bp->bp_vend, vdlen); in bootp_print()
178 other_print(bp->bp_vend, vdlen); in bootp_print()
275 rfc1048_print(u_char *bp, int length) in rfc1048_print() argument
288 bp += sizeof(int32); in rfc1048_print()
290 ep = bp + length; in rfc1048_print()
291 while (bp < ep) { in rfc1048_print()
292 tag = *bp++; in rfc1048_print()
306 len = *bp++; in rfc1048_print()
307 if (bp + len > ep) { in rfc1048_print()
309 printf(" |(%d>%ld)", len, (long)(ep - bp)); in rfc1048_print()
316 printfn(bp, bp + len); in rfc1048_print()
317 bp += len; in rfc1048_print()
323 bcopy((char *) bp, (char *) &us, 2); in rfc1048_print()
325 bp += 2; in rfc1048_print()
334 bcopy((char *) bp, (char *) &ul, 4); in rfc1048_print()
336 bp += 4; in rfc1048_print()
345 bcopy((char *) bp, (char *) &ia, 4); in rfc1048_print()
347 bp += 4; in rfc1048_print()
362 dump_hex(bp, len); in rfc1048_print()
363 if (isascii(*bp) && isprint(*bp)) { in rfc1048_print()
365 printfn(bp, bp + len); in rfc1048_print()
368 bp += len; in rfc1048_print()
375 cmu_print(u_char *bp, int length) in cmu_print() argument
381 v = (struct cmu_vend *) bp; in cmu_print()
421 other_print(u_char *bp, int length) in other_print() argument
427 ep = bp + length; in other_print()
430 for (zp = ep; zp > bp; zp--) { in other_print()
436 if (zp == bp) { in other_print()
447 while (bp < zp) { in other_print()
448 printf(".%02X", *bp); in other_print()
449 bp++; in other_print()
459 dump_hex(u_char *bp, int len) in dump_hex() argument
462 printf("%02X", *bp); in dump_hex()
463 bp++; in dump_hex()