Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
AdRainty
rt-thread
提交
dcd8b802
R
rt-thread
项目概览
AdRainty
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dcd8b802
编写于
7月 02, 2019
作者:
Lawlieta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[net][netdev] Delete network commands interrupt disable processing
Signed-off-by:
chenyong
<
1521761801@qq.com
>
上级
48857d1e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
34 deletion
+19
-34
components/net/lwip-1.4.1/src/netif/ethernetif.c
components/net/lwip-1.4.1/src/netif/ethernetif.c
+4
-4
components/net/lwip-2.0.2/src/netif/ethernetif.c
components/net/lwip-2.0.2/src/netif/ethernetif.c
+4
-4
components/net/lwip-2.1.0/src/netif/ethernetif.c
components/net/lwip-2.1.0/src/netif/ethernetif.c
+4
-4
components/net/netdev/include/netdev.h
components/net/netdev/include/netdev.h
+1
-1
components/net/netdev/src/netdev.c
components/net/netdev/src/netdev.c
+6
-21
未找到文件。
components/net/lwip-1.4.1/src/netif/ethernetif.c
浏览文件 @
dcd8b802
...
...
@@ -160,7 +160,7 @@ static int lwip_netdev_set_dhcp(struct netdev *netif, rt_bool_t is_enabled)
}
#endif
/* RT_LWIP_DHCP */
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
#ifdef RT_LWIP_USING_PING
extern
int
lwip_ping_recv
(
int
s
,
int
*
ttl
);
extern
err_t
lwip_ping_send
(
int
s
,
ip_addr_t
*
addr
,
int
size
);
...
...
@@ -251,7 +251,7 @@ void lwip_netdev_netstat(struct netdev *netif)
#endif
}
#endif
/* RT_LWIP_TCP || RT_LWIP_UDP */
#endif
/*
FINSH_USING_M
SH */
#endif
/*
RT_USING_FIN
SH */
const
struct
netdev_ops
lwip_netdev_ops
=
{
...
...
@@ -271,7 +271,7 @@ const struct netdev_ops lwip_netdev_ops =
NULL
,
#endif
/* RT_LWIP_DHCP */
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
#ifdef RT_LWIP_USING_PING
lwip_netdev_ping
,
#else
...
...
@@ -281,7 +281,7 @@ const struct netdev_ops lwip_netdev_ops =
#if defined (RT_LWIP_TCP) || defined (RT_LWIP_UDP)
lwip_netdev_netstat
,
#endif
/* RT_LWIP_TCP || RT_LWIP_UDP */
#endif
/*
FINSH_USING_M
SH */
#endif
/*
RT_USING_FIN
SH */
};
static
int
netdev_add
(
struct
netif
*
lwip_netif
)
...
...
components/net/lwip-2.0.2/src/netif/ethernetif.c
浏览文件 @
dcd8b802
...
...
@@ -168,7 +168,7 @@ static int lwip_netdev_set_dhcp(struct netdev *netif, rt_bool_t is_enabled)
}
#endif
/* RT_LWIP_DHCP */
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
#ifdef RT_LWIP_USING_PING
extern
int
lwip_ping_recv
(
int
s
,
int
*
ttl
);
extern
err_t
lwip_ping_send
(
int
s
,
ip_addr_t
*
addr
,
int
size
);
...
...
@@ -259,7 +259,7 @@ void lwip_netdev_netstat(struct netdev *netif)
#endif
}
#endif
/* RT_LWIP_TCP || RT_LWIP_UDP */
#endif
/*
FINSH_USING_M
SH */
#endif
/*
RT_USING_FIN
SH */
const
struct
netdev_ops
lwip_netdev_ops
=
{
...
...
@@ -279,7 +279,7 @@ const struct netdev_ops lwip_netdev_ops =
NULL
,
#endif
/* RT_LWIP_DHCP */
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
#ifdef RT_LWIP_USING_PING
lwip_netdev_ping
,
#else
...
...
@@ -289,7 +289,7 @@ const struct netdev_ops lwip_netdev_ops =
#if defined (RT_LWIP_TCP) || defined (RT_LWIP_UDP)
lwip_netdev_netstat
,
#endif
/* RT_LWIP_TCP || RT_LWIP_UDP */
#endif
/*
FINSH_USING_M
SH */
#endif
/*
RT_USING_FIN
SH */
};
static
int
netdev_add
(
struct
netif
*
lwip_netif
)
...
...
components/net/lwip-2.1.0/src/netif/ethernetif.c
浏览文件 @
dcd8b802
...
...
@@ -169,7 +169,7 @@ static int lwip_netdev_set_dhcp(struct netdev *netif, rt_bool_t is_enabled)
}
#endif
/* RT_LWIP_DHCP */
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
#ifdef RT_LWIP_USING_PING
extern
int
lwip_ping_recv
(
int
s
,
int
*
ttl
);
extern
err_t
lwip_ping_send
(
int
s
,
ip_addr_t
*
addr
,
int
size
);
...
...
@@ -260,7 +260,7 @@ void lwip_netdev_netstat(struct netdev *netif)
#endif
}
#endif
/* RT_LWIP_TCP || RT_LWIP_UDP */
#endif
/*
FINSH_USING_M
SH */
#endif
/*
RT_USING_FIN
SH */
const
struct
netdev_ops
lwip_netdev_ops
=
{
...
...
@@ -280,7 +280,7 @@ const struct netdev_ops lwip_netdev_ops =
NULL
,
#endif
/* RT_LWIP_DHCP */
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
#ifdef RT_LWIP_USING_PING
lwip_netdev_ping
,
#else
...
...
@@ -290,7 +290,7 @@ const struct netdev_ops lwip_netdev_ops =
#if defined (RT_LWIP_TCP) || defined (RT_LWIP_UDP)
lwip_netdev_netstat
,
#endif
/* RT_LWIP_TCP || RT_LWIP_UDP */
#endif
/*
FINSH_USING_M
SH */
#endif
/*
RT_USING_FIN
SH */
};
static
int
netdev_add
(
struct
netif
*
lwip_netif
)
...
...
components/net/netdev/include/netdev.h
浏览文件 @
dcd8b802
...
...
@@ -132,7 +132,7 @@ struct netdev_ops
int
(
*
set_dns_server
)(
struct
netdev
*
netdev
,
uint8_t
dns_num
,
ip_addr_t
*
dns_server
);
int
(
*
set_dhcp
)(
struct
netdev
*
netdev
,
rt_bool_t
is_enabled
);
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
/* set network interface device common network interface device operations */
int
(
*
ping
)(
struct
netdev
*
netdev
,
const
char
*
host
,
size_t
data_len
,
uint32_t
timeout
,
struct
netdev_ping_resp
*
ping_resp
);
void
(
*
netstat
)(
struct
netdev
*
netdev
);
...
...
components/net/netdev/src/netdev.c
浏览文件 @
dcd8b802
...
...
@@ -821,7 +821,7 @@ void netdev_low_level_set_dhcp_status(struct netdev *netdev, rt_bool_t is_enable
}
}
#ifdef
FINSH_USING_M
SH
#ifdef
RT_USING_FIN
SH
#include <finsh.h>
...
...
@@ -832,7 +832,6 @@ static void netdev_list_if(void)
#define NETDEV_IFCONFIG_IEMI_MAX_LEN 8
rt_ubase_t
index
;
rt_base_t
level
;
rt_slist_t
*
node
=
RT_NULL
;
struct
netdev
*
netdev
=
RT_NULL
;
struct
netdev
*
cur_netdev_list
=
netdev_list
;
...
...
@@ -843,14 +842,12 @@ static void netdev_list_if(void)
return
;
}
level
=
rt_hw_interrupt_disable
();
for
(
node
=
&
(
cur_netdev_list
->
list
);
node
;
node
=
rt_slist_next
(
node
))
{
netdev
=
rt_list_entry
(
node
,
struct
netdev
,
list
);
rt_kprintf
(
"network interface device: %s%s
\n
"
,
netdev
->
name
,
rt_kprintf
(
"network interface device: %
.*
s%s
\n
"
,
RT_NAME_MAX
,
netdev
->
name
,
(
netdev
==
netdev_default
)
?
" (Default)"
:
""
);
rt_kprintf
(
"MTU: %d
\n
"
,
netdev
->
mtu
);
...
...
@@ -925,8 +922,6 @@ static void netdev_list_if(void)
rt_kprintf
(
"
\n
"
);
}
}
rt_hw_interrupt_enable
(
level
);
}
static
void
netdev_set_if
(
char
*
netdev_name
,
char
*
ip_addr
,
char
*
gw_addr
,
char
*
nm_addr
)
...
...
@@ -1075,19 +1070,16 @@ FINSH_FUNCTION_EXPORT_ALIAS(netdev_ping, __cmd_ping, ping network host);
static
void
netdev_list_dns
(
void
)
{
rt_base_t
level
;
int
index
=
0
;
struct
netdev
*
netdev
=
RT_NULL
;
rt_slist_t
*
node
=
RT_NULL
;
level
=
rt_hw_interrupt_disable
();
for
(
node
=
&
(
netdev_list
->
list
);
node
;
node
=
rt_slist_next
(
node
))
{
netdev
=
rt_list_entry
(
node
,
struct
netdev
,
list
);
rt_kprintf
(
"network interface device: %s%s
\n
"
,
netdev
->
name
,
rt_kprintf
(
"network interface device: %
.*
s%s
\n
"
,
RT_NAME_MAX
,
netdev
->
name
,
(
netdev
==
netdev_default
)
?
" (Default)"
:
""
);
for
(
index
=
0
;
index
<
NETDEV_DNS_SERVERS_NUM
;
index
++
)
...
...
@@ -1100,8 +1092,6 @@ static void netdev_list_dns(void)
rt_kprintf
(
"
\n
"
);
}
}
rt_hw_interrupt_enable
(
level
);
}
static
void
netdev_set_dns
(
char
*
netdev_name
,
uint8_t
dns_num
,
char
*
dns_server
)
...
...
@@ -1149,7 +1139,6 @@ FINSH_FUNCTION_EXPORT_ALIAS(netdev_dns, __cmd_dns, list and set the information
#ifdef NETDEV_USING_NETSTAT
static
void
netdev_cmd_netstat
(
void
)
{
rt_base_t
level
;
rt_slist_t
*
node
=
RT_NULL
;
struct
netdev
*
netdev
=
RT_NULL
;
struct
netdev
*
cur_netdev_list
=
netdev_list
;
...
...
@@ -1160,8 +1149,6 @@ static void netdev_cmd_netstat(void)
return
;
}
level
=
rt_hw_interrupt_disable
();
for
(
node
=
&
(
cur_netdev_list
->
list
);
node
;
node
=
rt_slist_next
(
node
))
{
netdev
=
rt_list_entry
(
node
,
struct
netdev
,
list
);
...
...
@@ -1172,8 +1159,6 @@ static void netdev_cmd_netstat(void)
}
}
rt_hw_interrupt_enable
(
level
);
netdev
->
ops
->
netstat
(
netdev
);
}
...
...
@@ -1193,4 +1178,4 @@ int netdev_netstat(int argc, char **argv)
FINSH_FUNCTION_EXPORT_ALIAS
(
netdev_netstat
,
__cmd_netstat
,
list
the
information
of
TCP
/
IP
);
#endif
/* NETDEV_USING_NETSTAT */
#endif
/*
FINSH_USING_M
SH */
#endif
/*
RT_USING_FIN
SH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录