Lines Matching refs:hdr
42 msg_hdr_t hdr; in upload() local
72 hdr.opcode = MSG_SEND_DATA; in upload()
73 hdr.extra = 0; in upload()
74 hdr.length = xfer - 1; in upload()
75 if (write(s, &hdr, sizeof(hdr)) != sizeof(hdr)) { in upload()
88 hdr.opcode = MSG_END_DATA; in upload()
89 hdr.extra = 0; in upload()
90 hdr.length = 0; in upload()
91 if (write(s, &hdr, sizeof(hdr)) != sizeof(hdr)) { in upload()
181 msg_hdr_t hdr; in lkboot_txn() local
247 hdr.opcode = MSG_CMD; in lkboot_txn()
248 hdr.extra = 0; in lkboot_txn()
249 hdr.length = len; in lkboot_txn()
250 if (write(fd_out, &hdr, sizeof(hdr)) != sizeof(hdr)) goto iofail; in lkboot_txn()
254 if (readx(fd_in, &hdr, sizeof(hdr))) goto iofail; in lkboot_txn()
255 switch (hdr.opcode) { in lkboot_txn()
266 len = (hdr.length > 127) ? 127 : hdr.length; in lkboot_txn()
276 len = hdr.length + 1; in lkboot_txn()
287 fprintf(stderr, "error: unknown opcode %d\n", hdr.opcode); in lkboot_txn()