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

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

?? routelib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/* routeLib.c - network route manipulation library *//* Copyright 1984 - 2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------03c,10may02,kbw  making man page edits03b,07dec01,rae  merge from synth ver 03h, (SPR #69690)03a,15oct01,rae  merge from truestack ver 03g, base 02z (update)02z,16mar99,spm  recovered orphaned code from tor1_0_1.sens1_1 (SPR #25770)02y,29sep98,spm  added mPrivRouteEntryDelete for held kernel routes (SPR #9374)02x,14dec97,jdi  doc: cleanup.02w,05dec97,rjc  added RTF_CLONING flag to mRoute routines. 02v,25oct97,kbw  making minor man page fixes 02u,22aug97,rjc  modifed return vals for mRoute* calls.02t,08aug97,vin  fixed SPR9121.02s,04aug97,kwb  fixed man page problems found in beta review02r,07jul97,rjc  route proto field moved to dest sockaddr.02q,30jun97,rjc  restored old rtentry size, added socktrim.02p,04jun97,rjc  fixed route proto priority glitches.02o,03jun97,rjc  fixed mask and RTF_HOST combinations.02n,29may97,rjc  fixed byte orders in mRoute routines02m,09may97,rjc  fixed mRoute{*} man pages02l,30apr97,kbw  fiddle man page text02k,28apr97,gnn  fixed some of the documentation.02j,20apr97,kbw  fixed minor format errors in man page text02i,15apr97,kbw  fixed minor format errors in man page text02h,14apr97,gnn  added documentation for new mRoute calls.02g,11apr97,rjc  added routing interface support, routing priority stuff.02f,13feb97,rjc  added masking of destination in mRoute--- stuff.02e,13feb97,rjc  updated mRouteEntryAdd/delete.02d,07feb97,rjc  newer  versions of route add/delete etc.02c,05feb97,rjc  new versions of route add/delete etc.02b,18jan95,jdi  doc tweaks for routeNetAdd().02a,08jul94,dzb  Added routeNetAdd() for adding subnet routes (SPR #3395).01z,14feb94,elh  made rtEntryFill global and NOMANUAL.01y,11aug93,jmm  Changed ioctl.h and socket.h to sys/ioctl.h and sys/socket.h01x,20jan93,jdi  documentation cleanup for 5.1.01w,28jul92,elh  moved routeShow to netShow.c01v,26may92,rrr  the tree shuffle		  -changed includes to have absolute path from h/01u,01mar92,elh  added routeCmd.01t,16dec91,gae  added includes for ANSI.01s,02dec91,elh  moved error handling to lower level (sys_socket).01r,26nov91,llk  changed include of errnoLib.h to errno.h.01q,12nov91,elh	 changed routes to interfaces to be direct routes,		 made routeChange set errno (rtioctl returns errno instead of -1)01p,07nov91,elh	 changed inet_ntoa to inet_ntoa_b so memory isn't lost.01o,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice01n,21may91,jdi	 documentation tweaks.01m,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.01l,22feb91,jaa	 documentation cleanup.01k,10aug90,kdl  added forward declarations for functions returning void.01j,07may90,hjb  added documentation to routeAdd about adding the default route,		 explanation of the route specific flags, and made the		 output more unix compatible.01i,07mar90,jdi  documentation cleanup.01h,02sep89,hjb  fixed a big in routeShow() - instead of using RTHASHSIZ		 we now use the global rthashsize which is always set to		 the correct value in route.c.  (When GATEWAY is undefined,		 the route.h include file defines RTHASHSIZ to smaller value.)01g,07aug89,gae  fixed in_lnaof call in routeEntryFill for SPARC.01g,20aug88,gae  documentation.01f,30may88,dnw  changed to v4 names.01e,28may88,dnw  replace call to netGetInetAddr with calls to remGetHostByName		   and inet_addr.01d,18feb88,dnw  changed to handle subnet masks correctly (by calling in_lnaof()		   instead of inet_lnaof() in routeChange).01c,16nov87,jlf  documentation01b,16nov87,llk  documentation.01a,01nov87,llk  written.*//*DESCRIPTIONThis library contains the routines for inspecting the routing table,as well as routines for adding and deleting routes from that table.  If you do not configure VxWorks to include a routing protocol, such as RIP or OSPF, you can use these routines to maintain the routing tables manually.  To use this feature, include the following component:INCLUDE_NETWRS_ROUTELIBINCLUDE FILES: routeLib.hSEE ALSO: hostLib*/#include "vxWorks.h"#include "net/mbuf.h"#include "sys/socket.h"#include "sockLib.h"#include "unistd.h"#include "net/if.h"#include "net/route.h"#include "netinet/in.h"#include "sys/ioctl.h"#include "inetLib.h"#include "errno.h"#include "hostLib.h"#include "stdio.h"#include "ioLib.h"#include "routeLib.h"#include "m2Lib.h"#include "routeEnhLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#endif /* VIRTUAL_STACK *//* forward static functions */static STATUS routeChange (char *destination, char *gateway, int ioctlCmd);void routeEntryFill (struct ortentry *pRoute, int destInetAddr, int		gateInetAddr, BOOL hostAddr);/********************************************************************************* routeAdd - add a route** This routine adds gateways to the network routing tables.* It is called from a VxWorks machine that needs* to establish a gateway to a destination network (or machine).** You can specify both <destination> and <gateway> in standard Internet* address format (for example, 90.0.0.2), or you can specify them using* their host names, as specified with hostAdd().** This routine can be used to add multiple routes to the same destination* differing by the gateway.** EXAMPLE* Consider the following example:* .CS*     -> routeAdd "90.0.0.0", "gate"* .CE* This call tells VxWorks that the machine with the host name "gate" is * the gateway to network 90.0.0.0.  The host "gate" must already have * been created by hostAdd().** Consider the following example:* .CS*     -> routeAdd "90.0.0.0", "91.0.0.3"* .CE* This call tells VxWorks that the machine with the Internet * address 91.0.0.3 is the gateway to network 90.0.0.0.** Consider the following example:* .CS*     -> routeAdd "destination", "gate"* .CE* This call tells VxWorks that the machine with the host name "gate" is * the gateway to the machine named "destination".  The host names "gate" and * "destination" must already have been created by hostAdd().** Consider the following example:* .CS*     -> routeAdd "0", "gate"* .CE* This call tells VxWorks that the machine with the host name "gate" is * the default gateway.  The host "gate" must already have been created * by hostAdd().  A default gateway is where Internet Protocol (IP) * datagrams are routed when there is no specific routing table entry * available for the destination IP network or host.** RETURNS: OK or ERROR.*/STATUS routeAdd    (    char *destination,  /* inet addr or name of route destination      */    char *gateway       /* inet addr or name of gateway to destination */    )    {    return (routeChange (destination, gateway, (int) SIOCADDRT));    }/********************************************************************************* routeNetAdd - add a route to a destination that is a network** This routine is equivalent to routeAdd(), except that the destination* address is assumed to be a network.  This is useful for adding a route* to a sub-network that is not on the same overall network as the* local network.* * This routine can be used to add multiple routes to the same destination* differing by the gateway.** RETURNS: OK or ERROR.*/STATUS routeNetAdd    (    char *destination,  /* inet addr or name of network destination */    char *gateway       /* inet addr or name of gateway to destination */    )    {    int destInetAddr;		/* destination internet adrs */    int	gateInetAddr;		/* gateway internet adrs */    struct ortentry route;	/* route entry */    int	sock;			/* socket */    int	status;			/* return status */    if ((((destInetAddr = hostGetByName (destination)) == ERROR) &&	 ((destInetAddr = (int) inet_addr (destination)) == ERROR)) ||        (((gateInetAddr = hostGetByName (gateway)) == ERROR) &&	 ((gateInetAddr = (int) inet_addr (gateway)) == ERROR)))	{	return (ERROR);	}    routeEntryFill (&route, destInetAddr, gateInetAddr, FALSE);    /* add the route */    sock = socket (AF_INET, SOCK_RAW, 0);    status = ioctl (sock, SIOCADDRT, (int) &route);    (void) close (sock);    return (status);    }/********************************************************************************* routeDelete - delete a route** This routine deletes a specified route from the network routing tables.** RETURNS: OK or ERROR.** SEE ALSO: routeAdd()*/STATUS routeDelete    (    char *destination,  /* inet addr or name of route destination      */    char *gateway       /* inet addr or name of gateway to destination */    )    {    return (routeChange (destination, gateway, (int) SIOCDELRT));    }/********************************************************************************* routeChange - change the routing tables** This routine makes changes to the routing tables by using an ioctl() call* to add or delete a route.** This is a local routine which should not be used directly.* Instead, routeAdd() and routeDelete() should be used as interfaces* to this routine.** The <destination> and <gateway> parameters may be specified either by their* Internet addresses in standard internet address format (e.g., "90.0.0.2"),* or by their names (their host names) which have already been added to the* remote host table (with hostAdd()).** RETURNS: OK or ERROR.** SEE ALSO: routeAdd()*/LOCAL STATUS routeChange    (    char *destination,  /* inet address or name of route destination      */    char *gateway,      /* inet address or name of gateway to destination */    int ioctlCmd        /* addition or deletion of a route                */    )    {    int destInetAddr;		/* destination internet adrs */    int gateInetAddr;		/* gateway internet adrs */    if ((((destInetAddr = hostGetByName (destination)) == ERROR) &&	 ((destInetAddr = (int) inet_addr (destination)) == ERROR)) ||        (((gateInetAddr = hostGetByName (gateway)) == ERROR) &&	 ((gateInetAddr = (int) inet_addr (gateway)) == ERROR)))	{	return (ERROR);	}    return (routeCmd (destInetAddr, gateInetAddr, ioctlCmd));    }/********************************************************************************* routeCmd - change the routing tables** routeCmd is the same as routeChange except it provides a non-string* interface.** NOMANUAL*/STATUS routeCmd    (    int		destInetAddr,		/* destination adrs */    int		gateInetAddr,		/* gateway adrs */    int		ioctlCmd		/* route command */    )    {    struct ortentry route;	/* route entry		*/    int 	   sock;	/* socket 		*/    int 	   status;	/* return status	*/    routeEntryFill (&route, destInetAddr, gateInetAddr, TRUE);    /* add or delete the route */    sock = socket (AF_INET, SOCK_RAW, 0);    if (sock == ERROR)        return (ERROR);    status = ioctl (sock, ioctlCmd, (int) &route);    (void) close (sock);    return (status);    }/********************************************************************************* routeEntryFill - fill in a route entry (struct ortentry)** Fills in a route entry (struct ortentry) with destination and* gateway information.** RETURNS: N/A.** NOMANUAL*/void routeEntryFill    (    struct ortentry *pRoute,     /* pointer to route entry */    int destInetAddr,           /* destination internet address */    int gateInetAddr,           /* gateway internet address */    BOOL hostAddr		/* check host part of address */    )    {    struct sockaddr_in *sin;    struct in_addr di;    /* zero out route entry */    bzero ((caddr_t) pRoute, sizeof (struct ortentry));    /* zero out sockaddr_in, fill in destination info */    /* XXX rt_dst really a struct sockaddr */    sin = (struct sockaddr_in *) &(pRoute->rt_dst);    bzero ((caddr_t) sin, sizeof (struct sockaddr_in));    sin->sin_family = AF_INET;    sin->sin_len = sizeof (struct sockaddr_in);	    sin->sin_addr.s_addr = (u_long)destInetAddr;    /* zero out sockaddr_in, fill in gateway info */    /* XXX rt_gateway really a struct sockaddr */    sin = (struct sockaddr_in *) &(pRoute->rt_gateway);    bzero ((caddr_t) sin, sizeof (struct sockaddr_in));    sin->sin_family = AF_INET;    sin->sin_len = sizeof (struct sockaddr_in);	    sin->sin_addr.s_addr = (u_long)gateInetAddr;    pRoute->rt_flags = RTF_UP;    di.s_addr = (u_long)destInetAddr;    /*     *  if host part of address filled in, then it's a host route     */    if ((hostAddr) && (in_lnaof (di) != INADDR_ANY))	pRoute->rt_flags |= RTF_HOST;    /*     *  if the gateway addr is not a local interface,     *  then it is an indirect route - send it to a gateway.     */    if (ifa_ifwithaddr (&(pRoute->rt_gateway)) == NULL)        pRoute->rt_flags |= RTF_GATEWAY;    }/********************************************************************************* mRouteAdd - add multiple routes to the same destination  ** This routine is similar to routeAdd(), except that you can use multiple* mRouteAdd() calls to add multiple routes to the same location.  Use  * <pDest> to specify the destination, <pGate> to specify the gateway to* that destination, <mask> to specify destination mask, and <tos> to specify* the type of service.  For <tos>, netinet/ip.h defines the following 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性生活一区| 婷婷久久综合九色综合绿巨人 | 欧美在线视频不卡| 日韩精品专区在线影院重磅| 国产精品超碰97尤物18| 蜜臀av性久久久久蜜臀aⅴ| 风间由美一区二区三区在线观看| 欧美日韩国产小视频| 国产精品国产精品国产专区不片| 久久成人久久鬼色| 欧美色综合影院| 亚洲视频一区二区免费在线观看| 黑人巨大精品欧美黑白配亚洲| 精品视频一区三区九区| 中文字幕在线视频一区| 国产精品一级在线| 日韩欧美国产三级| 天天色综合天天| 欧美性大战久久久久久久| 国产精品久线观看视频| 国产精品影视天天线| 91精品国产高清一区二区三区 | 一区二区三区在线观看动漫| 国产高清无密码一区二区三区| 538prom精品视频线放| 一片黄亚洲嫩模| 91丨九色丨蝌蚪富婆spa| 亚洲国产精品成人久久综合一区| 老司机精品视频线观看86| 欧美精品18+| 五月开心婷婷久久| 欧洲精品在线观看| 亚洲综合清纯丝袜自拍| 91看片淫黄大片一级在线观看| 欧美激情在线观看视频免费| 国产精品亚洲一区二区三区妖精| 精品人在线二区三区| 久久激五月天综合精品| 日韩欧美卡一卡二| 久久精品国产精品亚洲红杏| 日韩一二三区视频| 美国一区二区三区在线播放| 91精品国产色综合久久不卡蜜臀 | 天天射综合影视| 91精品黄色片免费大全| 日日摸夜夜添夜夜添国产精品| 精品视频在线视频| 亚洲成av人片一区二区三区| 欧美色涩在线第一页| 亚洲高清不卡在线观看| 5858s免费视频成人| 久久精品久久久精品美女| 精品裸体舞一区二区三区| 国产一区二区三区在线观看免费| 国产亚洲一本大道中文在线| 高清av一区二区| 国产精品二区一区二区aⅴ污介绍| www.亚洲人| 亚洲男人的天堂av| 欧美日韩精品一区二区在线播放| 石原莉奈在线亚洲三区| 日韩欧美一区在线观看| 国产精品亚洲综合一区在线观看| 国产精品你懂的| 91精品福利视频| 午夜精品久久久久久久久久| 日韩欧美中文一区二区| 国产不卡在线播放| 亚洲日本va在线观看| 欧美日韩性生活| 免费观看在线综合| 国产喷白浆一区二区三区| 99re成人精品视频| 午夜电影一区二区三区| 欧美不卡视频一区| 成人黄色777网| 亚洲自拍欧美精品| 欧美不卡一区二区| 99re在线视频这里只有精品| 天使萌一区二区三区免费观看| 精品久久一二三区| 波多野结衣精品在线| 五月综合激情婷婷六月色窝| 精品国产亚洲一区二区三区在线观看| 成人午夜激情片| 亚洲福利视频一区二区| 久久亚洲精华国产精华液| 99精品国产热久久91蜜凸| 视频精品一区二区| 欧美激情一区三区| 欧美美女网站色| 国产精品18久久久久久久久| 亚洲综合精品久久| 久久日一线二线三线suv| 色综合久久中文字幕综合网| 男人操女人的视频在线观看欧美| 亚洲国产高清在线观看视频| 欧美日韩黄色一区二区| 粉嫩一区二区三区在线看| 亚洲午夜激情网站| 国产视频一区在线观看| 欧美日韩午夜精品| 成人午夜精品在线| 美女网站一区二区| 亚洲精品福利视频网站| www国产精品av| 欧美在线一二三四区| 国产高清亚洲一区| 日本视频免费一区| 亚洲视频小说图片| 久久色中文字幕| 欧美精品一二三| 99久久精品免费精品国产| 美女www一区二区| 亚洲国产日韩在线一区模特| 国产日韩av一区二区| 欧美猛男超大videosgay| 成人综合在线视频| 久久国产精品一区二区| 亚洲一本大道在线| 国产精品久久久久久亚洲毛片 | 26uuu久久综合| 欧美视频你懂的| 成人福利电影精品一区二区在线观看| 喷水一区二区三区| 亚洲成av人**亚洲成av**| 最近中文字幕一区二区三区| 久久亚洲精品国产精品紫薇| 欧美一区二区三区在线电影| 在线观看三级视频欧美| 成人免费的视频| 韩国成人福利片在线播放| 日韩电影一二三区| 亚洲精品你懂的| 国产精品国产三级国产普通话99 | 欧美一级生活片| 欧美综合一区二区| 97久久超碰精品国产| 国产成人综合视频| 精品一区二区三区欧美| 日本女人一区二区三区| 亚洲成人av资源| 亚洲综合区在线| 亚洲精品久久久蜜桃| 亚洲欧美怡红院| 国产精品毛片久久久久久久| 久久久国产精品麻豆| 久久影音资源网| 久久一区二区视频| 久久久久久久一区| 欧美成人aa大片| 久久一区二区三区国产精品| 久久综合久久久久88| 精品日韩在线观看| 精品国产欧美一区二区| 精品毛片乱码1区2区3区| 精品久久久久香蕉网| 久久综合九色欧美综合狠狠| 精品99999| 久久精品亚洲一区二区三区浴池| 欧美精品一区二区高清在线观看| 精品少妇一区二区三区免费观看| 欧美成人精品福利| 久久综合九色综合97_久久久 | 欧美亚洲另类激情小说| 在线观看中文字幕不卡| 欧美在线高清视频| 欧美三电影在线| 7777精品伊人久久久大香线蕉最新版 | 亚洲成人一区在线| 丝袜亚洲精品中文字幕一区| 日本系列欧美系列| 精品一区二区三区视频在线观看 | 日本欧美一区二区在线观看| 日本不卡不码高清免费观看| 久久精品国产秦先生| 韩国精品久久久| 成人伦理片在线| 色噜噜久久综合| 欧美日韩aaa| 欧美mv日韩mv亚洲| 国产亚洲精品精华液| 中文字幕日韩欧美一区二区三区| 亚洲靠逼com| 午夜久久久影院| 国产在线观看一区二区| 波多野结衣中文字幕一区| 色噜噜狠狠色综合欧洲selulu| 欧美日本在线观看| 日韩女优av电影在线观看| 国产日韩欧美精品一区| 亚洲嫩草精品久久| 蜜桃在线一区二区三区| 国产精品123区| 在线亚洲精品福利网址导航| 欧美一区二区三区电影| 中文字幕第一区二区| 亚洲国产精品尤物yw在线观看| 久久精品国产久精国产| 99国产精品国产精品毛片|