zephyr/samples/net
Jukka Rissanen 9028ecbc56 samples: net: zperf: Allow DHCPv4 or manually set addresses
If user has enabled DHCPv4, then allow to use its address instead
of giving error if static address cannot be set. Similar fix for
IPv6, so allow user to manually set an IPv6 address.

Because DHCPv4 has already set the IPv4 address to the network
interface, then zperf might not be able to add the pre-configured
address to it. So instead of returning immediately, try to use the
IP address that is already in the network interface. This way we
avoid this error print.

  uart:~$ zperf udp download 5001

  Setting IP address 2001:db8::1
  Setting destination IP address 2001:db8::2
  Cannot set IPv4 address 192.0.2.1
  Unable to set IP
  Setting destination IP address 192.0.2.2

  Cannot set IPv4 address 192.0.2.1
  Unable to set IPv4
  Binding to 192.0.2.1
  Cannot bind IPv4 UDP port 5001 (-2)

In this example, the network interface already had a proper and working
IPv4 address 192.168.0.2 in it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-12-01 16:32:07 +02:00
..
civetweb boards: Fix 2 liners copyright 2020-11-26 13:51:04 +01:00
cloud samples: net: cloud: tagoio_http_post: Fix sample name 2020-11-24 23:41:25 -05:00
common
dhcpv4_client zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
dns_resolve zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
eth_native_posix sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00
gptp net: scripts: Make test runner script fully generic 2020-11-20 16:07:59 +02:00
gsm_modem samples: net: gsm: Add suspend/resume shell commands 2020-10-21 00:08:39 +03:00
ipv4_autoconf sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00
lldp sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00
lwm2m_client net: lwm2m: Notify the application on network error 2020-11-06 12:58:14 +01:00
mdns_responder net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
mqtt_publisher samples: net: mqtt: Fix the return code in Docker tests 2020-11-20 16:07:59 +02:00
openthread/coprocessor net: openthread: OpenThread RCP mode integration into Zephyr 2020-11-19 12:34:14 +01:00
promiscuous_mode zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
sockets samples: net: echo-server: Print receive statistics periodically 2020-11-24 15:02:45 +02:00
stats samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
syslog_net samples: net: syslog: Add configs for ipv4- and ipv6-only 2020-08-14 18:51:28 -04:00
telnet zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
vlan samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
wifi samples: net: wifi: Enable inventek es-WIFI shield tests 2020-11-03 11:05:43 +01:00
wpan_serial samples: net: Adjust the thread priorities 2020-11-20 12:57:29 +02:00
wpanusb samples: net: Adjust the thread priorities 2020-11-20 12:57:29 +02:00
zperf samples: net: zperf: Allow DHCPv4 or manually set addresses 2020-12-01 16:32:07 +02:00
net.rst