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

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

?? rpccksum.c

?? vxworks的源代碼
?? C
字號:
/* rpcCksum.c - xdr checksum filter for UDP trame *//* Copyright 1995-1998 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01d,22jan98,c_c  Removed EXT_FUNC references.01c,15jan96,elp added windll.h to see external function macros		WIN32 DLL external functions are called through pointers.01b,21jun95,tpr changed code inside xdrCksum().01a,12jun95,tpr	created.*//*DESCRIPTIONThis XDR filter either computes the XDR stream checksun and put thisvalue inside the stream or checks that the xdr stream checksum match thechecksum inside the stream.*//* includes */#include <rpc/rpc.h>#include "wdbP.h"#ifdef HOST#include "wpwrutil.h"#endif	/* HOST *//* defines */#define WDB_CKSUM_FLAG	0xffff0000#define WDB_XDR_STREAM_MAX_SIZE	0x1000/* statics */LOCAL BOOL	xdr_wdb_cksum_enabled = TRUE;/******************************************************************************** xdrCksum - returns the ones compliment checksum of some memory.** NOMANUAL*/UINT32 xdrCksum    (    unsigned short *	pAddr,			/* start of buffer */    int			len			/* size of buffer in bytes */    )    {    UINT32	sum = 0;    BOOL	swap = FALSE;    /* take care of unaligned buffer address */    if ((UINT32)pAddr & 0x1)	{	sum += *((unsigned char *) pAddr);	pAddr = (unsigned short *)(((unsigned char *)pAddr) + 1);	len--;	swap = TRUE;	}    /* evaluate checksum */    while (len > 1)	{	sum += * (pAddr ++);	len -= 2;	}    /* take care of last byte */    if (len > 0)	sum = sum + ((*(unsigned char *) pAddr) << 8);    /* fold to 16 bits */    sum = (sum & 0xffff) + (sum >> 16);    sum = (sum & 0xffff) + (sum >> 16);    /* swap if we started on unaligned address */    if (swap)	sum = ((sum & 0x00ff) << 8) | ((sum & 0xff00) >> 8);    return (~sum);    }/********************************************************************************* xdr_CHECKSUM - checksum an XDR stream** When data are encoded in the XDR stream, this function computes the* checksum of the XDR stream pointer to by <xdr>. The checksum is performed* between the start point of the XDR stream and the current position in the* stream. The XDR stream size and checksum value are placed in the stream* at the <xdrStreamSizePos> and <xdrCksumValPos> position.** When data are decoded from the stream, the filter verifies that the stream* checksum value match the checkum value inside the stream. One of the checksum* feature is when the checksum value of a buffer is included inside this buffer,* its checksum value is equal to zero. This feature is used by this function* to check if checksum values are equal.** RETURN: TRUE no error was detected otherwise FALSE.*/BOOL xdr_CHECKSUM    (    XDR *	xdrs,			/* xdr to compute/check the checksum */    UINT32	xdrCksumVal,		/* xdr stream checksum value */    UINT32	xdrStreamSize,		/* xdr stream size */    UINT32	xdrCksumValPos,		/* checksum value inside the steam */    UINT32	xdrStreamSizePos	/* stream size inside the xdr steam */    )    {    long *		xdrStreamAddr;	/* xdr stream buffer address */    u_int		xdrStreamPos;	/* xdr strean current position */    u_int		cksum = 0x00;  	/* checksum() return value */    switch (xdrs->x_op)	{	case XDR_ENCODE:	    /* return if the xdr stream checksum capability is not enabled */	    if (!xdr_wdb_cksum_enabled)		return (TRUE);	    /* save the current position in the xdr stream */	    xdrStreamPos = XDR_GETPOS (xdrs);	    /* get the xdr stream address */	    if ((xdrStreamAddr = xdr_inline (xdrs, 0)) == NULL)		return (FALSE);	    /* compute the xdr stream start address */	    xdrStreamAddr = (long *) ((char *) xdrStreamAddr - xdrStreamPos +	    					sizeof (UINT32));	    /* set the current position at the xdr stream size value */	    if (!XDR_SETPOS (xdrs, xdrStreamSizePos))		return (FALSE);	    /* compute the XDR stream size */	    xdrStreamSize = xdrStreamPos - sizeof (UINT32);	    /* save the xdr stream size into the xdr stream */	    if (!xdr_UINT32 (xdrs, &xdrStreamSize))		return (FALSE);	    /* checksum the xdr stream */	    cksum = (u_int) xdrCksum ((unsigned short *) xdrStreamAddr,								xdrStreamSize);	    cksum = htons (cksum);	    /* set the flag to signal the xdr stream checksum is available */	    cksum |= WDB_CKSUM_FLAG;	    /* set the current position at the xdr stream checksum value */	    if (!XDR_SETPOS (xdrs, xdrCksumValPos))		return (FALSE);	    /* put the xdr stream checksum value in the xdr steam */	    if (!xdr_UINT32 (xdrs, &cksum))		return (FALSE);	    /* restore the current position in the xdr stream */	    if (!XDR_SETPOS (xdrs, xdrStreamPos))		return (FALSE);            break;	case XDR_DECODE:	    if (!xdr_wdb_cksum_enabled) 		{	        /* 	         * if the xdr stream checksum capability is desabled and the	         * checksum is performed on the reveiced stream then turn on	         * the checksum capability and control checkum coherency.	         */		if (xdrCksumVal & WDB_CKSUM_FLAG)		    xdr_wdb_cksum_enabled = TRUE;		else 		    return (TRUE);		}	    else 		if (!(xdrCksumVal & WDB_CKSUM_FLAG))		    {		    /*		     * Turn off checksum capability because the reveiced		     * stream is sent without its checksum.		     */#ifdef	HOST		    wpwrLogWarn ("The agent doesn't provide XDR stream checksum\n");#endif		    xdr_wdb_cksum_enabled = FALSE;		    return (TRUE);		    }	    /* save the current position in the xdr stream */	    xdrStreamPos = XDR_GETPOS (xdrs);	    /* get the xdr stream address */	    if ((xdrStreamAddr = xdr_inline (xdrs, 0)) == NULL)		return (FALSE);	    /* compute the xdr stream start address */	    xdrStreamAddr = (long *) ((char *) xdrStreamAddr - xdrStreamPos +						sizeof (UINT32));	    /*	     * check the xdr stream size is not too big. The size	     * field may be corrupted.	     */	    if (WDB_XDR_STREAM_MAX_SIZE < xdrStreamSize)		return (FALSE);	    /* checksum the xdr stream */	    cksum = (u_int) xdrCksum ((unsigned short *) xdrStreamAddr,								xdrStreamSize);	    /* 	     * if the received stream is not corrupted its checksun value 	     * should be equal to zero because its checksum value is inside	     * the stream.	     * if checksum is different from 0 then the received stream is 	     * corrupted. So return FLASE .	     */	    if ((cksum & ~WDB_CKSUM_FLAG) != 0)		return (FALSE);            break;	default:	    break;	}     return (TRUE);     }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美不卡一区二区| 日韩欧美美女一区二区三区| 国产一区 二区| 国产精品888| 高清在线成人网| 7777精品久久久大香线蕉| 色婷婷综合久久久| 欧美日韩国产精品自在自线| 欧美精品日日鲁夜夜添| 欧美一区二区三区免费视频| 欧美本精品男人aⅴ天堂| 337p日本欧洲亚洲大胆精品| 国产色一区二区| 日本一区二区成人在线| 一区二区视频在线| 五月婷婷综合激情| 黄网站免费久久| 成人深夜在线观看| 欧美日精品一区视频| 欧美va亚洲va| 亚洲精品ww久久久久久p站| 亚洲精品中文在线观看| 视频一区二区欧美| 丁香网亚洲国际| 色先锋资源久久综合| 在线不卡的av| 自拍偷拍亚洲激情| 青青青伊人色综合久久| 99r国产精品| 日韩欧美国产综合| 成人欧美一区二区三区小说 | 日韩午夜激情av| 337p粉嫩大胆色噜噜噜噜亚洲| 国产精品国产三级国产有无不卡| 亚洲一线二线三线视频| 久久99精品国产麻豆婷婷洗澡| 99久久精品免费观看| 日韩一区二区三区av| 亚洲人吸女人奶水| 国产在线精品不卡| 欧美日本一区二区在线观看| 欧美国产丝袜视频| 日本中文字幕一区二区视频| 94-欧美-setu| 中国色在线观看另类| 日韩综合小视频| 色诱亚洲精品久久久久久| 久久免费偷拍视频| 三级久久三级久久久| 99久久婷婷国产综合精品电影| 欧美xxxx在线观看| 天天av天天翘天天综合网 | 3atv一区二区三区| 亚洲婷婷综合久久一本伊一区| 国内精品伊人久久久久影院对白| 欧美性受xxxx黑人xyx性爽| 国产精品久久影院| 成人一级视频在线观看| 久久精品人人做人人爽人人| 美女视频网站黄色亚洲| 欧美日韩高清一区二区不卡| 一区二区三区日韩精品视频| av不卡一区二区三区| 国产亚洲午夜高清国产拍精品| 久久99国产乱子伦精品免费| 日韩亚洲电影在线| 毛片av一区二区三区| 欧美一区二区在线视频| 日韩成人免费在线| 4438x成人网最大色成网站| 日韩专区欧美专区| 欧美一二三在线| 久久国产人妖系列| 日韩一区二区三区电影在线观看| 日韩精品1区2区3区| 欧美精品 国产精品| 丝袜美腿高跟呻吟高潮一区| 欧美日韩国产a| 久久成人免费电影| 欧美国产激情二区三区| 成人免费高清视频| 一区二区三区蜜桃网| 欧美三级韩国三级日本三斤| 日日夜夜精品视频天天综合网| 91精品国产乱| 精品一区二区在线看| 国产日产欧美精品一区二区三区| 国产99久久久国产精品潘金网站| 国产精品短视频| 欧美少妇性性性| 久久国产精品一区二区| 国产精品免费视频一区| 在线观看亚洲专区| 精品夜夜嗨av一区二区三区| 欧美激情在线观看视频免费| 99精品在线观看视频| 午夜欧美在线一二页| www成人在线观看| 成人免费电影视频| 爽好多水快深点欧美视频| 久久综合色一综合色88| 91在线精品秘密一区二区| 午夜精品影院在线观看| 欧美成人精品高清在线播放| 欧美性大战久久久| 日本在线播放一区二区三区| 久久九九久精品国产免费直播| 一道本成人在线| 国产在线视频精品一区| 伊人夜夜躁av伊人久久| 亚洲精品一区二区三区蜜桃下载 | 国产精品国产三级国产aⅴ原创 | 国产成人精品在线看| 一级日本不卡的影视| 久久亚洲精精品中文字幕早川悠里| 99久免费精品视频在线观看 | 国产一区二区看久久| 亚洲一区免费观看| 国产午夜精品在线观看| 这里是久久伊人| 欧美性做爰猛烈叫床潮| 国产精品888| 日本亚洲天堂网| 亚洲在线成人精品| 国产精品视频你懂的| 日韩限制级电影在线观看| 欧美午夜精品一区二区三区| 白白色亚洲国产精品| 国产精品小仙女| 国内精品久久久久影院一蜜桃| 亚洲妇女屁股眼交7| **网站欧美大片在线观看| 久久久久99精品国产片| 欧美一级精品在线| 欧美精品xxxxbbbb| 欧美日本不卡视频| 欧美日韩国产中文| 欧美三级日韩三级国产三级| 91麻豆国产香蕉久久精品| 成人免费的视频| 高清国产一区二区| 国产成人精品影视| 国产成人高清视频| 成人国产精品免费网站| 成人晚上爱看视频| fc2成人免费人成在线观看播放 | 91精品国产综合久久精品app| 99在线精品免费| 97久久精品人人爽人人爽蜜臀 | 一区二区三区成人| 亚洲欧美日韩中文播放| 亚洲欧洲www| 亚洲欧美综合色| 一区二区三区精品在线观看| 亚洲欧美怡红院| 亚洲午夜精品一区二区三区他趣| 一区二区成人在线| 日韩精品一卡二卡三卡四卡无卡| 亚洲成人动漫在线免费观看| 日韩精品电影一区亚洲| 极品尤物av久久免费看| 国产91对白在线观看九色| 成人av小说网| 欧美私人免费视频| 欧美va亚洲va香蕉在线| 亚洲无线码一区二区三区| 亚洲图片欧美色图| 久久99久久久久久久久久久| 国产在线播精品第三| 成人免费高清在线| 欧美少妇xxx| 久久蜜桃一区二区| 亚洲丝袜美腿综合| 丝袜美腿亚洲一区| 国产成a人无v码亚洲福利| 99精品国产视频| 日韩视频一区在线观看| 日本一区二区综合亚洲| 一区二区三区四区五区视频在线观看| 日韩经典一区二区| 成人精品鲁一区一区二区| 在线视频中文字幕一区二区| 91精品一区二区三区久久久久久| 久久久天堂av| 亚洲成人免费影院| 成人深夜视频在线观看| 欧美高清精品3d| 国产精品第一页第二页第三页 | 精品对白一区国产伦| 国产精品福利电影一区二区三区四区| 亚洲 欧美综合在线网络| 国产一级精品在线| 7777精品伊人久久久大香线蕉| 国产精品私人自拍| 国内精品久久久久影院薰衣草| 91国产视频在线观看| 久久久久国产精品麻豆ai换脸| 亚洲成人精品一区| 91亚洲精品久久久蜜桃网站| 日韩一级欧美一级|