+void TCP_INT_SendACK(tTCPConnection *Connection)
+{
+ tTCPHeader hdr;
+ // ACK Packet
+ hdr.DataOffset = (sizeof(tTCPHeader)/4) << 4;
+ hdr.DestPort = htons(Connection->RemotePort);
+ hdr.SourcePort = htons(Connection->LocalPort);
+ hdr.AcknowlegementNumber = htonl(Connection->NextSequenceRcv);
+ hdr.SequenceNumber = htonl(Connection->NextSequenceSend);
+ hdr.WindowSize = htons(TCP_WINDOW_SIZE);
+ hdr.Flags = TCP_FLAG_ACK; // TODO: Determine if SYN is wanted too
+ hdr.Checksum = 0; // TODO: Checksum
+ hdr.UrgentPointer = 0;
+ Log_Debug("TCP", "Sending ACK for 0x%08x", Connection->NextSequenceRcv);
+ TCP_SendPacket( Connection, &hdr, 0, NULL );
+ //Connection->NextSequenceSend ++;
+ Connection->LastACKSequence = Connection->NextSequenceRcv;
+}
+