From 648666e88648a046a9e1f6682afcf927d49815f3 Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Wed, 26 Oct 2022 17:49:08 +0800 Subject: [PATCH] =?UTF-8?q?NewIP=E9=9C=80=E6=B1=82=E4=B8=AD=E5=8F=AA?= =?UTF-8?q?=E4=BA=A4=E4=BB=98wifi=EF=BC=8Cdemo=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4eth=E5=8F=A3=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- examples/nip_addr.c | 2 +- examples/nip_lib.h | 4 ++-- examples/nip_route.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/nip_addr.c b/examples/nip_addr.c index b6aa8a5..00f5cc6 100644 --- a/examples/nip_addr.c +++ b/examples/nip_addr.c @@ -96,7 +96,7 @@ int main(int argc, char **argv_input) argv++; memset(dev, 0, ARRAY_LEN); ret = sscanf(*argv, "%s", dev); - if (strncmp(dev, "wlan", NAME_WLAN_LEN) && strncmp(dev, "eth", NAME_ETH_LEN)) { + if (strncmp(dev, "wlan", NAME_WLAN_LEN)) { printf("unsupport addr cfg cmd-1, cmd=%s.\n", dev); cmd_help(); return -1; diff --git a/examples/nip_lib.h b/examples/nip_lib.h index a32dfe7..43c64f8 100644 --- a/examples/nip_lib.h +++ b/examples/nip_lib.h @@ -39,8 +39,8 @@ #define DEMO_INPUT_3 4 #define DEMO_INPUT_4 5 -/* Eth0 and wlan0 are optional. Change the value based on the actual interface */ -#define NIC_NAME "eth0" +/* Change the value based on the actual interface */ +#define NIC_NAME "wlan0" #define BUFLEN 2048 #define LISTEN_MAX 3 diff --git a/examples/nip_route.c b/examples/nip_route.c index 46b9d01..47f56bd 100644 --- a/examples/nip_route.c +++ b/examples/nip_route.c @@ -134,7 +134,7 @@ int main(int argc, char **argv_input) argv++; memset(dev, 0, ARRAY_LEN); ret = sscanf(*argv, "%s", dev); - if (strncmp(dev, "wlan", NAME_WLAN_LEN) && strncmp(dev, "eth", NAME_ETH_LEN)) { + if (strncmp(dev, "wlan", NAME_WLAN_LEN)) { printf("unsupport route cfg cmd-3, cmd=%s.\n", dev); cmd_help(); return -1; -- Gitee