Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76519099
rt-thread
提交
ad9c4ea1
R
rt-thread
项目概览
2301_76519099
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
3
Star
1
Fork
1
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
ad9c4ea1
编写于
4月 15, 2021
作者:
L
liuxianliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[restore] Restore format
上级
97432efa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
67 addition
and
67 deletion
+67
-67
components/net/lwip-1.4.1/src/include/netif/ethernetif.h
components/net/lwip-1.4.1/src/include/netif/ethernetif.h
+5
-5
components/net/lwip-1.4.1/src/netif/ethernetif.c
components/net/lwip-1.4.1/src/netif/ethernetif.c
+20
-20
components/net/lwip-2.0.2/src/include/netif/ethernetif.h
components/net/lwip-2.0.2/src/include/netif/ethernetif.h
+5
-5
components/net/lwip-2.0.2/src/netif/ethernetif.c
components/net/lwip-2.0.2/src/netif/ethernetif.c
+16
-16
components/net/lwip-2.1.2/src/include/netif/ethernetif.h
components/net/lwip-2.1.2/src/include/netif/ethernetif.h
+5
-5
components/net/lwip-2.1.2/src/netif/ethernetif.c
components/net/lwip-2.1.2/src/netif/ethernetif.c
+16
-16
未找到文件。
components/net/lwip-1.4.1/src/include/netif/ethernetif.h
浏览文件 @
ad9c4ea1
...
...
@@ -4,16 +4,16 @@
#include "lwip/netif.h"
#include <rtthread.h>
#define NIOCTL_GADDR
0x01
#define NIOCTL_GADDR
0x01
#ifndef RT_LWIP_ETH_MTU
#define ETHERNET_MTU
1500
#define ETHERNET_MTU
1500
#else
#define ETHERNET_MTU
RT_LWIP_ETH_MTU
#define ETHERNET_MTU
RT_LWIP_ETH_MTU
#endif
/* eth flag with auto_linkup or phy_linkup */
#define ETHIF_LINK_AUTOUP
0x0000
#define ETHIF_LINK_PHYUP
0x0100
#define ETHIF_LINK_AUTOUP
0x0000
#define ETHIF_LINK_PHYUP
0x0100
struct
eth_device
{
...
...
components/net/lwip-1.4.1/src/netif/ethernetif.c
浏览文件 @
ad9c4ea1
...
...
@@ -59,9 +59,9 @@
#define netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL)
#ifndef RT_LWIP_ETHTHREAD_PRIORITY
#define RT_ETHERNETIF_THREAD_PREORITY
0x90
#define RT_ETHERNETIF_THREAD_PREORITY
0x90
#else
#define RT_ETHERNETIF_THREAD_PREORITY
RT_LWIP_ETHTHREAD_PRIORITY
#define RT_ETHERNETIF_THREAD_PREORITY
RT_LWIP_ETHTHREAD_PRIORITY
#endif
#ifndef LWIP_NO_TX_THREAD
...
...
@@ -70,8 +70,8 @@
*/
struct
eth_tx_msg
{
struct
netif
*
netif
;
struct
pbuf
*
buf
;
struct
netif
*
netif
;
struct
pbuf
*
buf
;
};
static
struct
rt_mailbox
eth_tx_thread_mb
;
...
...
@@ -368,7 +368,7 @@ static err_t ethernetif_linkoutput(struct netif *netif, struct pbuf *p)
struct
eth_tx_msg
msg
;
struct
eth_device
*
enetif
;
RT_ASSERT
(
netif
!=
RT_NULL
);
RT_ASSERT
(
netif
!=
RT_NULL
);
enetif
=
(
struct
eth_device
*
)
netif
->
state
;
/* send a message to eth tx thread */
...
...
@@ -382,13 +382,13 @@ static err_t ethernetif_linkoutput(struct netif *netif, struct pbuf *p)
#else
struct
eth_device
*
enetif
;
RT_ASSERT
(
netif
!=
RT_NULL
);
RT_ASSERT
(
netif
!=
RT_NULL
);
enetif
=
(
struct
eth_device
*
)
netif
->
state
;
if
(
enetif
->
eth_tx
(
&
(
enetif
->
parent
),
p
)
!=
RT_EOK
)
{
return
ERR_IF
;
}
if
(
enetif
->
eth_tx
(
&
(
enetif
->
parent
),
p
)
!=
RT_EOK
)
{
return
ERR_IF
;
}
#endif
return
ERR_OK
;
}
...
...
@@ -481,16 +481,16 @@ rt_err_t eth_device_init_with_flag(struct eth_device *dev, const char *name, rt_
netif
->
name
[
1
]
=
name
[
1
];
/* set hw address to 6 */
netif
->
hwaddr_len
=
6
;
netif
->
hwaddr_len
=
6
;
/* maximum transfer unit */
netif
->
mtu
=
ETHERNET_MTU
;
netif
->
mtu
=
ETHERNET_MTU
;
/* get hardware MAC address */
rt_device_control
(
&
(
dev
->
parent
),
NIOCTL_GADDR
,
netif
->
hwaddr
);
/* set output */
netif
->
output
=
etharp_output
;
netif
->
linkoutput
=
ethernetif_linkoutput
;
netif
->
output
=
etharp_output
;
netif
->
linkoutput
=
ethernetif_linkoutput
;
#if LWIP_NETIF_HOSTNAME
/* Initialize interface hostname */
...
...
@@ -587,12 +587,12 @@ rt_err_t eth_device_linkchange(struct eth_device* dev, rt_bool_t up)
/* NOTE: please not use it in interrupt when no RxThread exist */
rt_err_t
eth_device_linkchange
(
struct
eth_device
*
dev
,
rt_bool_t
up
)
{
if
(
up
==
RT_TRUE
)
netifapi_netif_set_link_up
(
dev
->
netif
);
else
netifapi_netif_set_link_down
(
dev
->
netif
);
if
(
up
==
RT_TRUE
)
netifapi_netif_set_link_up
(
dev
->
netif
);
else
netifapi_netif_set_link_down
(
dev
->
netif
);
return
RT_EOK
;
return
RT_EOK
;
}
#endif
...
...
@@ -666,7 +666,7 @@ static void eth_rx_thread_entry(void* parameter)
/* receive all of buffer */
while
(
1
)
{
if
(
device
->
eth_rx
==
RT_NULL
)
break
;
if
(
device
->
eth_rx
==
RT_NULL
)
break
;
p
=
device
->
eth_rx
(
&
(
device
->
parent
));
if
(
p
!=
RT_NULL
)
...
...
components/net/lwip-2.0.2/src/include/netif/ethernetif.h
浏览文件 @
ad9c4ea1
...
...
@@ -4,16 +4,16 @@
#include "lwip/netif.h"
#include <rtthread.h>
#define NIOCTL_GADDR
0x01
#define NIOCTL_GADDR
0x01
#ifndef RT_LWIP_ETH_MTU
#define ETHERNET_MTU
1500
#define ETHERNET_MTU
1500
#else
#define ETHERNET_MTU
RT_LWIP_ETH_MTU
#define ETHERNET_MTU
RT_LWIP_ETH_MTU
#endif
/* eth flag with auto_linkup or phy_linkup */
#define ETHIF_LINK_AUTOUP
0x0000
#define ETHIF_LINK_PHYUP
0x0100
#define ETHIF_LINK_AUTOUP
0x0000
#define ETHIF_LINK_PHYUP
0x0100
struct
eth_device
{
...
...
components/net/lwip-2.0.2/src/netif/ethernetif.c
浏览文件 @
ad9c4ea1
...
...
@@ -884,27 +884,27 @@ void list_if(void)
rt_kprintf
(
"gw address: %s
\n
"
,
ipaddr_ntoa
(
&
(
netif
->
gw
)));
rt_kprintf
(
"net mask : %s
\n
"
,
ipaddr_ntoa
(
&
(
netif
->
netmask
)));
#if LWIP_IPV6
{
ip6_addr_t
*
addr
;
int
addr_state
;
int
i
;
{
ip6_addr_t
*
addr
;
int
addr_state
;
int
i
;
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
0
];
addr_state
=
netif
->
ip6_addr_state
[
0
];
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
0
];
addr_state
=
netif
->
ip6_addr_state
[
0
];
rt_kprintf
(
"
\n
ipv6 link-local: %s state:%02X %s
\n
"
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
rt_kprintf
(
"
\n
ipv6 link-local: %s state:%02X %s
\n
"
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
for
(
i
=
1
;
i
<
LWIP_IPV6_NUM_ADDRESSES
;
i
++
)
{
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
i
];
addr_state
=
netif
->
ip6_addr_state
[
i
];
for
(
i
=
1
;
i
<
LWIP_IPV6_NUM_ADDRESSES
;
i
++
)
{
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
i
];
addr_state
=
netif
->
ip6_addr_state
[
i
];
rt_kprintf
(
"ipv6[%d] address: %s state:%02X %s
\n
"
,
i
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
}
rt_kprintf
(
"ipv6[%d] address: %s state:%02X %s
\n
"
,
i
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
}
}
}
rt_kprintf
(
"
\r\n
"
);
#endif
/* LWIP_IPV6 */
netif
=
netif
->
next
;
...
...
components/net/lwip-2.1.2/src/include/netif/ethernetif.h
浏览文件 @
ad9c4ea1
...
...
@@ -4,16 +4,16 @@
#include "lwip/netif.h"
#include <rtthread.h>
#define NIOCTL_GADDR
0x01
#define NIOCTL_GADDR
0x01
#ifndef RT_LWIP_ETH_MTU
#define ETHERNET_MTU
1500
#define ETHERNET_MTU
1500
#else
#define ETHERNET_MTU
RT_LWIP_ETH_MTU
#define ETHERNET_MTU
RT_LWIP_ETH_MTU
#endif
/* eth flag with auto_linkup or phy_linkup */
#define ETHIF_LINK_AUTOUP
0x0000
#define ETHIF_LINK_PHYUP
0x0100
#define ETHIF_LINK_AUTOUP
0x0000
#define ETHIF_LINK_PHYUP
0x0100
struct
eth_device
{
...
...
components/net/lwip-2.1.2/src/netif/ethernetif.c
浏览文件 @
ad9c4ea1
...
...
@@ -886,27 +886,27 @@ void list_if(void)
rt_kprintf
(
"gw address: %s
\n
"
,
ipaddr_ntoa
(
&
(
netif
->
gw
)));
rt_kprintf
(
"net mask : %s
\n
"
,
ipaddr_ntoa
(
&
(
netif
->
netmask
)));
#if LWIP_IPV6
{
ip6_addr_t
*
addr
;
int
addr_state
;
int
i
;
{
ip6_addr_t
*
addr
;
int
addr_state
;
int
i
;
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
0
];
addr_state
=
netif
->
ip6_addr_state
[
0
];
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
0
];
addr_state
=
netif
->
ip6_addr_state
[
0
];
rt_kprintf
(
"
\n
ipv6 link-local: %s state:%02X %s
\n
"
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
rt_kprintf
(
"
\n
ipv6 link-local: %s state:%02X %s
\n
"
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
for
(
i
=
1
;
i
<
LWIP_IPV6_NUM_ADDRESSES
;
i
++
)
{
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
i
];
addr_state
=
netif
->
ip6_addr_state
[
i
];
for
(
i
=
1
;
i
<
LWIP_IPV6_NUM_ADDRESSES
;
i
++
)
{
addr
=
(
ip6_addr_t
*
)
&
netif
->
ip6_addr
[
i
];
addr_state
=
netif
->
ip6_addr_state
[
i
];
rt_kprintf
(
"ipv6[%d] address: %s state:%02X %s
\n
"
,
i
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
}
rt_kprintf
(
"ipv6[%d] address: %s state:%02X %s
\n
"
,
i
,
ip6addr_ntoa
(
addr
),
addr_state
,
ip6_addr_isvalid
(
addr_state
)
?
"VALID"
:
"INVALID"
);
}
}
}
rt_kprintf
(
"
\r\n
"
);
#endif
/* LWIP_IPV6 */
netif
=
netif
->
next
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录