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

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

?? m2udplib.c

?? vxworks的完整的源代碼
?? C
字號:
/* m2UdpLib.c - MIB-II UDP-group API for SNMP agents *//* Copyright 1984 - 2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01e,15oct01,rae  merge from truestack ver 01i, base 01d (SPR #68597, VS)01d,08mar97,vin  added changes to accomodate changes in pcb structure.01c,25jan95,jdi  doc cleanup.01b,11nov94,rhp  edited man pages01a,08dec93,jag  written*//*DESCRIPTIONThis library provides MIB-II services for the UDP group.  It providesroutines to initialize the group, access the group scalar variables, andread the table of UDP listeners.  For a broader description of MIB-IIservices, see the manual entry for m2Lib.To use this feature, include the following component:INCLUDE_MIB2_UDPUSING THIS LIBRARYThis library can be initialized and deleted by callingm2UdpInit() and m2UdpDelete() respectively, if only the UDP group's services are needed.  If full MIB-II support is used, this group and all othergroups can be initialized and deleted by calling m2Init() and m2Delete().The group scalar variables are accessed by calling m2UdpGroupInfoGet()as follows:.CS    M2_UDP   udpVars;    if (m2UdpGroupInfoGet (&udpVars) == OK)	/@ values in udpVars are valid @/.CEThe UDP table of listeners can be accessed in lexicographical order.The first entry in the table can be accessed by setting the tableindex to zero in a call to m2UdpTblEntryGet().  Every other entrythereafter can be accessed by incrementing the index returned from theprevious invocation to the next possible lexicographical index, andrepeatedly calling m2UdpTblEntryGet() with the M2_NEXT_VALUE constantas the search parameter. For example:.CSM2_UDPTBL  udpEntry;    /@ Specify zero index to get the first entry in the table @/    udpEntry.udpLocalAddress = 0;    /@ local IP Address in host byte order  @/    udpEntry.udpLocalPort    = 0;    /@ local port Number                  @/    /@ get the first entry in the table @/    if ((m2UdpTblEntryGet (M2_NEXT_VALUE, &udpEntry) == OK)	/@ values in udpEntry in the first entry are valid  @/    /@ process first entry in the table @/    /@      * For the next call, increment the index returned in the previous call.     * The increment is to the next possible lexicographic entry; for     * example, if the returned index was 0.0.0.0.3000 the index passed in the     * next invocation should be 0.0.0.0.3001.  If an entry in the table     * matches the specified index, then that entry is returned.       * Otherwise the closest entry following it, in lexicographic order,     * is returned.     @/    /@ get the second entry in the table @/    if ((m2UdpTblEntryGet (M2_NEXT_VALUE, &udpEntry) == OK)	/@ values in udpEntry in the second entry are valid  @/.CEINCLUDE FILES: m2Lib.h SEE ALSO:m2Lib, m2IfLib, m2IpLib, m2IcmpLib, m2TcpLib, m2SysLib*//* includes */#include "vxWorks.h"#include "vwModNum.h"#include "m2Lib.h"#include "socket.h"#include <net/route.h>#include <netinet/in.h>#include <netinet/ip.h>#include <netinet/ip_var.h>#include <netinet/udp.h>#include <netinet/udp_var.h>#include <netinet/in_pcb.h>#include "errnoLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#endif    /* VIRTUAL_STACK *//* external declarations */#ifndef VIRTUAL_STACKextern struct udpstat     udpstat;	/* UDP statistics variable */extern struct inpcbhead   udb;		/* UDP link list of listen requests */#endif    /* VIRTUAL_STACK *//********************************************************************************* m2UdpInit - initialize MIB-II UDP-group access** This routine allocates the resources needed to allow access to the UDP * MIB-II variables.  This routine must be called before any UDP variables* can be accessed.** RETURNS: OK, always.** SEE ALSO:* m2UdpGroupInfoGet(), m2UdpTblEntryGet(), m2UdpDelete()*/STATUS m2UdpInit (void)    {    return (OK);    }/********************************************************************************* m2UdpGroupInfoGet - get MIB-II UDP-group scalar variables** This routine fills in the UDP structure at <pUdpInfo> with the MIB-II* UDP scalar variables.** RETURNS: OK, or ERROR if <pUdpInfo> is not a valid pointer.** ERRNO:* S_m2Lib_INVALID_PARAMETER** SEE ALSO:* m2UdpInit(), m2UdpTblEntryGet(), m2UdpDelete()*/STATUS m2UdpGroupInfoGet    (    M2_UDP * pUdpInfo		/* pointer to the UDP group structure */    )    {     /* Validate Pointer to UDP structure */     if (pUdpInfo == NULL)	{	errnoSet (S_m2Lib_INVALID_PARAMETER);        return (ERROR);	}     pUdpInfo->udpNoPorts      = udpstat.udps_noport + 				udpstat.udps_noportbcast;     pUdpInfo->udpOutDatagrams = udpstat.udps_opackets;    /*  The number UDP packets deliever to UDP users. */    pUdpInfo->udpInDatagrams  = udpstat.udps_ipackets    -                                (udpstat.udps_hdrops     +                                udpstat.udps_badsum      +                                udpstat.udps_badlen      +                                udpstat.udps_noportbcast +                                udpstat.udps_fullsock);     /*  The number UDP packets not deliever due to errors */    pUdpInfo->udpInErrors     = udpstat.udps_hdrops +                                udpstat.udps_badsum +                                udpstat.udps_badlen;     return (OK);    }/********************************************************************************* m2UdpTblEntryGet - get a UDP MIB-II entry from the UDP list of listeners** This routine traverses the UDP table of listeners and does an* M2_EXACT_VALUE or a M2_NEXT_VALUE search based on the* <search> parameter.  The calling routine is responsible for* supplying a valid MIB-II entry index in the input structure* <pUdpEntry>.  The index is made up of the IP address and the local* port number.  The first entry in the table is retrieved by doing a* M2_NEXT_VALUE search with the index fields set to zero.** RETURNS:* OK, or ERROR if the input parameter is not specified or a match is not * found.** ERRNO:*  S_m2Lib_INVALID_PARAMETER*  S_m2Lib_ENTRY_NOT_FOUND** SEE ALSO:* m2Lib, m2UdpInit(), m2UdpGroupInfoGet(), m2UdpDelete()*/STATUS m2UdpTblEntryGet    (    int              search,        /* M2_EXACT_VALUE or M2_NEXT_VALUE */    M2_UDPTBL      * pUdpEntry      /* ptr to the requested entry with index */    )    {    M2_UDPTBL        savedEntry;    /* Possible M2_NEXT_VALUE Entry in UDP */				    /* table */    M2_UDPTBL        currEntry;    int              netLock;       /* Use to secure the Network Code Access */    struct inpcb   * pPcb;          /* Pointer to UDP Listener structure. */      /* Validate Pointer to UDP Table Entry structure */     if (pUdpEntry == NULL)	{	errnoSet (S_m2Lib_INVALID_PARAMETER);        return (ERROR);	}     /*      * Initialize Entry for M2_NEXT_VALUE entry search.  Not used in     * M2_EXACT_VALUE search.     */     savedEntry.udpLocalAddress = -1;    /* Largest possible value. */    savedEntry.udpLocalPort    = -1;    /* Largest possible value. */     netLock = splnet ();             /* Get exclusive access to Network Code */     for (pPcb = udb.lh_first; pPcb != NULL; pPcb = pPcb->inp_list.le_next )        {	currEntry.udpLocalAddress = ntohl (pPcb->inp_laddr.s_addr);	currEntry.udpLocalPort    = ntohs (pPcb->inp_lport);        if (search == M2_EXACT_VALUE)            {	    /* Check that the specified index matches the current entry */            if ((pUdpEntry->udpLocalAddress == currEntry.udpLocalAddress) &&                (pUdpEntry->udpLocalPort == currEntry.udpLocalPort))                {                splx (netLock);   /* Give up exclusive access to Network Code */                return (OK);      /* The answer is in the structure pUdpEntry */                }            }        else            {            /*             * A NEXT search is satisfied by an entry that is lexicographicaly             * equal to or greater than the input UDP connection entry. Because	     * the UDP connection list is not in order, the list must be 	     * traverse completely before a selection is made.  The rules for a 	     * lexicographical comparison are built in the next statement.             */  	    if (((currEntry.udpLocalAddress > pUdpEntry->udpLocalAddress) ||		  ((currEntry.udpLocalAddress == pUdpEntry->udpLocalAddress) &&		   (currEntry.udpLocalPort >= pUdpEntry->udpLocalPort))) &&                 ((currEntry.udpLocalAddress < savedEntry.udpLocalAddress) ||                   ((currEntry.udpLocalAddress == savedEntry.udpLocalAddress) &&                    (currEntry.udpLocalPort < savedEntry.udpLocalPort))))                {		/* 		 * Save the entry which qualifies as the NEXT greater 		 * lexicographic entry.  Because the table is not order the		 * search must proceed to the end of the table.		 */                savedEntry.udpLocalAddress =  currEntry.udpLocalAddress;                savedEntry.udpLocalPort    =  currEntry.udpLocalPort;                }            }        }     splx (netLock);             /* Give up exclusive access to Network Code */    /* If a match was found fill, the requested structure */    if (savedEntry.udpLocalPort != -1)        {        pUdpEntry->udpLocalAddress = savedEntry.udpLocalAddress;        pUdpEntry->udpLocalPort    = savedEntry.udpLocalPort;        return (OK);        }     errnoSet (S_m2Lib_ENTRY_NOT_FOUND);    return (ERROR);    }/********************************************************************************* m2UdpDelete - delete all resources used to access the UDP group** This routine frees all the resources allocated at the time the group was* initialized.  The UDP group should not be accessed after this routine has been* called.** RETURNS: OK, always.** SEE ALSO:* m2UdpInit(), m2UdpGroupInfoGet(), m2UdpTblEntryGet()*/STATUS m2UdpDelete (void)    {    return (OK);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三四区不卡| 免费高清不卡av| 美女视频一区在线观看| 国产东北露脸精品视频| 欧美日韩一区中文字幕| 亚洲国产岛国毛片在线| 日韩电影在线免费观看| 日韩高清不卡一区二区三区| 色综合咪咪久久| 日本一区二区视频在线观看| 亚洲福利视频一区| 色哟哟一区二区| 中文字幕日韩一区二区| 国产精品18久久久久久久久 | 三级在线观看一区二区| 懂色av中文字幕一区二区三区| 欧美精品aⅴ在线视频| 亚洲欧美日韩国产一区二区三区| 国产精品一区二区黑丝| 日韩一区二区三区视频在线| 亚洲狠狠爱一区二区三区| 日本韩国欧美在线| 亚洲精品视频免费看| 成人免费看视频| 中文字幕高清一区| 成人性视频网站| 国产亚洲va综合人人澡精品| 美女www一区二区| 日韩欧美国产三级电影视频| 午夜精品久久久久| 制服.丝袜.亚洲.中文.综合| 亚洲高清三级视频| 欧美日韩国产成人在线免费| 亚洲成人综合网站| 在线不卡欧美精品一区二区三区| 亚洲mv大片欧洲mv大片精品| 欧美性极品少妇| 午夜日韩在线电影| 91精品在线免费| 久久国产日韩欧美精品| 欧美电视剧免费全集观看 | 亚洲国产成人av网| 在线成人高清不卡| 久久av资源网| 中文字幕免费不卡| 色婷婷狠狠综合| 午夜视频一区二区| 日韩免费高清电影| 国产成人夜色高潮福利影视| 中文乱码免费一区二区| 91网站最新地址| 午夜精品久久久久久久久久久| 日韩一卡二卡三卡| 国产成人免费9x9x人网站视频| 亚洲欧美综合另类在线卡通| 欧洲精品中文字幕| 精品无人码麻豆乱码1区2区| 国产精品视频一二三| 欧美亚洲一区二区在线观看| 日本成人在线电影网| 久久精品网站免费观看| 91视频在线看| 日本视频一区二区| 国产精品日产欧美久久久久| 欧美日韩亚洲高清一区二区| 极品销魂美女一区二区三区| 国产精品狼人久久影院观看方式| 欧美性猛交一区二区三区精品| 另类小说综合欧美亚洲| 最新高清无码专区| 日韩一区二区视频| 色综合久久综合中文综合网| 美女一区二区在线观看| 中文字幕一区二区三区在线播放 | 亚洲最大成人网4388xx| 日韩天堂在线观看| 色综合久久天天综合网| 伦理电影国产精品| 成人免费一区二区三区视频| 337p亚洲精品色噜噜噜| 91成人免费电影| 国产高清精品在线| 免费一级欧美片在线观看| 最好看的中文字幕久久| 精品国产1区二区| 欧美日韩中文字幕一区二区| 国产激情一区二区三区四区| 日韩经典一区二区| 樱花草国产18久久久久| 国产欧美一区二区精品婷婷 | 精品免费视频.| 欧美性色黄大片| 99久久免费视频.com| 极品销魂美女一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 国产精品欧美极品| 久久午夜羞羞影院免费观看| 欧美美女直播网站| 色呦呦网站一区| 色综合天天综合狠狠| 国产成人一级电影| 国产精品一区二区在线看| 琪琪一区二区三区| 日本欧美肥老太交大片| 首页综合国产亚洲丝袜| 亚洲一区在线播放| 亚洲女性喷水在线观看一区| 欧美国产1区2区| 欧美激情一区二区三区四区| 精品99一区二区三区| 欧美v国产在线一区二区三区| 91精品国产91综合久久蜜臀| 欧美日韩国产三级| 欧美日韩国产综合久久| 欧美日韩高清一区二区| 欧美区视频在线观看| 666欧美在线视频| 91精品国产色综合久久| 在线播放91灌醉迷j高跟美女| 欧美日韩免费一区二区三区 | 欧美大胆人体bbbb| 日韩视频在线观看一区二区| 日韩视频免费观看高清在线视频| 欧美一级艳片视频免费观看| 日韩欧美在线观看一区二区三区| 91精品久久久久久久99蜜桃| 91精品国产乱码| 久久一区二区三区国产精品| 久久久久久久久久久黄色| 国产欧美一区二区在线观看| 中文一区二区在线观看| 综合自拍亚洲综合图不卡区| 亚洲高清在线视频| 久久66热re国产| 成人avav影音| 欧美人xxxx| 久久精品亚洲一区二区三区浴池| 中文字幕一区三区| 亚洲电影在线播放| 国产综合久久久久影院| 成人晚上爱看视频| 欧美日韩成人一区二区| 精品国产自在久精品国产| 国产精品美日韩| 亚洲成人av免费| 国产精品一级片在线观看| 99久久国产免费看| 欧美一级黄色片| 中国色在线观看另类| 亚洲va欧美va人人爽| 国产福利不卡视频| 在线观看三级视频欧美| 欧美大胆人体bbbb| 亚洲理论在线观看| 国产一区二区在线电影| 99re6这里只有精品视频在线观看| 欧美日韩一级片在线观看| 久久蜜桃香蕉精品一区二区三区| 亚洲精品久久嫩草网站秘色| 免费在线欧美视频| 一本大道久久a久久综合婷婷| 日韩欧美中文字幕精品| 亚洲欧洲av在线| 国产精一品亚洲二区在线视频| 欧美日韩在线播| 亚洲欧洲另类国产综合| 激情文学综合插| 欧美日韩亚洲综合一区二区三区| 国产人久久人人人人爽| 天天av天天翘天天综合网| 成人午夜免费视频| 欧美精品一区二区三区在线| 一二三四社区欧美黄| 成人蜜臀av电影| 日韩亚洲电影在线| 日日夜夜精品视频天天综合网| www.日韩av| 国产日韩精品视频一区| 麻豆免费看一区二区三区| 欧美午夜电影网| √…a在线天堂一区| 国产精品69毛片高清亚洲| 91精品婷婷国产综合久久性色| 亚洲午夜激情网站| 色综合色综合色综合色综合色综合 | 成人av电影在线观看| 久久综合久久综合久久| 五月开心婷婷久久| 欧美日韩中文精品| 亚洲永久精品国产| 91麻豆国产精品久久| 日韩毛片一二三区| av在线不卡免费看| 亚洲天堂av一区| www.欧美日韩| 中文字幕不卡三区| 99久久伊人精品| 一区二区久久久| 欧美三级在线播放| 日日嗨av一区二区三区四区|