LwIP 網路介面管理

2022-05-28 13:51:11 字數 830 閱讀 7000

netif      各種型別網路介面的抽象------------------netif.c  netif.h

————

netif.h

————————————————

//網路介面最大實體地址長度,這裡定義為乙太網網絡卡

mac

位址的長度

6#define netif_max_hwaddr_len 6u

//下面幾個巨集為網路介面屬性、狀態相關的巨集,主要用於描述

netif

中 flags

欄位的各位

#define netif_flag_up 0x01u //

網路介面是否已被上層使能

#define netif_flag_broadcast 0x02u //

網路介面是否支援廣播

#define netif_flag_pointtopoint 0x04u //

網路介面是否屬於點到點連線

#define netif_flag_dhcp 0x08u //

網路介面是否支援

dhcp

功能#define netif_flag_link_up 0x10u //

網路介面的底層鏈路是否已經使能

#define netif_flag_etharp 0x20u //

網路介面是否支援

arp

功能#define netif_flag_igmp 0x40u //

網路介面是否支援

igmp

功能//

下面是結構

netif

的定義struct netif ;

LwIP 網路介面管理

netif 各種型別網路介面的抽象 netif.c netif.h netif.h 網路介面最大實體地址長度,這裡定義為乙太網網絡卡 mac 位址的長度 6 define netif max hwaddr len 6u 下面幾個巨集為網路介面屬性 狀態相關的巨集,主要用於描述 netif 中 fla...

LwIP之網路介面管理

協議棧內部使用netif的結構體來描述網路介面,先來看一下這個結構體。netif結構體 struct netif 關於標誌位的定義如下 網路介面標誌位 define netif flag up 0x01u 網路介面是否已被上層使能 define netif flag broadcast 0x02u ...

LwIP協議棧介面

協議棧api函式 1 netconn new udp tcp struct netconn netconn new enum netconn type t 為新連線申請乙個連線結構netconn空間 2 netconn delete udp tcp err t netconn delete stru...