Also the code (any ideas why?)
c_sock=socket(AF_INET,SOCK_STREAM,0);
if(c_sock<0)
{
// print an error message
}
c_addr.sin_family=AF_INET;
c_addr.sin_addr.s_addr=htonl(INADDR_ANY);
c_addr.sin_port=htons(6060);
if(bind(c_sock,(struct sockaddr_in *)&c_addr,sizeof(c_addr))==0)
{
LOG_ERR ("Binding succed!...");
}
else
{
LOG_ERR ("Binding failed...");
//return 0;
}
k_sleep(K_SECONDS(2));
Generates
<wrn> net_if: You have 1 IPv6 net_if addresses but 2 network interfaces
[00:00:00.501,000] <wrn> net_if: Consider increasing CONFIG_NET_IF_MAX_IPV6_COUNT value.
[00:00:00.501,000] <wrn> net_if: You have 1 IPv4 net_if addresses but 2 network interfaces
[00:00:00.501,000] <wrn> net_if: Consider increasing CONFIG_NET_IF_MAX_IPV4_COUNT value.
*** Booting Zephyr OS build zephyr-v3.3.0-962-g523de0d9be80 ***
_____________________________________________
- Application: /home/kore/zephyrproject/zephyr/samples/net/sockets/can
-- **CMake version: 3.22.1**
-- Found Python3: /usr/bin/python3.10 (found suitable exact version "3.10.6") found components: Interpreter
-- Cache files will be written to: /home/kore/.cache/zephyr
-- **Zephyr version: 3.3.99** (/home/kore/zephyrproject/zephyr)