<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                該函數是直接拿來用即可,如果沒有特別的需求,基本不需要怎么修改它,它是LwIP中默認的網卡初始化函數,內部封裝了low\_level\_init()函數,具體見代碼清單 4?7。 ``` 1 2 err_t ethernetif_init(struct netif *netif) 3 { 4 struct ethernetif *ethernetif; 5 6 // LWIP_ASSERT("netif != NULL", (netif != NULL)); 7 8 ethernetif = mem_malloc(sizeof(struct ethernetif)); 9 10 if (ethernetif == NULL) 11 { 12 PRINT_ERR("ethernetif_init: out of memory\n"); 13 return ERR_MEM; 14 } 15 16 LWIP_ASSERT("netif != NULL", (netif != NULL)); 17 // 18 #if LWIP_NETIF_HOSTNAME 19 /* Initialize interface hostname */ 20 netif->hostname = "lwip"; 21 #endif /* LWIP_NETIF_HOSTNAME */ 22 netif->state = ethernetif; (1) 23 netif->name[0] = IFNAME0; 24 netif->name[1] = IFNAME1; 25 26 #if LWIP_IPV4 27 #if LWIP_ARP || LWIP_ETHERNET 28 #if LWIP_ARP 29 netif->output = etharp_output; 30 #else 31 32 netif->output = low_level_output_arp_off; 33 #endif /* LWIP_ARP */ 34 #endif /* LWIP_ARP || LWIP_ETHERNET */ 35 #endif /* LWIP_IPV4 */ 36 37 #if LWIP_IPV6 38 netif->output_ip6 = ethip6_output; 39 #endif /* LWIP_IPV6 */ 40 41 netif->linkoutput = low_level_output; 42 43 /* initialize the hardware */ 44 low_level_init(netif); (2) 45 ethernetif->ethaddr = (struct eth_addr *) &(netif->hwaddr[0]); 46 47 return ERR_OK; 48 } ``` * (1):通過netif的state成員變量將ethernetif結構傳遞給上層。 * (2):調用low\_level\_init()函數對網卡進行初始化,而該函數需要我們根據網卡的實際情況進行編寫
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看