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

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

?? startup.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* startup.c - RIP routines for creating initial data structures *//* 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. * @(#)startup.c	8.2 (Berkeley) 4/28/95 *//*modification history--------------------01l,22mar02,niq  Merged from Synth view, tor3_x.synth branch, ver 01q01k,24jan02,niq  SPR 68672 - Add route to the local end of the PTP link with                 the correct netmask                 SPR 72415 - Added support for Route tags01j,15oct01,rae  merge from truestack ver 01m, base 01h (SPR #69983 etc.)01i,10nov00,spm  merged from version 01j of tor3_x branch (SPR #29099 fix)01h,11sep98,spm  provided fatal error handling in place of quit routine,                 replaced ripMakeAddr with optimized results (SPR #22350)01g,01sep98,spm  modified addrouteforif to correctly support interfaces                  with classless netmasks (SPR #22220); changed spacing                 for coding standards01f,26jul98,spm  moved assignment from conditional to avoid compiler warnings01e,06oct97,gnn  fixed SPR 9211 and added sendHook functionality01d,16may97,gnn  added code to initialize hooks to NULL.01c,07apr97,gnn  cleared up some of the more egregious warnings.                 added MIB-II interfaces and options.01b,24feb97,gnn  added rip version 2 functionality.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 "net/if.h"#include "net/if_dl.h"#include "netinet/in.h"#include "stdlib.h"#include "logLib.h"#include "m2Lib.h"#include "sockLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#include "netinet/vsRip.h"#endif /* VIRTUAL_STACK */#define same(a1, a2) \        (memcmp((a1)->sa_data, (a2)->sa_data, 14) == 0)/* globals */#ifndef VIRTUAL_STACKIMPORT int		routedDebug;IMPORT RIP		ripState;struct interface *	ripIfNet;struct interface **	ifnext = &ripIfNet;#endif /* VIRTUAL_STACK *//* locals */#ifndef VIRTUAL_STACKLOCAL int		foundloopback;		/* valid flag for loopaddr */LOCAL struct sockaddr 	loopaddr;		/* our address on loopback */LOCAL struct rt_addrinfo	info;#endif /* VIRTUAL_STACK *//* forward declarations */IMPORT void _ripAddrsXtract (caddr_t, caddr_t, struct rt_addrinfo *); IMPORT int sysctl_rtable (int *, int, caddr_t, size_t *, caddr_t *, size_t);IMPORT void _ripIfShow (struct interface *);void addrouteforif(register struct interface *);LOCAL int add_ptopt_localrt (register struct interface *, int);/* defines *//* Sleazy use of local variables throughout file, warning!!!! */#define NETMASK	info.rti_info[RTAX_NETMASK]#define IFAADDR	info.rti_info[RTAX_IFA]#define BRDADDR	info.rti_info[RTAX_BRD]/******************************************************************************* routedIfInit - initialize interface information** This routine behaves differently based on the <ifindex> parameter.* If <ifIndex> is 0, this routine searches the kernel's "ifnet" interface* list for all interfaces belonging to the AF_INET family and copies the* interface data into RIP private interface table list if that interface is UP.* If <ifIndex> is non-zero then only the specified interface is queried* and its data copied if the interface is UP.** Interfaces that are down are ignored.** For every interface retrieved from the kernel, this routine checks if* a route for the interface address already exists in RIP's table. If it does* this signifies that RIP already knows about this interface address; hence it* skips over that entry. If a route doesn't exist, then RIP adds a route* to that interface in its own table as well as in the system Routing database.* The above procedure is repeated for each address entry present for an* interface.** If an interface has multiple IP addresses (aliases), this routine creates* a different interface entry (virtual interface) for each address. * For example an interface "fei0" in the system with address "100.10.1.1"* and "144.1.1.1" will result in two interfaces in RIP's interface list - * 	1) "fei0", 100.10.1.1*	2) "fei0", 144.1.1.1* The <resetFlag> parameter distinguishes the initial execution of this* routine from later executions which add new interfaces to the list. * It is used to initialize RIP's interface list.** If the sytem runs out of memory during uring the addition of an interface* to RIP's internal list, or if is encounters some incomplete entries, * the "lookforinterfaces" flag is set to automatically repeat the execution* of this routine at the next timer interval. ** The initial execution of this routine (during RIP startup) must succeed* or the session will not begin, but the session will continue regardless* of the results of later executions.** RETURNS: OK, or ERROR if unable to process interface table.** NOMANUAL** INTERNAL* After the RIP session has started, the routine can be called again* within the context of either the RIP timer task or the RIP input task. * The caller should take the ripLockSem semaphore to provide mutual* exclusion so that no message processing happens while the * interface list is changed and any corresponding route entries are* created.*/STATUS routedIfInit    (    BOOL 	resetFlag, 	/* build entire new list or add entries? */    long		ifIndex		/* particular interface to search for, 0-all */    )    {    struct interface ifs, *ifp;    size_t needed;    int mib[6], no_ipaddr = 0, flags = 0;    char *buf, *cplim, *cp;    register struct if_msghdr *ifm;    register struct ifa_msghdr *ifam;    struct sockaddr_dl *sdl = NULL;    struct sockaddr_in *sin;    struct ip_mreq ipMreq; 	/* Structure for joining multicast groups. */    u_long i;    if (resetFlag)        {        /* Reset globals in case of restart after shutdown. */        foundloopback = 0;        ripIfNet = NULL;        ifnext = &ripIfNet;        }    ripState.lookforinterfaces = FALSE;    ipMreq.imr_multiaddr.s_addr = htonl (RIP_MCAST_ADDR);    /*      * The sysctl_rtable routine provides access to internal networking data      * according to the specified operations. The NET_RT_IFLIST operator     * traverses the entire internal "ifnet" linked list created when the     * network devices are initialized. The third argument, when non-zero,     * restricts the search to a particular unit number. In this case, all     * devices are examined. The first argument, when non-zero, limits the     * addresses to the specified address family.      */    mib[0] = AF_INET;    mib[1] = NET_RT_IFLIST;    mib[2] = ifIndex;    /*      * The first call to the routine determines the amount of space needed     * for the results. No data is actually copied.     */    if (sysctl_rtable(mib, 3, NULL, &needed, NULL, 0) < 0)        {        if (routedDebug)            logMsg ("Error %x estimating size of interface buffer.\n", errno,                    0, 0, 0, 0, 0);        return (ERROR);        }    if (routedDebug)        logMsg ("Executing routedInit for iIndex = %d.\n", ifIndex, 0, 0, 0, 0, 0);    /*      * Allocate the required data, and repeat the system call to copy the     * actual values.     */    buf = malloc (needed);    if (buf == NULL)        {        if (routedDebug)            logMsg ("Error %x allocating interface buffer.\n", errno,                    0, 0, 0, 0, 0);        return (ERROR);        }    if (sysctl_rtable(mib, 3, buf, &needed, NULL, 0) < 0)        {        if (routedDebug)            logMsg ("Error %x retrieving interface table.\n", errno,                    0, 0, 0, 0, 0);        free (buf);        return (ERROR);        }    /* End of VxWorks specific stuff. */    /*      * Analyze the retrieved data. The provided buffer now contains a      * structure of type if_msghdr for each interface followed by zero      * or more structures of type ifa_msghdr for each address for that     * interface. The if_msghdr structures have type fields of     * RTM_IFINFO and the address structures have type fields of      * RTM_NEWADDR.     */    cplim = buf + needed;    for (cp = buf; cp < cplim; cp += ifm->ifm_msglen)         {        ifm = (struct if_msghdr *)cp;        if (ifm->ifm_type == RTM_IFINFO)             {            /* Parse the generic interface information. */            memset(&ifs, 0, sizeof(ifs));            ifs.int_flags = flags = (0xffff & ifm->ifm_flags) | IFF_INTERFACE;            /*              * The sockaddr_dl structure containing the link-level address             * immediately follows the if_msghdr structure.             */            sdl = (struct sockaddr_dl *) (ifm + 1);            sdl->sdl_data[sdl->sdl_nlen] = 0;            no_ipaddr = 1;            continue;            }        /*          * Only address entries should be present at this point.         * Exit if an unknown type is detected.         */        if (ifm->ifm_type != RTM_NEWADDR)            {            if (routedDebug)                logMsg ("Unexpected entry in interface table.\n",                         0, 0, 0, 0, 0, 0);            free (buf);            return (ERROR);            }        /* If RIP is not desired on this interface, then so be it */        if (ripIfExcludeListCheck (sdl->sdl_data) == OK)            continue;        /*          * Ignore the address information if the interface initialization         * is incomplete. Set flag to repeat the search at the next timer          * interval.         */        if ( (flags & IFF_UP) == 0)            {            continue;            }        /* Access the address information through the ifa_msghdr structure. */        ifam = (struct ifa_msghdr *)ifm;        /* Reset the pointers to access the address pointers. */        info.rti_addrs = ifam->ifam_addrs;        _ripAddrsXtract ((char *)(ifam + 1), cp + ifam->ifam_msglen, &info);        if (IFAADDR == 0)             {            if (routedDebug)                logMsg ("No address for %s.\n", (int)sdl->sdl_data,                        0, 0, 0, 0, 0);            continue;            }        /* Copy and process the actual address values. */        ifs.int_addr = *IFAADDR;        if (ifs.int_addr.sa_family != AF_INET)            continue;        no_ipaddr = 0;        if (ifs.int_flags & IFF_POINTOPOINT)            {            if (BRDADDR == 0)    /* No remote address specified? */                {                if (routedDebug)                    logMsg ("No dstaddr for %s.\n", (int)sdl->sdl_data,                             0, 0, 0, 0, 0);                continue;                }            if (BRDADDR->sa_family == AF_UNSPEC)                {                ripState.lookforinterfaces = TRUE;                continue;                }            /* Store the remote address for the link in the correct place. */            ifs.int_dstaddr = *BRDADDR;            }        /*         * Skip interfaces we already know about. But if there are         * other interfaces that are on the same network as the ones         * we already know about, we want to know about them as well.         */        if (ifs.int_flags & IFF_POINTOPOINT)            {            if (ripIfWithDstAddrAndIndex (&ifs.int_dstaddr, NULL,                                           ifam->ifam_index))                continue;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区中文在线观看| 日本不卡在线视频| 亚洲成人动漫av| 国产一区二区91| 在线观看视频91| 欧美v亚洲v综合ⅴ国产v| 中文字幕一区av| 黑人巨大精品欧美黑白配亚洲| 99re6这里只有精品视频在线观看| 欧美一级日韩不卡播放免费| 亚洲三级小视频| 成人夜色视频网站在线观看| 日韩一级欧美一级| 亚洲成人资源在线| 欧美综合一区二区三区| 国产清纯白嫩初高生在线观看91| 蜜臀av性久久久久蜜臀aⅴ四虎| 一本久久精品一区二区| 国产精品成人免费在线| 国产成人综合自拍| 久久免费电影网| 久久超碰97中文字幕| 7878成人国产在线观看| 亚洲成年人影院| 欧美中文字幕不卡| 亚洲美女精品一区| 成人av电影免费在线播放| 久久综合九色综合97_久久久| 奇米四色…亚洲| 7777精品久久久大香线蕉| 无吗不卡中文字幕| 精品视频色一区| 亚洲五月六月丁香激情| 色呦呦国产精品| 亚洲综合丁香婷婷六月香| 91麻豆免费观看| 亚洲自拍偷拍图区| 欧美又粗又大又爽| 亚洲综合免费观看高清完整版在线 | 粉嫩蜜臀av国产精品网站| 日韩一区二区在线播放| 麻豆91在线播放| 精品91自产拍在线观看一区| 国产精品一区免费视频| 国产清纯白嫩初高生在线观看91| 国产91丝袜在线观看| 欧美激情一区二区三区蜜桃视频| 99久久伊人网影院| 亚洲自拍偷拍欧美| 日韩一区二区影院| 国产成人精品免费| 亚洲免费在线电影| 日韩视频免费直播| 丁香天五香天堂综合| 亚洲乱码精品一二三四区日韩在线| 日本福利一区二区| 蜜桃视频一区二区| 国产精品不卡一区二区三区| 在线视频综合导航| 久久99精品一区二区三区| 欧美激情一区二区三区四区| 在线精品视频小说1| 92国产精品观看| 亚洲成人自拍网| 国产精品无人区| 欧美三片在线视频观看 | 国产美女精品在线| 亚洲女女做受ⅹxx高潮| 日韩欧美一区二区免费| 成人av资源下载| 人妖欧美一区二区| 亚洲日韩欧美一区二区在线| 91精品国产入口| 色综合久久中文字幕综合网| 日本怡春院一区二区| 国产精品午夜在线| 日韩一区二区免费电影| 99国产精品99久久久久久| 奇米色777欧美一区二区| 中文字幕一区在线观看| 日韩午夜av一区| 欧美影院一区二区三区| 粉嫩av一区二区三区| 亚洲宅男天堂在线观看无病毒| 精品人伦一区二区色婷婷| 色婷婷亚洲精品| 国产福利91精品| 狠狠色伊人亚洲综合成人| 亚洲成av人片在www色猫咪| 中文字幕免费一区| 2014亚洲片线观看视频免费| 欧美日韩精品欧美日韩精品 | 国产一区二区三区黄视频 | 中文字幕的久久| 日韩一级免费一区| 精品视频在线免费看| 色8久久人人97超碰香蕉987| 成人黄色软件下载| 国产精品一区二区黑丝| 免费看日韩a级影片| 亚洲国产精品天堂| 亚洲综合在线第一页| 亚洲猫色日本管| √…a在线天堂一区| 日本一区二区三区视频视频| 久久网这里都是精品| 精品国产3级a| 欧美xxxxxxxxx| 精品久久人人做人人爰| 欧美大黄免费观看| 日韩一区二区三区视频| 3d成人h动漫网站入口| 欧美精品免费视频| 欧美精品自拍偷拍| 欧美久久久久中文字幕| 欧美精品国产精品| 欧美精品v国产精品v日韩精品 | 色综合中文综合网| 免费在线一区观看| 日韩国产精品久久久| 热久久国产精品| 蜜桃视频第一区免费观看| 精品系列免费在线观看| 国产一区二区三区四| 懂色av一区二区三区免费看| 欧美视频第二页| 91麻豆精品国产91久久久久 | 看电影不卡的网站| 精品一区二区国语对白| 国产精品一区专区| 风间由美一区二区三区在线观看 | 精品一区二区三区不卡 | 理论片日本一区| 国产乱码精品一区二区三区忘忧草| 国产精选一区二区三区| www.日韩大片| 在线观看网站黄不卡| 91精品欧美综合在线观看最新| 精品免费国产二区三区| 国产精品久久久久aaaa樱花| 一区二区三区在线观看国产| 日韩成人av影视| 国产精品亚洲第一| 色综合中文综合网| 久热成人在线视频| 成人毛片老司机大片| 欧美色区777第一页| 久久综合色天天久久综合图片| 国产精品家庭影院| 首页国产欧美日韩丝袜| 国产精品一线二线三线| 欧美亚洲综合另类| 精品国产乱码久久久久久免费| 中文字幕日韩精品一区| 日韩av电影天堂| heyzo一本久久综合| 337p亚洲精品色噜噜狠狠| 国产精品美女一区二区在线观看| fc2成人免费人成在线观看播放| 久久精工是国产品牌吗| 成人av电影在线| 欧美大片在线观看| 亚洲综合男人的天堂| 国产.欧美.日韩| 日韩一区二区在线看片| 亚洲免费电影在线| 国产精品一区二区三区网站| 欧美男生操女生| 亚洲欧美日韩国产成人精品影院| 精品在线播放免费| 欧美日韩免费视频| 亚洲欧洲精品一区二区三区| 久草精品在线观看| 8x福利精品第一导航| 亚洲一区二区美女| 成人美女视频在线看| 久久久精品欧美丰满| 久久99久久99| 在线播放91灌醉迷j高跟美女 | 亚洲超碰精品一区二区| 99riav一区二区三区| 亚洲国产精品ⅴa在线观看| 精品中文字幕一区二区| 欧美日韩你懂的| 亚洲精品国产高清久久伦理二区| 成人黄色大片在线观看| 久久久久久久精| 国产麻豆91精品| 久久综合av免费| 久久99久久久欧美国产| 日韩欧美三级在线| 免费的成人av| 精品久久国产老人久久综合| 蜜臀av一区二区在线免费观看| 3d成人h动漫网站入口| 奇米精品一区二区三区四区 | 欧美视频你懂的| 亚洲国产视频一区| 欧美性猛片aaaaaaa做受| 亚洲va在线va天堂|