推荐星级:
- 1
- 2
- 3
- 4
- 5
关于Lwip如何实现单网卡多IP设置
资料介绍
在接口配置函数 static void ethernet_configure_interface(void)
再添加一个netif(我做的双ip,添加了一个):
netif_add(&gs_net_if1,&x_ip_addr,&x_net_mask &x gateway,
NULL,ethernetif _init,tcpip_input);
netif_set_status_callback& gs_net_if1,status_callbac);
netif_set_up(&gs_net_if1);
因为是单个网卡ethernetif_init不用做改动,关键改动在
tcpip_input里调用的ethernet_input(p,inp);ethernet_inpu(p,inp)完成对
接收到的arp和ip包的处理;
部分文件列表
文件名 | 大小 |
关于Lwip如何实现单网卡多IP设置.pdf | 10K |
全部评论(0)