/** Sets the state and callback handler of the given port, specified in big endian to the given state.
*
* \param[in] Port Port whose state and callback function to set, specified in big endian
/** Sets the state and callback handler of the given port, specified in big endian to the given state.
*
* \param[in] Port Port whose state and callback function to set, specified in big endian
* \param[in] Handler Application callback handler for the port
*
* \return Boolean true if the port state was set, false otherwise (no more space in the port state table)
* \param[in] Handler Application callback handler for the port
*
* \return Boolean true if the port state was set, false otherwise (no more space in the port state table)
/* Note, Port number should be specified in BIG endian to simplify network code */
/* Check to see if the port entry is already in the port state table */
/* Note, Port number should be specified in BIG endian to simplify network code */
/* Check to see if the port entry is already in the port state table */
{
/* Find existing entry for the port in the table, update it if found */
if (PortStateTable[PTableEntry].Port == Port)
{
/* Find existing entry for the port in the table, update it if found */
if (PortStateTable[PTableEntry].Port == Port)
/* Check if trying to open the port -- if so we need to find an unused (closed) entry and replace it */
if (State == TCP_Port_Open)
{
/* Check if trying to open the port -- if so we need to find an unused (closed) entry and replace it */
if (State == TCP_Port_Open)
{
{
/* Find a closed port entry in the table, change it to the given port and state */
if (PortStateTable[PTableEntry].State == TCP_Port_Closed)
{
/* Find a closed port entry in the table, change it to the given port and state */
if (PortStateTable[PTableEntry].State == TCP_Port_Closed)
*/
uint8_t TCP_GetPortState(const uint16_t Port)
{
/* Note, Port number should be specified in BIG endian to simplify network code */
*/
uint8_t TCP_GetPortState(const uint16_t Port)
{
/* Note, Port number should be specified in BIG endian to simplify network code */
{
/* Find existing entry for the port in the table, return the port status if found */
if (PortStateTable[PTableEntry].Port == Port)
{
/* Find existing entry for the port in the table, return the port status if found */
if (PortStateTable[PTableEntry].Port == Port)
* \param[in] Port TCP port of the connection on the device, specified in big endian
* \param[in] RemoteAddress Remote protocol IP address of the connected device
* \param[in] RemotePort TCP port of the remote device in the connection, specified in big endian
* \param[in] Port TCP port of the connection on the device, specified in big endian
* \param[in] RemoteAddress Remote protocol IP address of the connected device
* \param[in] RemotePort TCP port of the remote device in the connection, specified in big endian
* \param[in] RemoteAddress Remote protocol IP address of the connected host
* \param[in] RemotePort Remote TCP port of the connected host, specified in big endian
*
* \param[in] RemoteAddress Remote protocol IP address of the connected host
* \param[in] RemotePort Remote TCP port of the connected host, specified in big endian
*
*/
uint8_t TCP_GetConnectionState(const uint16_t Port,
const IP_Address_t RemoteAddress,
*/
uint8_t TCP_GetConnectionState(const uint16_t Port,
const IP_Address_t RemoteAddress,