Lines Matching refs:tr
87 struct tftp_t *tr; in tftp_file_read() local
141 tr = (struct tftp_t *)&nic.packet[ETH_HLEN]; in tftp_file_read()
142 if (tr->opcode == ntohs(TFTP_ERROR)) in tftp_file_read()
145 ntohs(tr->u.err.errcode), in tftp_file_read()
146 tr->u.err.errmsg); in tftp_file_read()
150 if (tr->opcode == ntohs(TFTP_OACK)) { in tftp_file_read()
151 char *p = tr->u.oack.data, *e; in tftp_file_read()
155 len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 2; in tftp_file_read()
187 iport, ntohs(tr->udp.src), in tftp_file_read()
198 else if (tr->opcode == htons(TFTP_DATA)) { in tftp_file_read()
199 len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 4; in tftp_file_read()
202 block = ntohs(tp.u.ack.block = tr->u.data.block); } in tftp_file_read()
212 oport = ntohs(tr->udp.src); in tftp_file_read()
222 if ((rc = fnc(tr->u.data.download, in tftp_file_read()
246 struct tftp_t *tr; in buf_fill() local
290 tr = (struct tftp_t *) &nic.packet[ETH_HLEN]; in buf_fill()
291 if (tr->opcode == ntohs (TFTP_ERROR)) in buf_fill()
294 ntohs (tr->u.err.errcode), in buf_fill()
295 tr->u.err.errmsg); in buf_fill()
299 if (tr->opcode == ntohs (TFTP_OACK)) in buf_fill()
301 char *p = tr->u.oack.data, *e; in buf_fill()
315 len = ntohs (tr->udp.len) - sizeof (struct udphdr) - 2; in buf_fill()
357 iport, ntohs (tr->udp.src), in buf_fill()
376 else if (tr->opcode == ntohs (TFTP_DATA)) in buf_fill()
381 len = ntohs (tr->udp.len) - sizeof (struct udphdr) - 4; in buf_fill()
392 block = ntohs (tp.u.ack.block = tr->u.data.block); in buf_fill()
404 oport = ntohs (tr->udp.src); in buf_fill()
433 grub_memmove (buf + buf_read, tr->u.data.download, len); in buf_fill()