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

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

?? m2tcplib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
** RETURNS: 0 = equal, 1 > greater than, and -1 < less than.** SEE ALSO: N/A*/LOCAL int tcpConnCmp    (    M2_TCPCONNTBL * pConnVal1,	/* pointer to control block (Compare againts) */    M2_TCPCONNTBL * pConnVal2	/* pointer to control block (Second entry) */    )    {    int result;	/* Comparison of two unsigned values */        if (pConnVal1->tcpConnLocalAddress > pConnVal2->tcpConnLocalAddress)            {            return 1;                   /* First Entry is Greater */            }         if (pConnVal1->tcpConnLocalAddress < pConnVal2->tcpConnLocalAddress)            {            return -1;                  /* First Entry is Smaller */            }	/* Comparison of two signed values */        result = pConnVal1->tcpConnLocalPort - pConnVal2->tcpConnLocalPort;         if (result != 0)            return (result);		/* Value > 0 or < 0 */ 	/* Comparison of two unsigned values */        if (pConnVal1->tcpConnRemAddress > pConnVal2->tcpConnRemAddress)            {            return 1;                   /* First Entry is Greater */            }         if (pConnVal1->tcpConnRemAddress < pConnVal2->tcpConnRemAddress)            {            return -1;                  /* First Entry is Smaller */            }         /* Result will determine Equal, Less than or Greater than */         return (pConnVal1->tcpConnRemPort - pConnVal2->tcpConnRemPort);    }/******************************************************************************** m2TcpConnEntryGet - get a MIB-II TCP connection table entry** This routine traverses the TCP table of users and does an* M2_EXACT_VALUE or a M2_NEXT_VALUE search based on the* <search> parameter (see m2Lib).  The calling routine is responsible* for supplying a valid MIB-II entry index in the input structure* <pReqTcpConnEntry>.  The index is made up of the local IP address,* the local port number, the remote IP address, and the remote port.* 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, m2TcpInit(), m2TcpGroupInfoGet(), m2TcpConnEntrySet(), m2TcpDelete()*/STATUS m2TcpConnEntryGet    (    int             search,             /* M2_EXACT_VALUE or M2_NEXT_VALUE */    M2_TCPCONNTBL * pReqTcpConnEntry    /* input = Index, Output = Entry */    )    {    M2_TCPCONNTBL   savedEntry; /* Use to save the table entry to return */    M2_TCPCONNTBL   tableEntry; /* Use to test an entry in the table */    int              netLock;   /* Use to secure the Network Code Access */    struct inpcb   * pPcb;      /* Pointer to an entry in TCP Connection List */     /* Validate Pointer to TCP Table Entry structure */     if (pReqTcpConnEntry == NULL)	{	errnoSet (S_m2Lib_INVALID_PARAMETER);        return (ERROR);	}    /* Setup structure used in the search for the requested TCP entry */    savedEntry.tcpConnState        =  TCP_NSTATES;  /* Invalid TCP State */    savedEntry.tcpConnLocalAddress = -1;	    /* Largest local IP Addr */    savedEntry.tcpConnLocalPort    = -1;	    /* Largest local port */     savedEntry.tcpConnRemAddress   = -1;	    /* Largest Remote IP Addr */    savedEntry.tcpConnRemPort      = -1;	    /* Largest Remote Port */     netLock = splnet ();        /* Get exclusive access to Network Code */    /*      * Traverse the circular list of TCP control blocks.  The first item in the     * list is a dummy header, skip it and used it as the loop exit condition.     */#ifdef VIRTUAL_STACK    /*     * To avoid introducing a conflict with the "tcpcb" structure tag,     * virtual stacks do not alias the head of the pcb list.     */    for (pPcb = tcb.lh_first; pPcb != NULL; pPcb = pPcb->inp_list.le_next)#else    for (pPcb = tcpcb.lh_first; pPcb != NULL; pPcb = pPcb->inp_list.le_next)#endif        { 	/* Convert control block format into a more convenient format */        tableEntry.tcpConnLocalAddress = ntohl(pPcb->inp_laddr.s_addr);        tableEntry.tcpConnLocalPort    = ntohs(pPcb->inp_lport);        tableEntry.tcpConnRemAddress   = ntohl(pPcb->inp_faddr.s_addr);        tableEntry.tcpConnRemPort      = ntohs(pPcb->inp_fport);         if (search == M2_EXACT_VALUE &&	    (tcpConnCmp(&tableEntry, pReqTcpConnEntry) == 0))            {	    /* Match, map the connection state to MIB-II format and exit */            pReqTcpConnEntry->tcpConnState =		    m2TcpStates [((struct tcpcb *) pPcb->inp_ppcb)->t_state];             splx (netLock);      /* Give up exclusive access to Network Code */            return (OK);            }        else            {            /*             * A NEXT search is satisfied by an entry that is lexicographicaly             * greater than the input TCP connection entry.  Because the TCP 	     * connection list is not in order, the list must be traverse 	     * completly before a selection is made.  The rules for a 	     * lexicographicaly comparison are built in the routine tcpConnCmp.             */              if ((tcpConnCmp(&tableEntry, pReqTcpConnEntry) >= 0) &&                (tcpConnCmp(&tableEntry, &savedEntry) < 0))                {                savedEntry.tcpConnLocalAddress = ntohl(pPcb->inp_laddr.s_addr);                savedEntry.tcpConnLocalPort    = ntohs(pPcb->inp_lport);                savedEntry.tcpConnRemAddress   = ntohl(pPcb->inp_faddr.s_addr);                savedEntry.tcpConnRemPort      = ntohs(pPcb->inp_fport);		/* Save the connection state in BSD format */                savedEntry.tcpConnState =                        ((struct tcpcb *) pPcb->inp_ppcb)->t_state;                }            }        }     splx (netLock);             /* Give up exclusive access to Network Code */     if (savedEntry.tcpConnState == TCP_NSTATES)	{	errnoSet (S_m2Lib_ENTRY_NOT_FOUND);        return (ERROR);                 /* Requested Entry Not Found */	}     pReqTcpConnEntry->tcpConnState      = m2TcpStates [savedEntry.tcpConnState];    pReqTcpConnEntry->tcpConnLocalAddress = savedEntry.tcpConnLocalAddress;    pReqTcpConnEntry->tcpConnLocalPort    = savedEntry.tcpConnLocalPort;    pReqTcpConnEntry->tcpConnRemAddress   = savedEntry.tcpConnRemAddress;    pReqTcpConnEntry->tcpConnRemPort      = savedEntry.tcpConnRemPort;     return (OK);    }/******************************************************************************** m2TcpConnEntrySet -  set a TCP connection to the closed state** This routine traverses the TCP connection table and searches for the* connection specified by the input parameter <pReqTcpConnEntry>. The* calling routine is responsible for providing a valid index as the* input parameter <pReqTcpConnEntry>.  The index is made up of the* local IP address, the local port number, the remote IP address, and* the remote port.  This call can only succeed if the connection is in* the MIB-II state "deleteTCB" (12).  If a match is found, the socket* associated with the TCP connection is closed.** RETURNS: * OK, or ERROR if the input parameter is invalid, the state of the* connection specified at <pReqTcpConnEntry> is not "closed,"* the specified connection is not found, a socket is not associated* with the connection, or the close() call fails.** SEE ALSO: * m2TcpInit(), m2TcpGroupInfoGet(), m2TcpConnEntryGet(), m2TcpDelete()*/STATUS m2TcpConnEntrySet    (    M2_TCPCONNTBL * pReqTcpConnEntry  /* pointer to TCP connection  to close */    )    {    int               fdToClose;     /* Selected File Descriptor to close */    int               netLock;       /* Use to secure the Network Code Access */    struct inpcb    * pInp;	     /* Pointer to BSD PCB list */    struct in_addr    loc_addr;	     /* Local IP Address structure */    struct in_addr    rem_addr;      /* Remote IP Address structure */    unsigned short    locPort;    unsigned short    remPort;     /* Validate Pointer to TCP Table Entry structure and operation  */     if (pReqTcpConnEntry == NULL ||        pReqTcpConnEntry->tcpConnState != M2TCP_DELETETCB)	{	errnoSet (S_m2Lib_INVALID_PARAMETER);        return (ERROR);	}     /* Look for the Internet Control Block which maps to the TCP Entry */    locPort         = pReqTcpConnEntry->tcpConnLocalPort;    remPort         = pReqTcpConnEntry->tcpConnRemPort;     loc_addr.s_addr = htonl(pReqTcpConnEntry->tcpConnLocalAddress);    locPort         = htons(locPort);    rem_addr.s_addr = htonl(pReqTcpConnEntry->tcpConnRemAddress);    remPort         = htons(remPort);     netLock = splnet ();        /* Get exclusive access to Network Code */     if ((pInp = in_pcblookup (&tcbinfo, rem_addr,		      remPort, loc_addr, locPort, 0)) == NULL)        {        splx (netLock);         /* Give up exclusive access to Network Code */	errnoSet (S_m2Lib_ENTRY_NOT_FOUND);        return (ERROR);		/* Entry not found */        }     splx (netLock);             /* Give up exclusive access to Network Code */     /* Look for the FD to issue close in the File Descriptor Table */     for (fdToClose = 0; fdToClose < maxFiles ; fdToClose++)        {#ifdef _WRS_VXWORKS_5_X            if (fdTable [fdToClose].value == (int) pInp->inp_socket)#else            if (fdTable [fdToClose] &&                fdTable [fdToClose]->value == (int) pInp->inp_socket)#endif /* _WRS_VXWORKS_5_X */                            break;        }     if (fdToClose >= maxFiles)	{	errnoSet (S_m2Lib_TCPCONN_FD_NOT_FOUND);        return (ERROR);	}     /* Issue Close */    fdToClose = STD_FIX(fdToClose);     return (close (fdToClose));    }/********************************************************************************* m2TcpDelete - delete all resources used to access the TCP group** This routine frees all the resources allocated at the time the group was* initialized.  The TCP group should not be accessed after this routine has been* called.** RETURNS: OK, always.** SEE ALSO: * m2TcpInit(), m2TcpGroupInfoGet(), m2TcpConnEntryGet(), m2TcpConnEntrySet() */STATUS m2TcpDelete (void)    {    return (OK);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区黄色| 爽爽淫人综合网网站| 欧美天天综合网| 国产曰批免费观看久久久| 亚洲精品成人在线| 国产亚洲一区字幕| 5月丁香婷婷综合| 一本色道久久综合亚洲精品按摩| 一区二区在线观看视频| 欧美电视剧在线看免费| 在线观看一区二区视频| 国产suv精品一区二区三区| 午夜视黄欧洲亚洲| 一区二区三区四区视频精品免费 | 国产欧美一二三区| 欧美一区二区三区爱爱| 色欲综合视频天天天| 精品一二线国产| 麻豆久久一区二区| 日韩在线a电影| 亚洲国产精品一区二区久久恐怖片| 国产亚洲精品超碰| 精品国产伦一区二区三区观看体验| 日本精品视频一区二区| 99精品视频在线观看| 国产成人精品一区二区三区网站观看| 亚洲码国产岛国毛片在线| 国产三级欧美三级日产三级99| 欧美三区免费完整视频在线观看| 成人听书哪个软件好| 国产一区二区导航在线播放| 免费在线观看精品| 日韩电影免费在线看| 五月综合激情网| 丝袜美腿高跟呻吟高潮一区| 亚洲成人tv网| 天天综合天天综合色| 香蕉久久夜色精品国产使用方法| 日韩理论在线观看| 亚洲另类在线制服丝袜| 亚洲欧美一区二区在线观看| 国产精品美日韩| 亚洲视频一区二区在线观看| 国产精品乱码一区二三区小蝌蚪| 久久先锋资源网| 久久精子c满五个校花| 久久影音资源网| 欧美国产精品中文字幕| 国产精品不卡一区| 伊人一区二区三区| 天涯成人国产亚洲精品一区av| 亚洲午夜激情网站| 日韩和欧美一区二区| 七七婷婷婷婷精品国产| 久久成人羞羞网站| 国产福利一区二区三区视频| 福利电影一区二区| 91美女在线看| 欧美视频在线一区二区三区 | 色婷婷久久综合| 欧美性受极品xxxx喷水| 91精品国产综合久久久蜜臀图片| 日韩一区二区免费视频| 国产色爱av资源综合区| 亚洲欧美另类图片小说| 亚洲一本大道在线| 麻豆成人av在线| 成人免费的视频| 欧美日韩你懂得| 久久综合五月天婷婷伊人| 国产精品久久久久久一区二区三区| 国产女人水真多18毛片18精品视频 | 国产精品成人在线观看| 亚洲精品高清在线| 久久99精品国产麻豆婷婷| 激情综合网最新| 91免费观看视频| 日韩午夜电影av| 国产精品国产a| 五月天网站亚洲| 国产福利91精品| 欧美亚洲国产一区二区三区va| 欧美人与性动xxxx| 国产欧美一区二区精品久导航 | 中文字幕一区三区| 亚洲国产视频直播| 丁香五精品蜜臀久久久久99网站 | 久久精品国产精品亚洲综合| av在线播放不卡| 日韩一卡二卡三卡| 亚洲色图制服诱惑| 国产综合一区二区| 91久久精品国产91性色tv| 2024国产精品| 五月天精品一区二区三区| 成人免费视频视频| 日韩一区二区免费高清| 一区二区三区精品视频在线| 国产毛片一区二区| 欧美va亚洲va香蕉在线| 亚洲美女一区二区三区| 激情六月婷婷久久| 欧美精品久久一区| 亚洲人xxxx| 国产精品亚洲成人| 日韩美女在线视频| 亚洲444eee在线观看| av不卡一区二区三区| 精品盗摄一区二区三区| 日韩精品亚洲一区| 色94色欧美sute亚洲线路一ni | 亚洲色图欧美激情| 国产黑丝在线一区二区三区| 欧美人动与zoxxxx乱| 亚洲精品乱码久久久久| www.色精品| 国产精品人成在线观看免费| 精品一区二区在线观看| 欧美一区二区三区四区久久| 亚洲在线视频免费观看| 成人v精品蜜桃久久一区| 久久人人超碰精品| 九九热在线视频观看这里只有精品| 色一情一乱一乱一91av| 国产精品第一页第二页第三页| 久久精品国产色蜜蜜麻豆| 91精品欧美福利在线观看| 亚洲一二三四久久| 欧洲生活片亚洲生活在线观看| 国产欧美一区二区三区在线看蜜臀 | 日韩高清一区二区| 欧美午夜电影网| 亚洲一区二区欧美日韩| 91成人网在线| 亚洲国产精品一区二区尤物区| 国产91色综合久久免费分享| 久久久久久97三级| 成人黄页在线观看| 国产精品看片你懂得| 99在线精品免费| 一区二区三区不卡视频 | 成人免费视频app| 国产精品丝袜在线| 99国产精品久| 亚洲一二三区在线观看| 欧美专区日韩专区| 日韩成人精品在线| 精品美女在线播放| 国产成人在线视频网址| 国产精品久久久一本精品| 91一区在线观看| 亚洲第一激情av| 日韩欧美一区在线观看| 国产一区二区电影| 亚洲人一二三区| 欧美高清视频一二三区 | 亚洲裸体xxx| 欧美日韩亚洲综合一区二区三区| 伊人夜夜躁av伊人久久| 欧美高清视频不卡网| 激情都市一区二区| 亚洲特黄一级片| 欧美日韩激情一区二区| 另类小说色综合网站| 国产网红主播福利一区二区| 91伊人久久大香线蕉| 日欧美一区二区| 久久精品亚洲精品国产欧美| 不卡一区二区中文字幕| 视频一区在线视频| 国产欧美视频在线观看| 在线观看成人小视频| 久久国内精品自在自线400部| 久久久电影一区二区三区| 一本一本大道香蕉久在线精品| 亚洲永久精品大片| 精品捆绑美女sm三区| 成人免费看片app下载| 亚洲丶国产丶欧美一区二区三区| 欧美mv日韩mv国产网站app| 成人aaaa免费全部观看| 日韩电影免费在线看| 国产精品久久国产精麻豆99网站 | proumb性欧美在线观看| 午夜精品福利在线| 国产女主播在线一区二区| 欧美日韩高清影院| 波波电影院一区二区三区| 日韩成人免费电影| 亚洲男人的天堂av| 久久一夜天堂av一区二区三区| 一道本成人在线| 粉嫩久久99精品久久久久久夜| 亚洲高清免费视频| 国产精品国产馆在线真实露脸 | 国产精品色在线观看| 51午夜精品国产| 色噜噜狠狠成人中文综合| 国产精品一区二区在线看| 日韩电影在线免费看|