TCP 4.0.0 Endpoint Problem


I work with TCP 4.0.0 Zynq port. I want to get endpoint from given ip address. I used FreeRTOS_FindEndPointOnIP_IPv4() function but it is not working because pxEndPoint->ipv4_settings.ulIPAddress is always 0 and this function returns first endpoint. In FreeRTOS_FillEndpoint() function, there is a comment that “The field ipv4_settings.ulIPAddress will be set later on”. How can I set this value and how can I get endpoint from ip address?


HI @emrecntz

Thank you for your post.

When we initialise the endpoint with FreeRTOS_FillEndPoint, it only updates ipv4_defaults.ulIPAddress and when network down event is called the defaults endpoint values will be copied back to ipv4_settings values here:

( void ) memcpy( &( pxEndPoint->ipv6_settings ), &( pxEndPoint->ipv6_defaults ), sizeof( pxEndPoint->ipv6_settings ) );

Can you please share how are you initialising the endpoints?
Here is an example of adding Endpoints correctly : IPv6_Multi_WinSim_demo

Please let us know if this helps.

1 Like

Hi @moninom1,

I understand my mistake after your explanation. I had called FreeRTOS_FindEndPointOnIP_IPv4() function before network down event because of this reason I could not update ipv4_settings values. When I called FreeRTOS_FindEndPointOnIP_IPv4() function after network down event, my problem is solved.

Thank you.

1 Like

Glad it worked. Thank you for reporting back.

1 Like