{\r
/* Task to hand off TCP packets to and from the listening applications. */\r
\r
- /* Run each application in sequence, to process incomming and generate outgoing packets */\r
+ /* Run each application in sequence, to process incoming and generate outgoing packets */\r
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
{\r
/* Find the corresponding port entry in the port table */\r
*/\r
bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))\r
{\r
- /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+ /* Note, Port number should be specified in BIG endian to simplify network code */\r
\r
/* Check to see if the port entry is already in the port state table */\r
for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++)\r
*/\r
uint8_t TCP_GetPortState(uint16_t Port)\r
{\r
- /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+ /* Note, Port number should be specified in BIG endian to simplify network code */\r
\r
for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++)\r
{\r
*/\r
bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State)\r
{\r
- /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+ /* Note, Port number should be specified in BIG endian to simplify network code */\r
\r
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
{\r
*/\r
uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)\r
{\r
- /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+ /* Note, Port number should be specified in BIG endian to simplify network code */\r
\r
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
{\r
*/\r
TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)\r
{\r
- /* Note, Port number should be specified in BIG endian to simplfy network code */\r
+ /* Note, Port number should be specified in BIG endian to simplify network code */\r
\r
for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)\r
{\r
/** Processes a TCP packet inside an Ethernet frame, and writes the appropriate response\r
* to the output Ethernet frame if one is created by a application handler.\r
*\r
- * \param IPHeaderInStart Pointer to the start of the incomming packet's IP header\r
- * \param TCPHeaderInStart Pointer to the start of the incomming packet's TCP header\r
+ * \param IPHeaderInStart Pointer to the start of the incoming packet's IP header\r
+ * \param TCPHeaderInStart Pointer to the start of the incoming packet's TCP header\r
* \param TCPHeaderOutStart Pointer to the start of the outgoing packet's TCP header\r
*\r
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE if no\r
\r
bool PacketResponse = false;\r
\r
- /* Check if the destination port is open and allows incomming connections */\r
+ /* Check if the destination port is open and allows incoming connections */\r
if (TCP_GetPortState(TCPHeaderIN->DestinationPort) == TCP_Port_Open)\r
{\r
/* Detect SYN from host to start a connection */\r
}\r
else\r
{\r
- /* Process the incomming TCP packet based on the current connection state for the sender and port */\r
+ /* Process the incoming TCP packet based on the current connection state for the sender and port */\r
switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort))\r
{\r
case TCP_Connection_Listen:\r
}\r
else\r
{\r
- /* Buffer is currently in use by the application, defer processing of the incomming packet */\r
+ /* Buffer is currently in use by the application, defer processing of the incoming packet */\r
return NO_PROCESS;\r
}\r
}\r
{\r
uint32_t Checksum = 0;\r
\r
- /* TCP/IP checksums are the addition of the one's compliment of each word including the IP psudo-header,\r
+ /* TCP/IP checksums are the addition of the one's compliment of each word including the IP pseudo-header,\r
complimented */\r
\r
Checksum += ((uint16_t*)&SourceAddress)[0];\r