Lines Matching defs:packet
197 * packet is received, then use user-provided transfer timeouts
284 static void setpacketevent(tftp_packet_t *packet, unsigned short num)
286 packet->data[0] = (unsigned char)(num >> 8);
287 packet->data[1] = (unsigned char)(num & 0xff);
291 static void setpacketblock(tftp_packet_t *packet, unsigned short num)
293 packet->data[2] = (unsigned char)(num >> 8);
294 packet->data[3] = (unsigned char)(num & 0xff);
297 static unsigned short getrpacketevent(const tftp_packet_t *packet)
299 return (unsigned short)((packet->data[0] << 8) | packet->data[1]);
302 static unsigned short getrpacketblock(const tftp_packet_t *packet)
304 return (unsigned short)((packet->data[2] << 8) | packet->data[3]);
349 failf(data, "Malformed ACK packet, rejecting");
361 failf(data, "invalid blocksize value in OACK packet");
397 failf(data, "invalid tsize -:%s:- value in OACK packet", value);
465 case TFTP_EVENT_INIT: /* Send the first packet out */
466 case TFTP_EVENT_TIMEOUT: /* Resend the first packet out */
597 infof(data, "Received last DATA packet block %d again.\n", rblock);
602 "Received unexpected DATA packet block %d, expecting block %d\n",
620 /* Check if completed (That is, a less than full packet is received) */
713 /* Ack the packet */
734 /* Re-send the data packet */
747 /* This is the expected packet. Reset the counters and send the next
790 /* Re-send the data packet */
1084 /* Receive the packet */
1097 /* Sanity check packet length */
1099 failf(data, "Received too short packet");
1104 /* The event is given by the TFTP packet time */
1139 failf(data, "%s", "Internal error: Unexpected packet");