pbuf.c –
netif.c — 网络接口抽象 lwIP network interface abstraction
- 将网口添加到lwip,支持多个网口同时存在
// Add a network interface to the list of lwIP netifs.
netif_add(struct netif *netif,
const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
void *state, netif_init_fn init, netif_input_fn input)
- 将该网口设置为默认网口
// Set a network interface as the default network interface
void netif_set_default(struct netif *netif)
- 打开网卡
void netif_set_up(struct netif *netif)
ethernetif.c
在这里插入代码片
参考资料
正点原子LWIP 网络接口管理