mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
nshlib/ifconfig: Add support for add/del a single IPv6 address
Note: We're using similar error codes as Linux: ``` linux> sudo ifconfig eth0 inet6 add fc00::2/64 linux> sudo ifconfig eth0 inet6 del fc00::2/112 SIOCDIFADDR: Cannot assign requested address linux> sudo ifconfig eth0 inet6 del fc00::3/64 SIOCDIFADDR: Cannot assign requested address linux> sudo ifconfig eth0 inet6 add fc00::2/64 SIOCSIFADDR: File exists nuttx> ifconfig eth0 inet6 add fc00::2/64 nuttx> ifconfig eth0 inet6 del fc00::2/112 Failed to manage IPv6 address: Cannot assign requested address nuttx> ifconfig eth0 inet6 del fc00::3/112 Failed to manage IPv6 address: Cannot assign requested address nuttx> ifconfig eth0 inet6 add fc00::2/64 Failed to manage IPv6 address: File exists ``` Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
@@ -278,7 +278,7 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
#ifdef CONFIG_NET
|
||||
# ifndef CONFIG_NSH_DISABLE_IFCONFIG
|
||||
CMD_MAP("ifconfig", cmd_ifconfig, 1, 12,
|
||||
"[interface [address_family] [mtu <len>] | [<ip-address>|dhcp]]"
|
||||
"[interface [mtu <len>]|[address_family] [[add|del] <ip-address>|dhcp]]"
|
||||
"[dr|gw|gateway <dr-address>] [netmask <net-mask>|prefixlen <len>] "
|
||||
"[dns <dns-address>] [hw <hw-mac>]"),
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user