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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tables.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* tables.c - routines for managing RIP internal routing table *//* Copyright 1984 - 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * Copyright (c) 1983, 1988, 1993 *	The Regents of the University of California.  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. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. * @(#)tables.c	8.2 (Berkeley) 4/28/95 *//*modification history--------------------01r,22mar02,niq  Merged from Synth view, tor3_x.synth branch, ver 02c01q,24jan02,niq  SPR 72415 - Added support for Route tags01p,15oct01,rae  merge from truestack ver 01w, base 01m (SPRs 70188, 69983,                 65547, etc.)01o,21nov00,spm  fixed creation of internal default route (SPR #62533)01n,10nov00,spm  merged from version 01n of tor3_x branch (code cleanup)01m,16mar99,spm  recovered orphaned code from tor1_0_1.sens1_1 (SPR #25770)01l,29sep98,spm  added support for IP group MIB (SPR #9374); removed unneeded                 routine (SPR #21109).01k,11sep98,spm  moved mutual exclusion semaphore to prevent any collisions                 between RIP tasks (SPR #22350), removed all references to                  bloated trace commands (SPR #22350)01j,01sep98,spm  corrected processing of RIPv2 route updates to support                 version changes (SPR #22158); added support for default                 routes (SPR #22067)01i,26jul98,spm  removed compiler warnings01h,06oct97,gnn  fixed insque/remque casting bug and cleaned up warnings01g,12aug97,gnn  fixed prototypes for mRouteEntryDelete().01f,15may97,gnn  added code to implement route leaking.01e,14apr97,gnn  fixed calls to mRouteEntryAdd to follow Rajesh's changes.01d,07apr97,gnn  cleared up some of the more egregious warnings.                 added MIB-II interfaces and options.01c,24feb97,gnn  added rip version 2 functionality.01b,05dec96,gnn  changed insque/remque to _insque/_remque for compatability.01a,26nov96,gnn  created from BSD4.4 routed*//*DESCRIPTION*//* * Routing Table Management Daemon */#include "vxWorks.h"#include "rip/defs.h"#include "sys/ioctl.h"#include "netinet/in.h"#include "routeLib.h"#include "errno.h"#include "inetLib.h"#include "semLib.h"#include "logLib.h"#include "m2Lib.h" #include "stdlib.h"#include "routeEnhLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#include "netinet/vsRip.h"#endif /* VIRTUAL_STACK *//* defines */#ifdef RTM_ADD#define FIXLEN(s) {if ((s)->sa_len == 0) (s)->sa_len = sizeof *(s);}#else#define FIXLEN(s) { }#endif /* RTM_ADD *//* globals */#ifndef VIRTUAL_STACKIMPORT int routedDebug;IMPORT RIP ripState;#endif /* VIRTUAL_STACK *//* locals */LOCAL struct sockaddr_in inet_default = {#ifdef RTM_ADD        sizeof (inet_default),#endif        AF_INET, INADDR_ANY };/* forward declarations */IMPORT void ripSockaddrPrint (struct sockaddr * pSockAddr);LOCAL void ripInsque (NODE * pNode, NODE * pPrev);LOCAL void ripRemque (NODE * pNode);LOCAL STATUS ripSystemRouteAdd (long dstIp, long gateIp, long mask, int flags);LOCAL STATUS ripSystemRouteDelete (long dstIp, long gateIp, long mask, int flags);void ripRouteMetricSet (struct rt_entry * pRtEntry);/* * Lookup dst in the tables for an exact match. */struct rt_entry *rtlookup (dst)	struct sockaddr *dst;{	register struct rt_entry *rt;	register struct rthash *rh;	register u_int hash;	struct sockaddr target;	struct afhash h;	int doinghost = 1;	if (dst->sa_family >= AF_MAX)		return (0);	(*afswitch[dst->sa_family].af_hash) (dst, &h);	hash = h.afh_hosthash;	rh = &hosthash[hash & ROUTEHASHMASK];        /*          * The equal() comparison within the following loop expects all         * members of the structure except the family, length, and address         * fields to be zero. This condition may not be met when processing a         * RIPv2 packet. In that case, the destination passed to this routine          * accesses a route within the payload of a RIP message, so some         * fields of the overlayed structure will not be zero as expected.         * Duplicate or incorrect routes will be added because matching routes         * are not detected. To avoid this problem, copy the required fields          * from the route destination value to a clean structure.         */        bzero ( (char *)&target, sizeof (struct sockaddr));        target.sa_family = dst->sa_family;        target.sa_len = dst->sa_len;        ((struct sockaddr_in *)&target)->sin_addr.s_addr =                     ((struct sockaddr_in *)dst)->sin_addr.s_addr;        again:	for (rt = rh->rt_forw; rt != (struct rt_entry *)rh; rt = rt->rt_forw) {		if (rt->rt_hash != hash)			continue;		if (equal (&rt->rt_dst, &target))			return (rt);	}	if (doinghost) {		doinghost = 0;		hash = h.afh_nethash;		rh = &nethash[hash & ROUTEHASHMASK];		goto again;	}	return (0);}#ifdef notyet#ifndef VIRTUAL_STACKstruct sockaddr wildcard;	/* zero valued cookie for wildcard searches */#endif#endif/* * Find a route to dst as the kernel would. */struct rt_entry *rtfind (dst)	struct sockaddr *dst;{	register struct rt_entry *rt;	register struct rthash *rh;	register u_int hash;	struct sockaddr target;	struct afhash h;	int af = dst->sa_family;	int doinghost = 1;        int (*match) () = NULL; 	/* Assigned later for network hash search. */	if (af >= AF_MAX)		return (0);	(*afswitch[af].af_hash) (dst, &h);	hash = h.afh_hosthash;	rh = &hosthash[hash & ROUTEHASHMASK];        /*          * The equal() comparison within the following loop expects all         * members of the structure except the family, length, and address         * fields to be zero. This condition may not be met when processing a         * RIPv2 packet. In that case, the destination passed to this routine          * accesses a route within the payload of a RIP message, so some         * fields of the overlayed structure will not be zero as expected,         * and existing host routes would be missed. To avoid this problem,              * copy the required fields from the route destination value to a          * clean structure.         */        bzero ( (char *)&target, sizeof (struct sockaddr));        target.sa_family = dst->sa_family;        target.sa_len = dst->sa_len;        ((struct sockaddr_in *)&target)->sin_addr.s_addr =                     ((struct sockaddr_in *)dst)->sin_addr.s_addr;        again:	for (rt = rh->rt_forw; rt != (struct rt_entry *)rh; rt = rt->rt_forw) {		if (rt->rt_hash != hash)			continue;		if (doinghost) {			if (equal (&rt->rt_dst, &target))				return (rt);		} else {			if (rt->rt_dst.sa_family == af &&			    (*match) (&rt->rt_dst, dst))				return (rt);		}	}	if (doinghost) {		doinghost = 0;		hash = h.afh_nethash;		rh = &nethash[hash & ROUTEHASHMASK];		match = afswitch[af].af_netmatch;		goto again;	}#ifdef notyet	/*	 * Check for wildcard gateway, by convention network 0.	 */	if (dst != &wildcard) {		dst = &wildcard, hash = 0;		goto again;	}#endif	return (0);}struct rt_entry * rtadd    (    struct sockaddr *dst,     struct sockaddr *gate,     int metric,     int state,     struct sockaddr *netmask,     int proto,     int tag,     int from,     struct interface *ifp    )    {    struct afhash h;    register struct rt_entry *rt;    struct rthash *rh;    int af = dst->sa_family, flags;    struct sockaddr_in* pDsin;    struct sockaddr_in* pGsin;    struct sockaddr_in* pNsin;    u_int hash;    struct interface* pIfp;    int ret = ERROR;    if (af >= AF_MAX)        return ((struct rt_entry *)NULL);    (*afswitch[af].af_hash) (dst, &h);    flags = (*afswitch[af].af_rtflags) (dst);    /*     * Subnet flag isn't visible to kernel, move to state.	XXX     */    FIXLEN (dst);    FIXLEN (gate);    if (flags & RTF_SUBNET)        {        state |= RTS_SUBNET;        flags &= ~RTF_SUBNET;        }    if (flags & RTF_HOST)        {        hash = h.afh_hosthash;        rh = &hosthash[hash & ROUTEHASHMASK];	}    else        {        hash = h.afh_nethash;        rh = &nethash[hash & ROUTEHASHMASK];	}    rt = (struct rt_entry *)malloc (sizeof (*rt));    if (rt == 0)        return ((struct rt_entry *)NULL);    rt->inKernel = FALSE;    rt->rt_hash = hash;    rt->rt_dst = *dst;    rt->rt_router = *gate;    rt->rt_timer = 0;    rt->rt_flags = RTF_UP | flags;    rt->rt_state = state | RTS_CHANGED;    rt->rt_proto = proto;    rt->rt_tag = tag;    rt->rt_refcnt = 0;    rt->rt_subnets_cnt = 0;    rt->rt_orgrouter = from;    /*     * A matching interface exists for all standard destinations or     * the RIP session will not begin the add operation, but no     * interface exists for the default route. The rt_ifp field is     * equal to zero in that case.     * Also, we need to search for the gateway address for the non-rip      * route.     */    if (ifp)        rt->rt_ifp = ifp;    else        {        rt->rt_ifp = ripIfWithDstAddr (&rt->rt_dst, &rt->rt_router);        if (rt->rt_ifp == 0)             rt->rt_ifp = ripIfWithNet (&rt->rt_router);        }    if ((state & RTS_INTERFACE) == 0)        {        rt->rt_flags |= RTF_GATEWAY;        flags |= RTF_GATEWAY;        }    rt->rt_metric = metric;    /*      * Set the netmask. The interface's netmask is used if none is included     * in the RIP message. Otherwise, the specified netmask is used, except     * for default routes, which always use a netmask of 0.     */    if (netmask != (struct sockaddr *)NULL &&          ((struct sockaddr_in *)dst)->sin_addr.s_addr)        {        rt->rt_netmask = *netmask;         }    else        {        /* Leave the netmask value as zero if a default route is used. */        bzero ((char *)&rt->rt_netmask, sizeof (rt->rt_netmask));        rt->rt_netmask.sa_family = AF_INET;        rt->rt_netmask.sa_len = 16;        pNsin = (struct sockaddr_in *)&rt->rt_netmask;        if ( ((struct sockaddr_in *)dst)->sin_addr.s_addr)            {            pNsin->sin_addr.s_addr = htonl (rt->rt_ifp->int_subnetmask);            /*              * Learned routes and locally generated interface routes use the             * (possibly classless) subnet mask value. Internally generated              * routes provided to implement border gateway filtering will             * use a class-based netmask in all updates to be understood              * by RIP-2 routers on "distant" hosts not directly connected to              * the destination. Since supernet routes must use the classless              * netmask during border gateway filtering to correctly detect              * matching supernet numbers, they retain that value internally              * while the subnetted routes replace it with the class-based              * value.             */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人性生交大合| 国产午夜久久久久| 国产日产精品1区| 亚洲欧美国产三级| 激情文学综合插| 欧美三级中文字幕| 国产精品水嫩水嫩| 麻豆91免费观看| 欧美日韩一区在线观看| 国产精品视频免费看| 日韩国产在线观看| 欧美优质美女网站| 亚洲国产成人在线| 国产精品综合一区二区| 3d动漫精品啪啪1区2区免费| 亚洲女同一区二区| 国产91对白在线观看九色| 精品国精品国产尤物美女| 亚洲高清免费视频| 色偷偷久久人人79超碰人人澡| 久久久不卡影院| 国产一区二区三区免费在线观看 | 天天影视涩香欲综合网| 91亚洲精品久久久蜜桃| 久久午夜羞羞影院免费观看| 日本色综合中文字幕| 欧美日韩中文国产| 洋洋成人永久网站入口| av毛片久久久久**hd| 欧美国产成人在线| 成人h精品动漫一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 青娱乐精品视频在线| 884aa四虎影成人精品一区| 肉丝袜脚交视频一区二区| 欧洲一区二区av| 亚洲国产精品自拍| 91精品国产全国免费观看| 日本va欧美va精品发布| 欧美大片顶级少妇| 国产精品18久久久久| 欧美国产综合一区二区| 99在线精品免费| 亚洲综合在线免费观看| 欧美日韩大陆一区二区| 美脚の诱脚舐め脚责91| 久久免费看少妇高潮| 成人三级在线视频| 亚洲码国产岛国毛片在线| 欧洲日韩一区二区三区| 午夜视频久久久久久| 欧美不卡视频一区| 国产91丝袜在线播放0| 亚洲人成7777| 欧美放荡的少妇| 国产乱淫av一区二区三区| 亚洲视频一区在线| 欧美伦理视频网站| 国产成人精品网址| 亚洲综合色成人| 精品国产区一区| 97se狠狠狠综合亚洲狠狠| 亚洲va韩国va欧美va精品| 日韩欧美国产小视频| 高清不卡一区二区在线| 亚洲综合一区二区三区| 久久一留热品黄| 在线视频欧美精品| 国产精品一区二区果冻传媒| 亚洲欧美日韩国产成人精品影院| 欧美一区午夜视频在线观看| 福利电影一区二区三区| 午夜激情一区二区| 国产精品青草综合久久久久99| 在线区一区二视频| 黄色日韩网站视频| 亚洲高清在线精品| 国产精品网曝门| 日韩一区二区三区四区| 99精品久久99久久久久| 久久精品免费观看| 夜夜揉揉日日人人青青一国产精品| 精品国产一区二区亚洲人成毛片 | 国产精品一区不卡| 手机精品视频在线观看| 亚洲图片你懂的| 久久新电视剧免费观看| 欧美欧美欧美欧美首页| 99re在线精品| 国产成人亚洲综合a∨婷婷 | 7777精品伊人久久久大香线蕉经典版下载 | 波多野结衣一区二区三区 | 亚洲女性喷水在线观看一区| 2019国产精品| 欧美精品1区2区| 色网站国产精品| 成人深夜在线观看| 黑人精品欧美一区二区蜜桃| 亚洲一区二区三区美女| 欧美激情一区二区三区四区| 欧美一二三四在线| 欧美日韩一区不卡| 91国产福利在线| av电影一区二区| 从欧美一区二区三区| 蜜桃视频一区二区三区| 丝袜国产日韩另类美女| 一区二区三区成人在线视频| 亚洲图片激情小说| 国产精品久久久久久一区二区三区| 久久这里只有精品6| 久久只精品国产| 国产欧美精品区一区二区三区| 精品国产一二三区| 久久亚洲精品小早川怜子| 欧美精品一区视频| 精品成人一区二区三区| 久久久久久久久久久久久夜| 精品久久久影院| 精品卡一卡二卡三卡四在线| 欧美不卡一区二区三区| 欧美一卡2卡三卡4卡5免费| 欧美精品久久久久久久多人混战| 欧美日韩国产精品成人| 7777精品伊人久久久大香线蕉完整版 | 国产69精品久久99不卡| 粉嫩绯色av一区二区在线观看| 成人精品视频一区二区三区尤物| 成人激情校园春色| 色婷婷综合久久久中文字幕| 欧美视频三区在线播放| 欧美精品一二三区| 精品免费日韩av| 亚洲欧洲日产国码二区| 亚洲自拍偷拍九九九| 免费观看91视频大全| 国产精品一二三区在线| 91毛片在线观看| 欧美一区二区三区在线观看| 精品对白一区国产伦| 国产精品久久久久国产精品日日| 亚洲激情图片小说视频| 蜜桃视频免费观看一区| 成人性生交大片免费| 欧美三级电影一区| 久久中文字幕电影| 亚洲综合图片区| 国模套图日韩精品一区二区| 99re这里都是精品| 91精品国产综合久久久久久漫画| 2023国产精品| 亚洲欧美偷拍卡通变态| 美国十次了思思久久精品导航| 高清成人免费视频| 91精品福利在线一区二区三区| 国产女主播视频一区二区| 国内精品在线播放| www.激情成人| 日韩色在线观看| 亚洲三级电影全部在线观看高清| 久久精品国产色蜜蜜麻豆| 91看片淫黄大片一级在线观看| 日韩欧美亚洲国产另类| 一个色综合av| kk眼镜猥琐国模调教系列一区二区| 欧美日韩精品一区二区| 中文字幕一区二区三区四区| 蜜臀av性久久久久蜜臀av麻豆| 99久久精品免费看国产| 久久久精品人体av艺术| 亚洲成人第一页| 色综合欧美在线| 国产精品三级久久久久三级| 麻豆一区二区三| 欧美日韩精品欧美日韩精品一 | 精品久久国产老人久久综合| 一区二区不卡在线视频 午夜欧美不卡在| 精品亚洲免费视频| 欧美三级电影一区| 尤物av一区二区| 99精品欧美一区二区蜜桃免费 | 波波电影院一区二区三区| 欧美精品一区二区在线播放| 日韩精品亚洲一区二区三区免费| 日本福利一区二区| 中文字幕亚洲综合久久菠萝蜜| 国模大尺度一区二区三区| 日韩欧美国产系列| 日本欧美一区二区三区乱码| 在线视频一区二区三| 一区二区三区四区在线播放| 91在线云播放| 自拍av一区二区三区| 91一区二区三区在线播放| 日本一区二区电影| 成人国产亚洲欧美成人综合网| 国产日韩欧美麻豆| 成人小视频免费在线观看| 国产欧美日韩在线看| 国产999精品久久久久久|