вот страницу отправляю с помощью www_server_reply(), вот ее содержимое:
Код
// you must have initialized info_data_len at some time before calling this function
//
// This info_data_len initialisation is done automatically if you call
// packetloop_icmp_tcp(buf,enc28j60PacketReceive(BUFFER_SIZE, buf));
// and test the return value for non zero.
//
// dlen is the amount of tcp data (http data) we send in this packet
// You can use this function only immediately after make_tcp_ack_from_any
// This is because this function will NOT modify the eth/ip/tcp header except for
// length and checksum
void www_server_reply(uint8_t *buf,uint16_t dlen)
{
make_tcp_ack_from_any(buf,info_data_len,0); // send ack for http get
// fill the header:
// This code requires that we send only one data packet
// because we keep no state information. We must therefore set
// the fin here:
buf[TCP_FLAGS_P]=TCP_FLAGS_ACK_V|TCP_FLAGS_PUSH_V|TCP_FLAGS_FIN_V;
make_tcp_ack_with_data_noflags(buf,dlen); // send data
}
Страница отправляется нормально, но не могу понять, почему. Если верить комментам в коде, то make_tcp_ack_from_any просто отправляет ack для начала передачи, но зачем ей передавать указатель на массив, в котором хранится страница для отправки, при том что make_tcp_ack_from_any изменяет некоторое содержимое этого массива?
Да, кстати, страница здесь передается вот так:

А так должна передаваться страница в несколько пакетов: