Lines Matching defs:block

71 /* RFC2348 allows the block size to be negotiated */
141 unsigned short block;
221 maxtime = 3600; /* use for calculating block timeouts */
223 /* Set per-block timeout to total */
591 /* Is this the block we expect? */
593 if(NEXT_BLOCKNUM(state->block) == rblock) {
594 /* This is the expected block. Reset counters and ACK it. */
597 else if(state->block == rblock) {
598 /* This is the last recently received block again. Log it and ACK it
600 infof(data, "Received last DATA packet block %d again.", rblock);
605 "Received unexpected DATA packet block %d, expecting block %d",
606 rblock, NEXT_BLOCKNUM(state->block));
610 /* ACK this block. */
611 state->block = (unsigned short)rblock;
613 setpacketblock(&state->spacket, state->block);
635 state->block = 0;
638 setpacketblock(&state->spacket, state->block);
657 "Timeout waiting for block %d ACK. Retries = %d",
658 NEXT_BLOCKNUM(state->block), state->retries);
678 setpacketblock(&state->spacket, state->block);
720 if(rblock != state->block &&
722 * 65535 when the block number wraps to 0. So when we're expecting
726 !(state->block == 0 && rblock == 65535)) {
727 /* This isn't the expected block. Log it and up the retry counter */
728 infof(data, "Received ACK for block %d, expecting %d",
729 rblock, state->block);
733 failf(data, "tftp_tx: giving up waiting for block %d ack",
734 state->block);
754 block */
756 state->block++;
759 state->block = 1; /* first data block is 1 when using OACK */
763 setpacketblock(&state->spacket, state->block);
764 if(state->block > 1 && state->sbytes < state->blksize) {
769 /* TFTP considers data block size < 512 bytes as an end of session. So
771 * data block.
800 infof(data, "Timeout waiting for block %d ACK. "
801 " Retries = %d", NEXT_BLOCKNUM(state->block), state->retries);
826 setpacketblock(&state->spacket, state->block);
1135 (NEXT_BLOCKNUM(state->block) == getrpacketblock(&state->rpacket))) {