Lines Matching refs:block
53 tftp_send(int peer, uint16_t *block, struct tftp_stats *ts) in tftp_send() argument
62 *block = 1; in tftp_send()
66 tftp_log(LOG_DEBUG, "Sending block %d", *block); in tftp_send()
76 n_data = send_data(peer, *block, sendbuffer, size); in tftp_send()
81 "giving up", *block); in tftp_send()
86 *block); in tftp_send()
97 "giving up", try, *block); in tftp_send()
102 try, *block); in tftp_send()
114 if (rp->th_block == *block) { in tftp_send()
121 if (rp->th_block == (*block - 1)) { in tftp_send()
128 oldblock = *block; in tftp_send()
129 (*block)++; in tftp_send()
130 if (oldblock > *block) { in tftp_send()
137 *block = 0; in tftp_send()
139 *block = atoi(options[OPT_ROLLOVER].o_request); in tftp_send()
158 tftp_receive(int peer, uint16_t *block, struct tftp_stats *ts, in tftp_receive() argument
172 n_ack = send_ack(peer, *block); in tftp_receive()
177 "giving up", *block); in tftp_receive()
182 *block); in tftp_receive()
197 oldblock = *block; in tftp_receive()
198 (*block)++; in tftp_receive()
199 if (oldblock > *block) { in tftp_receive()
206 *block = 0; in tftp_receive()
208 *block = atoi(options[OPT_ROLLOVER].o_request); in tftp_receive()
217 "Receiving DATA block %d", *block); in tftp_receive()
225 "giving up", retry, *block); in tftp_receive()
231 retry, *block); in tftp_receive()
245 if (rp->th_block == *block) in tftp_receive()
250 *block, rp->th_block); in tftp_receive()
254 if (rp->th_block == (*block-1)) { in tftp_receive()
256 *block = oldblock; in tftp_receive()
284 n_ack = send_ack(peer, *block); in tftp_receive()
290 "giving up", *block); in tftp_receive()
296 *block); in tftp_receive()
316 *block == rp->th_block) /* then my last ack was lost */ in tftp_receive()
317 send_ack(peer, *block); /* resend final ack */ in tftp_receive()