Commit Graph

8 Commits

Author SHA1 Message Date
liqinhui
79e8722743 dhcp6c: Add the renew6 command for dhcp6c.
Support Stateless and Stateful. The renew6 is used as follows:
 - Stateless: renew6 eth0
 - Stateful: renew6 eth0 1

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-12 10:15:55 +08:00
Xiang Xiao
054cf3b1cb Change all sizeof(arr)/sizeof(arr[0]) to nitems
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
chao an
4d79a5cbaf add initial cmake build system
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
Xiang Xiao
73701cd7cd Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
simbit18
5736d2adfd apps/netutils/dhcp6c/Make.defs: fix nxstyle
Add missing first line header
2023-03-20 14:17:07 +01:00
Nathan Hartman
8e77b79f78 Kconfig: Make indent consistent with TABS 2023-02-10 14:11:48 +08:00
chao an
e031a82882 netutils/dhcp: fix build warning/break of dhcp6c
dhcp6c.c:222:3: error: unknown type name ‘pthread_t’
  222 |   pthread_t thread;
      |   ^~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_get_result’:
dhcp6c.c:415:7: warning: implicit declaration of function ‘netlib_prefix2ipv6netmask’ [-Wimplicit-function-declaration]
  415 |       netlib_prefix2ipv6netmask(presult->pl, &presult->netmask);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_parse_ia’:
dhcp6c.c:1046:30: warning: unused variable ‘pdhcp6c’ [-Wunused-variable]
 1046 |   FAR struct dhcp6c_state_s *pdhcp6c = (FAR struct dhcp6c_state_s *)handle;
      |                              ^~~~~~~
dhcp6c.c: In function ‘dhcp6c_precise_open’:
dhcp6c.c:1702:3: warning: missing braces around initializer [-Wmissing-braces]
 1702 |   {
      |   ^
......
 1706 |     {0},
      |      -
      |      {{0}}
dhcp6c.c:1796:43: error: ‘UDP_BINDTODEVICE’ undeclared (first use in this function); did you mean ‘SO_BINDTODEVICE’?
 1796 |   setsockopt(pdhcp6c->sockfd, SOL_SOCKET, UDP_BINDTODEVICE, ifname,
      |                                           ^~~~~~~~~~~~~~~~
      |                                           SO_BINDTODEVICE
dhcp6c.c:1796:43: note: each undeclared identifier is reported only once for each function it appears in
dhcp6c.c: In function ‘dhcp6c_request_async’:
dhcp6c.c:1886:9: warning: implicit declaration of function ‘pthread_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
 1886 |   ret = pthread_create(&pdhcp6c->thread, NULL, dhcp6c_run, pdhcp6c);
      |         ^~~~~~~~~~~~~~
      |         timer_create

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-06 19:31:16 +08:00
songlinzhang
f85388578c Add dhcp6c module
Signed-off-by: songlinzhang <songlinzhang@xiaomi.com>
2022-03-19 23:25:50 +08:00