Lines Matching refs:blockno
108 static int mkpkt_ack(uint8_t *buffer, uint16_t blockno) in mkpkt_ack() argument
112 buffer[2] = blockno >> 8; in mkpkt_ack()
113 buffer[3] = blockno & 0xff; in mkpkt_ack()
182 uint16_t *blockno) in check_data() argument
186 *blockno = (uint16_t) packet[2] << 8 | (uint16_t) packet[3]; in check_data()
193 static int mkpkt_data(int fd, off_t offset, uint8_t *packet, uint16_t blockno) in mkpkt_data() argument
200 packet[2] = blockno >> 8; in mkpkt_data()
201 packet[3] = blockno & 0xff; in mkpkt_data()
214 uint16_t *port, uint16_t *blockno) in read_ack() argument
257 if (blockno) *blockno = rblockno; in read_ack()
271 uint16_t blockno = 0, opcode, rblockno = 0; in file_get() local
289 blockno++; in file_get()
322 || blockno != rblockno) { in file_get()
333 else if (blockno == 1 && opcode == TFTP_OP_OACK) { in file_get()
366 len = mkpkt_ack(packet, blockno); in file_get()
387 uint16_t blockno = 1, rblockno, port = 0; in file_put() local
405 packetlen = mkpkt_data(fd, offset, packet, blockno); in file_put()
412 if (rblockno == blockno) { in file_put()
414 blockno++; in file_put()