ThirdParty/sw_services/lwip211/examples/freertos_lwip_example_tftp_client.c
static int tftp_send_data_packet(int sd, struct sockaddr_in *to, int block,
		char *buf, int buflen)
{
	char packet[TFTP_MAX_MSG_LEN] = {0};

	tftp_set_opcode(packet, TFTP_DATA);
	tftp_set_block_value(packet, block);
	tftp_set_data(packet, buf, buflen);

	return tftp_send_packet(sd, to, packet, buflen + TFTP_PACKET_HDR_LEN);
}
/* construct and send a data packet */
construct and send a data packet
construct and send a data packet
static int tftp_send_data_packet(int sd, struct sockaddr_in *to, int block,
		char *buf, int buflen)
{
	char packet[TFTP_MAX_MSG_LEN] = {0};
	tftp_set_opcode(packet, TFTP_DATA);
	tftp_set_block_value(packet, block);
	tftp_set_data(packet, buf, buflen);
	return tftp_send_packet(sd, to, packet, buflen + TFTP_PACKET_HDR_LEN);
}
static int tftp_send_data_packet ( int sd , struct sockaddr_in * to , int block , char * buf , int buflen ) { char packet [ TFTP_MAX_MSG_LEN ] = { 0 } ; tftp_set_opcode ( packet , TFTP_DATA ) ; tftp_set_block_value ( packet , block ) ; tftp_set_data ( packet , buf , buflen ) ; return tftp_send_packet ( sd , to , packet , buflen + TFTP_PACKET_HDR_LEN ) ; }
construct and send a data packet
construct and send a data packet