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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ip6.c

?? 最新版FreeRTOS, 包擴(kuò)多種開發(fā)平臺(tái)的移植
?? C
字號(hào):
/* * 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> * *//* ip.c * * This is the code for the IP layer for IPv6. * */#include "lwip/opt.h"#include "lwip/def.h"#include "lwip/mem.h"#include "lwip/ip.h"#include "lwip/inet.h"#include "lwip/netif.h"#include "lwip/icmp.h"#include "lwip/udp.h"#include "lwip/tcp.h"#include "lwip/stats.h"#include "arch/perf.h"/* ip_init: * * Initializes the IP layer. */voidip_init(void){}/* ip_route: * * Finds the appropriate network interface for a given IP address. It searches the * list of network interfaces linearly. A match is found if the masked IP address of * the network interface equals the masked IP address given to the function. */struct netif *ip_route(struct ip_addr *dest){  struct netif *netif;  for(netif = netif_list; netif != NULL; netif = netif->next) {    if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) {      return netif;    }  }  return netif_default;}/* ip_forward: * * Forwards an IP packet. It finds an appropriate route for the packet, decrements * the TTL value of the packet, adjusts the checksum and outputs the packet on the * appropriate interface. */static voidip_forward(struct pbuf *p, struct ip_hdr *iphdr){  struct netif *netif;  PERF_START;  if ((netif = ip_route((struct ip_addr *)&(iphdr->dest))) == NULL) {    LWIP_DEBUGF(IP_DEBUG, ("ip_input: no forwarding route found for "));#if IP_DEBUG    ip_addr_debug_print(IP_DEBUG, &(iphdr->dest));#endif /* IP_DEBUG */    LWIP_DEBUGF(IP_DEBUG, ("\n"));    pbuf_free(p);    return;  }  /* Decrement TTL and send ICMP if ttl == 0. */  if (--iphdr->hoplim == 0) {    /* Don't send ICMP messages in response to ICMP messages */    if (iphdr->nexthdr != IP_PROTO_ICMP) {      icmp_time_exceeded(p, ICMP_TE_TTL);    }    pbuf_free(p);    return;  }  /* Incremental update of the IP checksum. */  /*  if (iphdr->chksum >= htons(0xffff - 0x100)) {    iphdr->chksum += htons(0x100) + 1;  } else {    iphdr->chksum += htons(0x100);    }*/  LWIP_DEBUGF(IP_DEBUG, ("ip_forward: forwarding packet to "));#if IP_DEBUG  ip_addr_debug_print(IP_DEBUG, &(iphdr->dest));#endif /* IP_DEBUG */  LWIP_DEBUGF(IP_DEBUG, ("\n"));#ifdef IP_STATS  ++lwip_stats.ip.fw;  ++lwip_stats.ip.xmit;#endif /* IP_STATS */  PERF_STOP("ip_forward");  netif->output(netif, p, (struct ip_addr *)&(iphdr->dest));}/* ip_input: * * This function is called by the network interface device driver when an IP packet is * received. The function does the basic checks of the IP header such as packet size * being at least larger than the header size etc. If the packet was not destined for * us, the packet is forwarded (using ip_forward). The IP checksum is always checked. * * Finally, the packet is sent to the upper layer protocol input function. */voidip_input(struct pbuf *p, struct netif *inp) {  struct ip_hdr *iphdr;  struct netif *netif;  PERF_START;#if IP_DEBUG  ip_debug_print(p);#endif /* IP_DEBUG */#ifdef IP_STATS  ++lwip_stats.ip.recv;#endif /* IP_STATS */  /* identify the IP header */  iphdr = p->payload;  if (iphdr->v != 6) {    LWIP_DEBUGF(IP_DEBUG, ("IP packet dropped due to bad version number\n"));#if IP_DEBUG    ip_debug_print(p);#endif /* IP_DEBUG */    pbuf_free(p);#ifdef IP_STATS    ++lwip_stats.ip.err;    ++lwip_stats.ip.drop;#endif /* IP_STATS */    return;  }  /* is this packet for us? */  for(netif = netif_list; netif != NULL; netif = netif->next) {#if IP_DEBUG    LWIP_DEBUGF(IP_DEBUG, ("ip_input: iphdr->dest "));    ip_addr_debug_print(IP_DEBUG, &(iphdr->dest));    LWIP_DEBUGF(IP_DEBUG, ("netif->ip_addr "));    ip_addr_debug_print(IP_DEBUG, &(netif->ip_addr));    LWIP_DEBUGF(IP_DEBUG, ("\n"));#endif /* IP_DEBUG */    if (ip_addr_cmp(&(iphdr->dest), &(netif->ip_addr))) {      break;    }  }  if (netif == NULL) {    /* packet not for us, route or discard */#ifdef IP_FORWARD    ip_forward(p, iphdr);#endif    pbuf_free(p);    return;  }  pbuf_realloc(p, IP_HLEN + ntohs(iphdr->len));  /* send to upper layers */#if IP_DEBUG  /*  LWIP_DEBUGF("ip_input: \n");  ip_debug_print(p);  LWIP_DEBUGF("ip_input: p->len %u p->tot_len %u\n", p->len, p->tot_len);*/#endif /* IP_DEBUG */  pbuf_header(p, -IP_HLEN);  switch (iphdr->nexthdr) {  case IP_PROTO_UDP:    udp_input(p);    break;  case IP_PROTO_TCP:    tcp_input(p);    break;  case IP_PROTO_ICMP:    icmp_input(p, inp);    break;  default:    /* send ICMP destination protocol unreachable */    icmp_dest_unreach(p, ICMP_DUR_PROTO);    pbuf_free(p);    LWIP_DEBUGF(IP_DEBUG, ("Unsupported transport protocol %u\n",          iphdr->nexthdr));#ifdef IP_STATS    ++lwip_stats.ip.proterr;    ++lwip_stats.ip.drop;#endif /* IP_STATS */  }  PERF_STOP("ip_input");}/* ip_output_if: * * Sends an IP packet on a network interface. This function constructs the IP header * and calculates the IP header checksum. If the source IP address is NULL, * the IP address of the outgoing network interface is filled in as source address. */err_tip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,       u8_t ttl,       u8_t proto, struct netif *netif){  struct ip_hdr *iphdr;  PERF_START;  printf("len %u tot_len %u\n", p->len, p->tot_len);  if (pbuf_header(p, IP_HLEN)) {    LWIP_DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n"));#ifdef IP_STATS    ++lwip_stats.ip.err;#endif /* IP_STATS */    return ERR_BUF;  }  printf("len %u tot_len %u\n", p->len, p->tot_len);  iphdr = p->payload;  if (dest != IP_HDRINCL) {    printf("!IP_HDRLINCL\n");    iphdr->hoplim = ttl;    iphdr->nexthdr = proto;    iphdr->len = htons(p->tot_len - IP_HLEN);    ip_addr_set(&(iphdr->dest), dest);    iphdr->v = 6;    if (ip_addr_isany(src)) {      ip_addr_set(&(iphdr->src), &(netif->ip_addr));    } else {      ip_addr_set(&(iphdr->src), src);    }  } else {    dest = &(iphdr->dest);  }#ifdef IP_STATS  ++lwip_stats.ip.xmit;#endif /* IP_STATS */  LWIP_DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %u)\n", netif->name[0], netif->name[1], p->tot_len));#if IP_DEBUG  ip_debug_print(p);#endif /* IP_DEBUG */  PERF_STOP("ip_output_if");  return netif->output(netif, p, dest);}/* ip_output: * * Simple interface to ip_output_if. It finds the outgoing network interface and * calls upon ip_output_if to do the actual work. */err_tip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,    u8_t ttl, u8_t proto){  struct netif *netif;  if ((netif = ip_route(dest)) == NULL) {    LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to 0x%lx\n", dest->addr));#ifdef IP_STATS    ++lwip_stats.ip.rterr;#endif /* IP_STATS */    return ERR_RTE;  }  return ip_output_if (p, src, dest, ttl, proto, netif);}#if IP_DEBUGvoidip_debug_print(struct pbuf *p){  struct ip_hdr *iphdr = p->payload;  char *payload;  payload = (char *)iphdr + IP_HLEN;  LWIP_DEBUGF(IP_DEBUG, ("IP header:\n"));  LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));  LWIP_DEBUGF(IP_DEBUG, ("|%2d |  %x%x  |      %x%x           | (v, traffic class, flow label)\n",        iphdr->v,        iphdr->tclass1, iphdr->tclass2,        iphdr->flow1, iphdr->flow2));  LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));  LWIP_DEBUGF(IP_DEBUG, ("|    %5u      | %2u  |  %2u   | (len, nexthdr, hoplim)\n",        ntohs(iphdr->len),        iphdr->nexthdr,        iphdr->hoplim));  LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",        ntohl(iphdr->src.addr[0]) >> 16 & 0xffff,        ntohl(iphdr->src.addr[0]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",        ntohl(iphdr->src.addr[1]) >> 16 & 0xffff,        ntohl(iphdr->src.addr[1]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",        ntohl(iphdr->src.addr[2]) >> 16 & 0xffff,        ntohl(iphdr->src.addr[2]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",        ntohl(iphdr->src.addr[3]) >> 16 & 0xffff,        ntohl(iphdr->src.addr[3]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",        ntohl(iphdr->dest.addr[0]) >> 16 & 0xffff,        ntohl(iphdr->dest.addr[0]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",        ntohl(iphdr->dest.addr[1]) >> 16 & 0xffff,        ntohl(iphdr->dest.addr[1]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",        ntohl(iphdr->dest.addr[2]) >> 16 & 0xffff,        ntohl(iphdr->dest.addr[2]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",        ntohl(iphdr->dest.addr[3]) >> 16 & 0xffff,        ntohl(iphdr->dest.addr[3]) & 0xffff));  LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));}#endif /* IP_DEBUG */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲制服丝袜在线| 亚洲免费观看高清完整版在线 | 久久精品夜夜夜夜久久| 另类成人小视频在线| 欧美日韩国产a| 亚洲精品国产a| 欧美系列在线观看| 亚洲成人综合视频| 欧美男同性恋视频网站| 成人午夜激情在线| 中文字幕一区二区三区四区不卡| 国产伦精品一区二区三区视频青涩| 欧美电视剧在线观看完整版| 久久精品久久99精品久久| 一区二区三区四区在线免费观看| 欧美日本视频在线| 99精品一区二区三区| 亚洲激情图片一区| 中文字幕在线一区| 色噜噜狠狠色综合欧洲selulu| 亚洲精品va在线观看| 国产精品久久久久久久久图文区 | 成人h动漫精品| 天天色天天操综合| 久久免费午夜影院| 成人午夜又粗又硬又大| 极品少妇一区二区| 亚洲三级久久久| 在线91免费看| 成人晚上爱看视频| 国产v综合v亚洲欧| 日韩国产一区二| 久久久久久久久久电影| 欧美电影免费观看完整版| 欧美一区二区成人| 99久久免费视频.com| 国产91丝袜在线播放0| 风间由美一区二区三区在线观看| 国产在线播放一区三区四| 国内成人免费视频| 亚洲国产色一区| 中文字幕免费不卡在线| 欧美日韩中文另类| 成人一区二区视频| 欧美三级日韩三级| 在线视频综合导航| 国产高清在线观看免费不卡| 亚洲第一综合色| 午夜视频一区二区| 日韩高清一区二区| 美女免费视频一区二区| 亚洲国产精品天堂| 日韩**一区毛片| 久久不见久久见免费视频7| 国内精品久久久久影院色| 国产在线播放一区三区四| 岛国精品在线播放| 色先锋aa成人| 成人一区二区三区视频| 一本一道久久a久久精品| 欧洲一区二区三区在线| 日韩午夜小视频| 欧美亚洲免费在线一区| 欧美一区二区三区四区久久| 久久久99精品免费观看| 1区2区3区欧美| 午夜在线成人av| 韩日欧美一区二区三区| 成a人片国产精品| 欧美色网一区二区| 久久久久久久久久美女| 伊人色综合久久天天人手人婷| 日韩中文字幕1| 日韩精品欧美精品| 国产伦精品一区二区三区在线观看| 成人ar影院免费观看视频| 欧美日韩一区二区三区高清| 久久综合久久综合久久综合| 日韩欧美一级二级三级久久久| 久久精品水蜜桃av综合天堂| 亚洲九九爱视频| 久久99精品久久久久久国产越南 | 欧美日韩国产免费| 久久九九久精品国产免费直播| 亚洲九九爱视频| 国内一区二区在线| 欧美三级三级三级爽爽爽| 国产日韩欧美精品一区| 国产情人综合久久777777| 亚洲国产aⅴ成人精品无吗| 国产精品一级黄| 国内精品视频666| 欧美色中文字幕| 国产精品久久久久久久久动漫| 奇米精品一区二区三区四区| 捆绑紧缚一区二区三区视频| 91视频www| 日本精品视频一区二区三区| 久久亚洲一区二区三区四区| 午夜欧美视频在线观看 | 国产成人午夜视频| 欧美日韩一区高清| 国产精品久久久久精k8| 精品一区二区三区日韩| 欧美日本乱大交xxxxx| 综合激情网...| 成人在线综合网站| 久久亚洲精品国产精品紫薇| 男男gaygay亚洲| 欧美日韩成人高清| 亚洲最大色网站| 99精品欧美一区二区蜜桃免费| 久久精品水蜜桃av综合天堂| 青青草成人在线观看| 欧美日韩在线三级| 亚洲美女一区二区三区| 不卡一卡二卡三乱码免费网站| 精品国产一区二区三区久久久蜜月| 国产色91在线| 日本道在线观看一区二区| 久久精品人人做人人爽97| 日韩av不卡一区二区| 欧美精品亚洲一区二区在线播放| 精品日本一线二线三线不卡| 中文字幕精品—区二区四季| 国内精品视频666| 亚洲精品一区在线观看| 另类小说一区二区三区| 欧美一区二区成人6969| 免费在线观看成人| 日韩久久久精品| 奇米色777欧美一区二区| 91麻豆精品久久久久蜜臀| 亚洲国产欧美在线| 欧美日韩久久一区| 亚洲va欧美va国产va天堂影院| 精品视频1区2区3区| 舔着乳尖日韩一区| 欧美丰满少妇xxxxx高潮对白| 亚洲超碰97人人做人人爱| 欧美日韩成人综合天天影院| 日韩国产精品久久| 精品国产免费人成在线观看| 国内精品久久久久影院色| 国产日韩欧美亚洲| 91免费版在线看| 亚洲国产精品自拍| 91精品国产免费| 国产美女在线精品| 国产精品―色哟哟| 免费高清视频精品| 精品国产乱码久久久久久牛牛 | 久久香蕉国产线看观看99| 国产在线播放一区二区三区| 日本一区二区三区久久久久久久久不 | 久久精品免费看| 久久久国产精品麻豆| va亚洲va日韩不卡在线观看| 欧美一区二区三区色| 久久99日本精品| 国产精品国产a| 欧美日韩一区二区在线观看| 久久国产精品色| 中文字幕二三区不卡| 色噜噜狠狠色综合欧洲selulu| 日韩中文字幕区一区有砖一区| 久久蜜桃av一区精品变态类天堂 | 91福利国产精品| 青青草国产成人99久久| 国产欧美视频一区二区三区| 色综合天天视频在线观看| 蜜臀av性久久久久蜜臀av麻豆| 国产亚洲一区二区三区在线观看| 91毛片在线观看| 麻豆成人免费电影| 最新国产精品久久精品| 91精品国产综合久久小美女| 国产成人精品免费看| 亚洲日本va午夜在线影院| 欧美一区二区视频观看视频| www.99精品| 久久精品国产一区二区三| 亚洲视频在线一区观看| 欧美xxxxxxxx| 在线亚洲一区二区| 韩国av一区二区三区在线观看| 一区二区三区四区亚洲| 久久蜜桃av一区精品变态类天堂| 欧美图区在线视频| 成人精品视频.| 久久电影国产免费久久电影| 亚洲欧美一区二区三区极速播放 | 在线不卡中文字幕| 不卡的av电影| 激情都市一区二区| 亚洲成av人影院| 中文字幕一区二区三区蜜月| 欧美一级免费大片| 欧美午夜视频网站| 99r国产精品|