Lines Matching defs:dp
351 struct tftphdr *dp;
358 dp = r_init();
361 size = readit(file, &dp, pf->f_convert);
366 dp->th_opcode = htons((u_short)DATA);
367 dp->th_block = htons((u_short)block);
372 if (send(peer, dp, size + 4, confirmed) != size + 4) {
422 struct tftphdr *dp;
428 dp = w_init();
445 n = recv(peer, dp, PKTSIZE, 0);
451 dp->th_opcode = ntohs((u_short)dp->th_opcode);
452 dp->th_block = ntohs((u_short)dp->th_block);
453 if (dp->th_opcode == ERROR)
455 if (dp->th_opcode == DATA) {
456 if (dp->th_block == block) {
462 if (dp->th_block == (block-1))
466 /* size = write(file, dp->th_data, n - 4); */
467 size = writeit(file, &dp, n - 4, pf->f_convert);
486 dp->th_opcode == DATA && /* and got a data block */
487 block == dp->th_block) { /* then my last ack was lost */