Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When developping a network application that send and/or receive data, a source IP address needs to handling will be specifiedrequired

When you setup a server application, you MUST bind to an already configured IP address. This address will be used as the destination address for all the clients communicating with the server and will be used as the source address for the packets sent by the server. 

...

You also have the option to bind to the wildcard adress (0.0.0.0 for IPv4 and :: for IPv6). In that case, the server socket is not bind to bound to any IP address in particular, therefore any packets send with to the corresponding server port number will be received by the server regardless of the destination address. When sending packets, the µC/TCP-IP stack will take charge of setting the best source address for the destination.

 

When you setup a client application, you MAY want to bind to a specific configured IP address. Knowing the destination IP address you can use the functions NetIPv4_GetAddrSrc() or NetIPv6_GetAddrSrc() to found the best suited configured IP address for your destination. 

If you don't bound to an IP address, the µC/TCP-IP stack will take charge of setting the source address of packets to send.

 

Refer to section Socket Programming for more information on using network sockets.

TO DELETE

Removing Statically Assigned IP Addresses From An Interface

...