nuttx-apps/netutils/discover
Xiang Xiao 192f87b3ea Fix the compiler warning
Error: discover.c:210:13: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'in_addr_t' {aka 'unsigned int'} [-Werror=format=]
  210 |       ninfo("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                |
      |                                                                in_addr_t {aka unsigned int}
discover.c:210:41: note: format string is defined here
  210 |       ninfo("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr);
      |                                     ~~~~^
      |                                         |
      |                                         long unsigned int
      |                                     %08x
In file included from discover.c:25:
discover.c: In function 'discover_openlistener':
Error: discover.c:359:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t' {aka 'unsigned int'} [-Werror=format=]
  359 |   ninfo("serverip: %08lx\n", ntohl(g_state.serverip));
      |         ^~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              uint32_t {aka unsigned int}
discover.c:359:24: note: format string is defined here
  359 |   ninfo("serverip: %08lx\n", ntohl(g_state.serverip));
      |                    ~~~~^
      |                        |
      |                        long unsigned int
      |                    %08x

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-31 06:30:03 +01:00
..
discover.c Fix the compiler warning 2022-10-31 06:30:03 +01:00
Kconfig
Make.defs Make.defs: Change "ifeq ($(XXX),y)" to "ifneq ($(XXX),) 2022-10-16 14:59:08 +02:00
Makefile Makefile: Max Holtzberg: update licenses to Apache 2021-06-07 21:35:33 -05:00
README.md Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00

Network Utilities / discover

This daemon is useful for discovering devices in local networks, especially with DHCP configured devices. It listens for UDP broadcasts which also can include a device class so that groups of devices can be discovered. It is also possible to address all classes with a kind of broadcast discover.

See nuttx/tools/discover.py for a client example.