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

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

?? iflib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/* ifLib.c - network interface library *//* Copyright 1984 - 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------03h,10may02,kbw  making man page edits03g,09may02,wsl  fix doc formatting error03f,08jan02,vvv  fixed ifRouteDelete to use correct netmask (SPR #33381)03e,07dec01,rae  merge from synth ver 03r (SPR #70269)03d,05nov01,vvv  fixed compilation warning03c,15oct01,rae  merge from truestack ver 03p, base 03b (ROUTER_STACK)03b,12mar99,c_c  Doc: updated ifAddrGet, ifFlagSet() and ifDeleRoute 		(SPRs #21401, 9146 and 21076).03a,06oct98,ham  changed API for ifAddrAdd() (SPR22267)02a,19mar98,spm  fixed byte ordering in ifRouteDelete() routine; changed to                  use mRouteDelete() to support classless routing (SPR #20548)01z,16apr97,vin  changed SOCK_DGRAM to SOCK_RAW as udp can be scaled out.		 fixed ifRouteDelete().01y,16oct96,dgp  doc: add explanations to ifFlagsSet per SPR 733701x,11jul94,dzb  Fixed setting of errno in ifIoctlCall() (SPR #3188).                 Fixed ntohl transfer in ifMaskGet() (SPR #3334).01w,19oct92,jmm  added ntohl () to ifMaskGet() to make it symetrical w/ifMaskSet01v,02sep93,elh  changed ifunit back to berkeley orig to fix spr (1516).01u,11aug93,jmm  Changed ioctl.h and socket.h to sys/ioctl.h and sys/socket.h01t,05feb93,jag  Changed call to inet_ntoa to inet_ntoa_b in ifInetAddrToStr,		 changed ifRouteDelete accordingly SPR# 181401s,20jan93,jdi  documentation cleanup for 5.1.01r,18jul92,smb  Changed errno.h to errnoLib.h.01q,26may92,rrr  the tree shuffle		  -changed includes to have absolute path from h/01p,10dec91,gae  added includes for ANSI.01o,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -fixed #else and #endif		  -changed copyright notice01n,01may91,elh	 added htonl to ifMaskSet because network wants mask                 to be in network byte order.01m,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;	   +elh	 added ifunit() from if.c (elh); doc review by dnw.01l,18jan91,jaa	 documentation.01k,26jun90,hjb  moved ifShow, etc. to netShow.c.01j,18mar90,hjb  de-linted.  minor syntax cleanup.01i,14mar90,jdi  documentation cleanup.01h,07aug89,gae  undid 01e -- fixed if_bp.c.01g,03aug89,hjb  fixed ifShow to work with "bp" interfaces which                 use incompatible "ifp->if_name" convention (unit number is                 for some reason appended to the if_name itself?).01f,30jul89,gae  removed varargs stuff; internal name changes.		 documentation tweaks.  lint.01e,28jul89,hjb  added routines ifAddrGet, ifBroadcastGet, ifDstAddrGet,                 ifAddrParamGet, ifMaskGet, ifFlagChange, ifFlagGet,		 ifMetricSet, ifMetricGet, ifIoctl, ifSetIoctl, ifGetIoctl,		 ifIoctlCall, and modified ifEtherPrint.01d,27jul89,hjb  added routines ifShow, ifFlagSet, ifDstAddrSet, ifAddrPrint,		 ifFlagPrint, ifEtherPrint, ifRouteDelete.01c,18aug88,gae  documentation.01b,30may88,dnw  changed to v4 names.01a,28may88,dnw  extracted from netLib.*//*DESCRIPTIONThis library contains routines to configure the network interface parameters.Generally, each routine corresponds to one of the functions of the UNIXcommand \f3ifconfig\fP.To use this feature, include the following component:INCLUDE_NETWRS_IFLIBINCLUDE FILES: ifLib.hSEE ALSO: hostLib*/#include "vxWorks.h"#include "stdio.h"#include "netinet/in.h"#include "net/if.h"#include "netinet/if_ether.h"#include "sys/ioctl.h"#include "ioLib.h"#include "inetLib.h"#include "string.h"#include "netinet/in_var.h"#include "errnoLib.h"#include "sockLib.h"#include "hostLib.h"#include "routeLib.h"#include "unistd.h"#include "ifLib.h"#include "m2Lib.h"#include "arpLib.h"#include "routeEnhLib.h"#ifdef DEBUG#include "logLib.h"#endif#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#include "netinet/vsRadix.h" 	/* for rt_tables definition */#include "netinet/vsIp.h" 	/* for _in_ifaddr definition */#endif /* VIRTUAL_STACK *//* * macro to convert interface address into character string representation. * The return value is a_ip_addr. */#define ifInetAddrToStr(ifAddr,a_ip_addr) \((inet_ntoa_b(((struct sockaddr_in *)(ifAddr))->sin_addr,a_ip_addr)),a_ip_addr)#define RT_ARP          0x100                   /* arp route entry *//* * Imported global variables */#ifndef VIRTUAL_STACKIMPORT struct ifnet 		*ifnet;	/* global pointer to all interfaces */IMPORT struct in_ifaddr 	*in_ifaddr; /* global pointer to addresses */#endif /* VIRTUAL_STACK */IMPORT STATUS _arpCmd (int, struct in_addr *, u_char *, int *);/* forward static functions */static STATUS ifAddrParamGet (char *interfaceName, int code, char *address);static STATUS ifIoctl (char *interfaceName, int code, int arg);static STATUS ifIoctlSet (char *interfaceName, int code, int val);static STATUS ifIoctlGet (char *interfaceName, int code, int *val);static STATUS ifIoctlCall (int code, struct ifreq *ifrp);LOCAL int routeNodeDelete ();LOCAL int _routeNodeDelete (struct rtentry * pRt, int * pDeleted);/********************************************************************************* ifUnnumberedSet - configure an interface to be unnumbered** This API sets an interface unnumbered. It sets the IFF_POINTOPOINT flags* and creates a routing entry through the interface using a user-specified* destination IP address. The unnumbered link can then be uniquely referred* to by the destination IP address, <pDstIp>, when adding routes. The* interface is assigned a "borrowed" IP address--borrowed from another* interface on the machine. In RFC 1812 it is also called the router ID.* This address will be used to generate any needed ICMP messages or the like.* Note that ARP is not able to run on an unnumbered link.* * The initialization of the unnumbered device is similar to other* network devices, but it does have a few additional steps and concerns.* ifUnnumberedSet() must come next after ipAttach(). Please note that* the interface using the IP address that the unnumbered interface will* borrow must be brought up first and configured with <ifAddrSet> or * equivalent. This is required to ensure normal network operation for* that IP address/interface.  After ifUnnumberedSet(), one must create* additional routing entries (using mRouteAdd(), routeNetAdd(), etc)* in order to reach other networks, including the network to which* the destination IP address belongs. * * The <pDstMac> field in ifUnnumberedSet() is used to specify the* destination's MAC address. It should be left NULL if the destination* is not an Ethernet device. If the MAC address is not known, then* supply an artificial address. We recommend using "00:00:00:00:00:01"* The destination interface can then be set promiscuous to accept* this artificial address. This is accomplished using the <ifpromisc>* command.** Example:* \ss* ipAttach (1, "fei")* ifUnnumberedSet ("fei1", "120.12.12.12", "140.34.78.94", "00:a0:d0:d8:c8:14")* routeNetAdd ("120.12.0.0","120.12.12.12") <One possible network>* routeNetAdd ("178.45.0.0","120.12.12.12") <Another possible network>* \se* RETURNS: OK, or ERROR if the interface cannot be set.**/#ifdef ROUTER_STACKSTATUS ifUnnumberedSet    (    char *pIfName,	/* Name of interface to configure */     char *pDstIp, 	/* Destination address of the point to point link */    char *pBorrowedIp,	/* The borrowed IP address/router ID */    char *pDstMac	/* Destination MAC address */    )    {    int s, ret;    struct ifnet *ifp;    struct sockaddr_in sock;    if(!(ifp = ifunit (pIfName)))	return (ERROR);    /*     * Make sure that the interface with the "real"     * pBorrowedIp is already brought up.     */    bzero ((char *)&sock, sizeof (struct sockaddr_in));    sock.sin_family = AF_INET;    sock.sin_len = sizeof (struct sockaddr_in);    sock.sin_addr.s_addr = inet_addr (pBorrowedIp);    if (!ifa_ifwithaddr ((struct sockaddr *)&sock))        return (EINVAL);     /* We manually configure the interface to be IFF_UNNUMBERED */    s = splnet ();    ifp->if_flags &= ~IFF_BROADCAST;    ifp->if_flags |= IFF_UNNUMBERED;	/* It's defined as IFF_POINTOPOINT */    splx (s);    ret = ifAddrAdd (pIfName, pBorrowedIp, pDstIp, 0);    if (ret != OK)	return (ret);    /*     * For ethernet devices, we need to complete the route entry     * just created by the above operation. The ATF_INCOMPLETE flag     * will change the routing entry to contain the MAC address     * of the destination's ethernet device.     */    if (pDstMac != (char *)NULL)        ret = arpAdd (pDstIp, pDstMac, ATF_PERM | ATF_INCOMPLETE);    return (ret);    }#endif /* ROUTER_STACK *//********************************************************************************* ifAddrAdd - add an interface address for a network interface** This routine assigns an Internet address to a specified network interface.* The Internet address can be a host name or a standard Internet address* format (e.g., 90.0.0.4).  If a host name is specified, it should already* have been added to the host table with hostAdd().** You must specify both an <interfaceName> and an <interfaceAddress>. A * <broadcastAddress> is optional. If <broadcastAddress> is NULL, in_ifinit() * generates a <broadcastAddress> value based on the <interfaceAddress> value* and the netmask.  A <subnetMask> value is optional.  If <subnetMask> is 0, * in_ifinit() uses a <subnetMask> the same as the netmask that is generated * by the <interfaceAddress>.  The <broadcastAddress> is also <destAddress> in * case of IFF_POINTOPOINT.** RETURNS: OK, or ERROR if the interface cannot be set.** SEE ALSO: ifAddrGet(), ifDstAddrSet(), ifDstAddrGet()*/STATUS ifAddrAdd    (    char *interfaceName,     /* name of interface to configure */    char *interfaceAddress,  /* Internet address to assign to interface */    char *broadcastAddress,  /* broadcast address to assign to interface */    int   subnetMask         /* subnetMask */    )    {    struct ifaliasreq   ifa;    struct sockaddr_in *pSin_iaddr = (struct sockaddr_in *)&ifa.ifra_addr;    struct sockaddr_in *pSin_baddr = (struct sockaddr_in *)&ifa.ifra_broadaddr;    struct sockaddr_in *pSin_snmsk = (struct sockaddr_in *)&ifa.ifra_mask;    int                 so;    int                 status = 0;    bzero ((caddr_t) &ifa, sizeof (ifa));    /* verify Internet address is in correct format */    if ((pSin_iaddr->sin_addr.s_addr =             inet_addr (interfaceAddress)) == ERROR &&        (pSin_iaddr->sin_addr.s_addr =             hostGetByName (interfaceAddress) == ERROR))        {        return (ERROR);        }    /* verify Boradcast address is in correct format */    if (broadcastAddress != NULL &&        (pSin_baddr->sin_addr.s_addr =             inet_addr (broadcastAddress)) == ERROR &&        (pSin_baddr->sin_addr.s_addr =             hostGetByName (broadcastAddress) == ERROR))        {        return (ERROR);        }    strncpy (ifa.ifra_name, interfaceName, sizeof (ifa.ifra_name));    /* for interfaceAddress */    ifa.ifra_addr.sa_len = sizeof (struct sockaddr_in);    ifa.ifra_addr.sa_family = AF_INET;    /* for broadcastAddress */    if (broadcastAddress != NULL)        {        ifa.ifra_broadaddr.sa_len = sizeof (struct sockaddr_in);        ifa.ifra_broadaddr.sa_family = AF_INET;        }    /* for subnetmask */    if (subnetMask != 0)       {       ifa.ifra_mask.sa_len = sizeof (struct sockaddr_in);       ifa.ifra_mask.sa_family = AF_INET;       pSin_snmsk->sin_addr.s_addr = htonl (subnetMask);       }    if ((so = socket (AF_INET, SOCK_RAW, 0)) < 0)        return (ERROR);    status = ioctl (so, SIOCAIFADDR, (int)&ifa);    (void)close (so);    if (status != 0)        {        if (status != ERROR)    /* iosIoctl() can return ERROR */            (void)errnoSet (status);        return (ERROR);        }    return (OK);    }/********************************************************************************* ifAddrSet - set an interface address for a network interface** This routine assigns an Internet address to a specified network interface.* The Internet address can be a host name or a standard Internet address* format (e.g., 90.0.0.4).  If a host name is specified, it should already* have been added to the host table with hostAdd().** A successful call to ifAddrSet() results in the addition of a new route.** The subnet mask used in determining the network portion of the address will* be that set by ifMaskSet(), or the default class mask if ifMaskSet() has not* been called.  It is standard practice to call ifMaskSet() prior to calling* ifAddrSet().** RETURNS: OK, or ERROR if the interface cannot be set.** SEE ALSO: ifAddrGet(), ifDstAddrSet(), ifDstAddrGet()*/STATUS ifAddrSet    (    char *interfaceName,        /* name of interface to configure, i.e. ei0 */    char *interfaceAddress      /* Internet address to assign to interface */    )    {    return (ifIoctl (interfaceName, SIOCSIFADDR, (int)interfaceAddress));    }/********************************************************************************* ifAddrDelete - delete an interface address for a network interface** This routine deletes an Internet address from a specified network interface.* The Internet address can be a host name or a standard Internet address* format (e.g., 90.0.0.4).  If a host name is specified, it should already* have been added to the host table with hostAdd().** RETURNS: OK, or ERROR if the interface cannot be deleted.** SEE ALSO: ifAddrGet(), ifDstAddrSet(), ifDstAddrGet()*/STATUS ifAddrDelete    (    char *interfaceName,        /* name of interface to delete addr from */    char *interfaceAddress      /* Internet address to delete from interface */    )    {    return (ifIoctl (interfaceName, SIOCDIFADDR, (int) interfaceAddress));    }/********************************************************************************* ifAddrGet - get the Internet address of a network interface

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
懂色av一区二区夜夜嗨| 欧美网站一区二区| 激情综合一区二区三区| 偷拍一区二区三区| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲天天做日日做天天谢日日欢| 久久久蜜桃精品| 国产亚洲视频系列| 日本一区二区三区四区 | 国产成人av电影免费在线观看| 国产毛片一区二区| 国产成人综合视频| 成人av资源站| 色www精品视频在线观看| 在线观看亚洲精品| 777色狠狠一区二区三区| 欧美一卡2卡三卡4卡5免费| 日韩欧美中文字幕一区| 精品国精品国产尤物美女| 久久久99久久| 亚洲色图在线视频| 亚洲成人动漫在线免费观看| 三级欧美韩日大片在线看| 蜜臂av日日欢夜夜爽一区| 国产一区中文字幕| 成人av第一页| 欧洲av一区二区嗯嗯嗯啊| 欧美日韩亚洲综合| 日韩欧美国产三级| 国产丝袜欧美中文另类| 亚洲日本在线看| 亚洲第一成人在线| 久久 天天综合| 99热在这里有精品免费| 欧美日韩激情一区二区| 亚洲精品一线二线三线无人区| 中文字幕欧美国产| 亚洲午夜视频在线| 精品一区二区综合| 91蜜桃婷婷狠狠久久综合9色| 欧美日韩在线直播| 国产亚洲一二三区| 亚洲一区二区三区四区在线观看 | 亚洲国产欧美在线| 国产精品18久久久| 欧美私人免费视频| 久久综合九色综合久久久精品综合| 亚洲欧洲日韩av| 日本免费新一区视频| av在线不卡网| 日韩欧美一区二区久久婷婷| 国产精品美女久久久久久久| 日韩二区三区四区| 91在线免费看| 欧美精品一区二区三区四区| 亚洲黄色尤物视频| 国产曰批免费观看久久久| 精品视频一区 二区 三区| 中文字幕成人av| 免费在线欧美视频| 色天天综合久久久久综合片| 久久久久久97三级| 免费三级欧美电影| 久久人人97超碰com| 一区二区三区波多野结衣在线观看| 国产美女在线观看一区| 欧美日韩一区二区三区不卡| 国产精品久久久久久久午夜片| 奇米综合一区二区三区精品视频| 91色|porny| 国产亚洲成aⅴ人片在线观看| 丝袜美腿亚洲色图| 91蜜桃网址入口| 中文字幕av一区二区三区| 精品一区二区国语对白| 欧美日本乱大交xxxxx| 亚洲精品国产精品乱码不99| 国产精品综合在线视频| 欧美一区二区三区免费视频| 亚洲最大成人综合| 99久久久久久| 亚洲国产激情av| 国产一区999| 久久婷婷综合激情| 麻豆一区二区三区| 91精品国产黑色紧身裤美女| 亚洲国产视频在线| 色香蕉成人二区免费| 中文字幕永久在线不卡| 国产精品一区在线观看你懂的| 日韩午夜在线观看| 青椒成人免费视频| 91麻豆精品国产自产在线 | 另类的小说在线视频另类成人小视频在线| 在线精品视频免费播放| 一区二区高清免费观看影视大全| 成人黄色国产精品网站大全在线免费观看 | 精品视频在线视频| 亚洲电影在线免费观看| 在线中文字幕一区二区| 亚洲精品第一国产综合野| 一本色道**综合亚洲精品蜜桃冫| 亚洲人妖av一区二区| 91在线观看免费视频| 亚洲欧美怡红院| 91啪在线观看| 一区二区三区四区高清精品免费观看| 91亚洲精品一区二区乱码| 国产精品久久久久精k8| 99视频国产精品| 一区二区免费看| 欧美日韩精品欧美日韩精品| 午夜精品视频一区| 日韩一级免费一区| 国产美女久久久久| 国产精品家庭影院| 色就色 综合激情| 五月天久久比比资源色| 欧美mv和日韩mv国产网站| 韩国av一区二区三区四区 | 麻豆中文一区二区| 国产欧美一区二区精品婷婷| 成人免费av网站| 一区二区在线观看视频在线观看| 欧美日韩综合色| 久久99国产精品久久| 国产精品久久久久婷婷二区次| 色久综合一二码| 热久久一区二区| 久久久久久久久久看片| 99天天综合性| 日韩黄色一级片| 久久嫩草精品久久久精品| 成人久久久精品乱码一区二区三区 | 国产精品久久久久久户外露出 | 精品国产1区二区| 成人黄色网址在线观看| 亚洲国产日韩综合久久精品| 日韩精品一区二区三区在线观看 | 精品国产一区二区三区四区四| 岛国一区二区三区| 亚洲国产欧美一区二区三区丁香婷| 日韩午夜激情视频| 成人av影视在线观看| 亚洲va欧美va人人爽午夜| 精品国产91乱码一区二区三区 | 欧美一区日韩一区| 不卡电影免费在线播放一区| 亚洲国产精品久久艾草纯爱| 2021中文字幕一区亚洲| 色婷婷av一区| 国产精品99久久久| 亚洲成人先锋电影| 欧美激情一区不卡| 正在播放一区二区| 99视频一区二区三区| 久久aⅴ国产欧美74aaa| 一区二区三区在线视频观看| 精品免费国产二区三区| 日本精品一区二区三区高清| 国产综合色精品一区二区三区| 亚洲精品欧美激情| 久久久噜噜噜久噜久久综合| 欧美日韩亚洲综合在线| 成人av网站在线观看免费| 免费在线欧美视频| 亚洲资源在线观看| 国产精品嫩草影院com| 欧美一区二区精品久久911| 色综合天天综合网天天狠天天| 青青国产91久久久久久| 国产精品丝袜久久久久久app| 91精品国产欧美日韩| 91免费视频网址| 国产美女在线观看一区| 午夜精品视频一区| 亚洲精品乱码久久久久| 国产人成亚洲第一网站在线播放| 91精品国产免费| 在线观看亚洲成人| 91亚洲大成网污www| 国产精品自拍在线| 蜜桃精品视频在线| 午夜精品久久久久久久久久久| 自拍偷拍国产亚洲| 中文字幕巨乱亚洲| 久久久美女毛片| 精品噜噜噜噜久久久久久久久试看| 欧美日韩一区 二区 三区 久久精品| 成人激情开心网| 国产精品一二一区| 九九热在线视频观看这里只有精品| 偷拍一区二区三区| 午夜精品久久久久久久99水蜜桃| 亚洲精品老司机| 亚洲激情图片小说视频| 亚洲人成在线观看一区二区| 国产精品人成在线观看免费| 国产无遮挡一区二区三区毛片日本| 日韩精品专区在线影院重磅|