Lines Matching refs:tftp_cur_block
83 static ulong tftp_cur_block; variable
261 pos = tftp_cur_block * tftp_block_size + in show_block_marker()
273 pos = (tftp_cur_block - 1) + in show_block_marker()
306 if (tftp_cur_block == 0 && tftp_prev_block != 0) { in update_block_number()
402 s[1] = htons(tftp_cur_block); in tftp_send()
407 int loaded = load_block(tftp_cur_block, pkt, toload); in tftp_send()
512 int ack_ok = (tftp_cur_block == block); in tftp_handler()
514 tftp_prev_block = tftp_cur_block; in tftp_handler()
515 tftp_cur_block = (unsigned short)(block + 1); in tftp_handler()
602 tftp_cur_block++; in tftp_handler()
612 if (ntohs(*(__be16 *)pkt) != (ushort)(tftp_cur_block + 1)) { in tftp_handler()
615 (ushort)(tftp_cur_block + 1)); in tftp_handler()
622 if (tftp_last_nack != tftp_cur_block) { in tftp_handler()
624 tftp_last_nack = tftp_cur_block; in tftp_handler()
625 tftp_next_ack = (ushort)(tftp_cur_block + in tftp_handler()
631 tftp_cur_block++; in tftp_handler()
632 tftp_cur_block %= TFTP_SEQUENCE_SIZE; in tftp_handler()
646 if (tftp_cur_block != 1) { /* Assertion */ in tftp_handler()
649 tftp_cur_block); in tftp_handler()
656 if (tftp_cur_block == tftp_prev_block) { in tftp_handler()
662 tftp_prev_block = tftp_cur_block; in tftp_handler()
666 if (store_block(tftp_cur_block, pkt + 2, len)) { in tftp_handler()
682 if (tftp_cur_block == tftp_next_ack) { in tftp_handler()
877 tftp_cur_block = 0; in tftp_start()
916 tftp_cur_block = 0; in tftp_start_server()