亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? netif.c

?? “華為模塊(GTM900)+ ARM(LPC2104) + LWIP1.1”以PPP 方式實(shí)現(xiàn)GPRS 無(wú)線數(shù)據(jù)傳輸
?? C
字號(hào):
/** * @file * * lwIP network interface abstraction *//* * Copyright (c) 2001-2004 Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, *    this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, *    this list of conditions and the following disclaimer in the documentation *    and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products *    derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels <adam@sics.se> * */#include "lwip/opt.h"#include "lwip/def.h"#include "lwip/ip_addr.h"#include "lwip/netif.h"#include "lwip/tcp.h"struct netif *netif_list = NULL;struct netif *netif_default = NULL;/** * Add a network interface to the list of lwIP netifs. * * @param netif a pre-allocated netif structure * @param ipaddr IP address for the new netif * @param netmask network mask for the new netif * @param gw default gateway IP address for the new netif * @param state opaque data passed to the new netif * @param init callback function that initializes the interface * @param input callback function that is called to pass * ingress packets up in the protocol layer stack. * * @return netif, or NULL if failed. */struct netif *netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask,  struct ip_addr *gw,  void *state,  err_t (* init)(struct netif *netif),  err_t (* input)(struct pbuf *p, struct netif *netif)){  static int netifnum = 0;  #if LWIP_DHCP  /* netif not under DHCP control by default */  netif->dhcp = NULL;#endif  /* remember netif specific state information data */  netif->state = state;  netif->num = netifnum++;  netif->input = input;  netif_set_addr(netif, ipaddr, netmask, gw);  /* call user specified initialization function for netif */  if (init(netif) != ERR_OK) {    return NULL;  }  /* add this netif to the list */  netif->next = netif_list;  netif_list = netif;  LWIP_DEBUGF(NETIF_DEBUG, ("netif: added interface %c%c IP addr ",    netif->name[0], netif->name[1]));  ip_addr_debug_print(NETIF_DEBUG, ipaddr);  LWIP_DEBUGF(NETIF_DEBUG, (" netmask "));  ip_addr_debug_print(NETIF_DEBUG, netmask);  LWIP_DEBUGF(NETIF_DEBUG, (" gw "));  ip_addr_debug_print(NETIF_DEBUG, gw);  LWIP_DEBUGF(NETIF_DEBUG, ("\n"));  return netif;}voidnetif_set_addr(struct netif *netif,struct ip_addr *ipaddr, struct ip_addr *netmask,    struct ip_addr *gw){  netif_set_ipaddr(netif, ipaddr);  netif_set_netmask(netif, netmask);  netif_set_gw(netif, gw);}void netif_remove(struct netif * netif){  if ( netif == NULL ) return;  /*  is it the first netif? */  if (netif_list == netif) {    netif_list = netif->next;  }  else {    /*  look for netif further down the list */    struct netif * tmpNetif;    for (tmpNetif = netif_list; tmpNetif != NULL; tmpNetif = tmpNetif->next) {      if (tmpNetif->next == netif) {        tmpNetif->next = netif->next;        break;        }    }    if (tmpNetif == NULL)      return; /*  we didn't find any netif today */  }  /* this netif is default? */  if (netif_default == netif)    /* reset default netif */    netif_default = NULL;  LWIP_DEBUGF( NETIF_DEBUG, ("netif_remove: removed netif\n") );}struct netif *netif_find(char *name){  struct netif *netif;  u8_t num;  if (name == NULL) {    return NULL;  }  num = name[2] - '0';  for(netif = netif_list; netif != NULL; netif = netif->next) {    if (num == netif->num &&       name[0] == netif->name[0] &&       name[1] == netif->name[1]) {      LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: found %c%c\n", name[0], name[1]));      return netif;    }  }  LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1]));  return NULL;}voidnetif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr){  /* TODO: Handling of obsolete pcbs */  /* See:  http://mail.gnu.org/archive/html/lwip-users/2003-03/msg00118.html */#if LWIP_TCP  struct tcp_pcb *pcb;  struct tcp_pcb_listen *lpcb;  /* address is actually being changed? */  if ((ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0)  {    /* extern struct tcp_pcb *tcp_active_pcbs; defined by tcp.h */    LWIP_DEBUGF(NETIF_DEBUG | 1, ("netif_set_ipaddr: netif address being changed\n"));    pcb = tcp_active_pcbs;    while (pcb != NULL) {      /* PCB bound to current local interface address? */      if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr))) {        /* this connection must be aborted */        struct tcp_pcb *next = pcb->next;        LWIP_DEBUGF(NETIF_DEBUG | 1, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb));        tcp_abort(pcb);        pcb = next;      } else {        pcb = pcb->next;      }    }    for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {      /* PCB bound to current local interface address? */      if (ip_addr_cmp(&(lpcb->local_ip), &(netif->ip_addr))) {        /* The PCB is listening to the old ipaddr and         * is set to listen to the new one instead */        ip_addr_set(&(lpcb->local_ip), ipaddr);      }    }  }#endif  ip_addr_set(&(netif->ip_addr), ipaddr);#if 0 /* only allowed for Ethernet interfaces TODO: how can we check? */  /** For Ethernet network interfaces, we would like to send a   *  "gratuitous ARP"; this is an ARP packet sent by a node in order   *  to spontaneously cause other nodes to update an entry in their   *  ARP cache. From RFC 3220 "IP Mobility Support for IPv4" section 4.6.   */   etharp_query(netif, ipaddr, NULL);#endif  LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %u.%u.%u.%u\n",    netif->name[0], netif->name[1],    ip4_addr1(&netif->ip_addr),    ip4_addr2(&netif->ip_addr),    ip4_addr3(&netif->ip_addr),    ip4_addr4(&netif->ip_addr)));}voidnetif_set_gw(struct netif *netif, struct ip_addr *gw){  ip_addr_set(&(netif->gw), gw);  LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %u.%u.%u.%u\n",    netif->name[0], netif->name[1],    ip4_addr1(&netif->gw),    ip4_addr2(&netif->gw),    ip4_addr3(&netif->gw),    ip4_addr4(&netif->gw)));}voidnetif_set_netmask(struct netif *netif, struct ip_addr *netmask){  ip_addr_set(&(netif->netmask), netmask);  LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %u.%u.%u.%u\n",    netif->name[0], netif->name[1],    ip4_addr1(&netif->netmask),    ip4_addr2(&netif->netmask),    ip4_addr3(&netif->netmask),    ip4_addr4(&netif->netmask)));}voidnetif_set_default(struct netif *netif){  netif_default = netif;  LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n",           netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\''));}/** * Bring an interface up, available for processing * traffic. *  * @note: Enabling DHCP on a down interface will make it come * up once configured. *  * @see dhcp_start() */ void netif_set_up(struct netif *netif){  netif->flags |= NETIF_FLAG_UP;}/** * Ask if an interface is up */ u8_t netif_is_up(struct netif *netif){  return (netif->flags & NETIF_FLAG_UP)?1:0;}/** * Bring an interface down, disabling any traffic processing. * * @note: Enabling DHCP on a down interface will make it come * up once configured. *  * @see dhcp_start() */ void netif_set_down(struct netif *netif){  netif->flags &= ~NETIF_FLAG_UP;}voidnetif_init(void){  netif_list = netif_default = NULL;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美在线一区二区三区| 精品国产网站在线观看| 久久国产婷婷国产香蕉| 亚洲国产成人私人影院tom| 欧美日韩国产大片| 成人黄色电影在线| 美女爽到高潮91| 一区在线播放视频| 欧美电视剧免费观看| 99久久精品国产精品久久| 美女视频第一区二区三区免费观看网站| 久久久91精品国产一区二区精品| 91福利社在线观看| 成人一级片网址| 免费成人在线观看| 亚洲一区二区三区中文字幕| 国产婷婷色一区二区三区四区 | 91精品国产福利| 99久久久久久| 国产成人av网站| 毛片一区二区三区| 午夜成人免费电影| 亚洲精品写真福利| 欧美高清在线视频| 久久亚洲影视婷婷| 91精品国产综合久久久久久 | 日日夜夜免费精品视频| 国产精品美女久久福利网站| 精品剧情在线观看| 91精品国产综合久久小美女| 欧美午夜精品久久久| eeuss鲁片一区二区三区在线观看| 国产在线精品免费| 久久精品国产色蜜蜜麻豆| 亚洲成人久久影院| 亚洲免费高清视频在线| 中文字幕一区二区三区在线播放| 国产亚洲欧美日韩在线一区| 欧美videos大乳护士334| 正在播放亚洲一区| 欧美日韩一区二区三区四区| 91久久精品一区二区三| 色狠狠一区二区| 91日韩精品一区| 99热在这里有精品免费| 97久久精品人人做人人爽| 成人黄色在线网站| 99精品欧美一区二区蜜桃免费| 成人自拍视频在线| 成人综合婷婷国产精品久久蜜臀| 国产精品系列在线观看| 国产精品影视网| 国产激情精品久久久第一区二区| 精品一区二区三区在线播放| 韩国精品久久久| 国产成人在线视频网址| 国产成a人亚洲| 不卡一区中文字幕| 色综合久久中文字幕综合网| 91色在线porny| 欧美视频第二页| 欧美一区二区视频在线观看2020| 日韩欧美一级二级三级久久久| 日韩欧美一区二区三区在线| 2023国产精品| 国产精品国产三级国产| 一区二区三区av电影| 日日摸夜夜添夜夜添精品视频| 免费观看在线色综合| 国产精品一区二区果冻传媒| 北岛玲一区二区三区四区| 在线视频你懂得一区| 91精品国模一区二区三区| 精品伦理精品一区| 国产精品国产三级国产普通话99| 一区二区三区精品在线| 青草国产精品久久久久久| 国产一区二区三区不卡在线观看| 本田岬高潮一区二区三区| 在线观看欧美黄色| 欧美精品一区男女天堂| 国产精品国产馆在线真实露脸| 亚洲国产视频a| 国产一二精品视频| 欧洲精品在线观看| 精品区一区二区| 中文字幕一区二区三区不卡在线 | 国产在线视频不卡二| 成年人国产精品| 91精品国产综合久久香蕉麻豆| 久久香蕉国产线看观看99| 综合色天天鬼久久鬼色| 日韩av成人高清| www.日韩精品| 日韩欧美国产一区在线观看| 国产精品色在线观看| 日韩精品一级中文字幕精品视频免费观看 | 日韩一二三区视频| 中文字幕一区二区视频| 蜜桃久久久久久| 成人动漫在线一区| 欧美一区欧美二区| 日韩理论片网站| 极品尤物av久久免费看| 在线观看91视频| 欧美国产日本韩| 麻豆国产91在线播放| 91麻豆123| 中文字幕精品一区二区三区精品| 图片区日韩欧美亚洲| 97久久超碰精品国产| 久久日韩粉嫩一区二区三区| 午夜婷婷国产麻豆精品| 成人av电影在线网| 久久午夜羞羞影院免费观看| 午夜精品久久久久久久| 色综合中文字幕国产 | 欧美性videosxxxxx| 中文字幕欧美激情一区| 麻豆久久久久久| 欧美三级欧美一级| 亚洲精选免费视频| 成人性生交大合| 久久久一区二区三区| 日本欧美肥老太交大片| 欧美专区日韩专区| 中文字幕一区二区三区在线播放| 国产精品自拍三区| 欧美成人精品3d动漫h| 天天色 色综合| 欧美三级日韩三级| 亚洲资源中文字幕| 欧美性xxxxxxxx| 亚洲综合成人在线视频| 色视频欧美一区二区三区| 亚洲天堂精品视频| 99国产精品99久久久久久| 国产精品女上位| 国产91对白在线观看九色| 久久久三级国产网站| 国内成人自拍视频| 久久先锋影音av鲁色资源网| 久久se这里有精品| 久久免费午夜影院| 国产一区二区精品在线观看| 久久婷婷国产综合精品青草| 久久综合综合久久综合| 日韩欧美一区在线观看| 伦理电影国产精品| 欧美成人一区二区三区| 久久国产精品无码网站| 欧美电影免费观看高清完整版在线| 美国三级日本三级久久99| 亚洲精品一区二区三区精华液| 久久成人免费网站| 久久蜜桃av一区精品变态类天堂 | 免费成人在线观看| 欧美mv日韩mv| 国产一区二区三区四区五区美女| 久久久亚洲精华液精华液精华液 | 亚洲精品国产精华液| 欧美三级在线播放| 人人狠狠综合久久亚洲| 精品粉嫩超白一线天av| 国产成人超碰人人澡人人澡| 自拍av一区二区三区| 在线一区二区视频| 奇米色777欧美一区二区| 久久人人爽人人爽| 91亚洲精华国产精华精华液| 亚洲成人精品影院| 精品国产一区二区三区av性色| 福利电影一区二区| 一区2区3区在线看| 欧美成人精品二区三区99精品| 成人综合婷婷国产精品久久 | 成人免费高清在线| 亚洲午夜一区二区| 精品国产网站在线观看| 9i在线看片成人免费| 首页国产欧美久久| 国产亚洲成aⅴ人片在线观看| 一本久道久久综合中文字幕| 日日夜夜免费精品视频| 国产欧美日韩精品a在线观看| 欧美在线视频日韩| 国产在线播放一区二区三区| 亚洲免费观看高清完整版在线 | 日本韩国一区二区| 极品尤物av久久免费看| 亚洲精品成人在线| 精品免费视频一区二区| 91国产成人在线| 国产成人日日夜夜| 午夜激情综合网| 国产一区二三区好的| 亚洲综合免费观看高清在线观看 | 26uuu另类欧美亚洲曰本| 成人性生交大片免费看视频在线| 天天综合日日夜夜精品|