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

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

?? mbuflib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
    if (mbufSeg == NULL)			/* use head if mbuf NULL */	mbufSeg = mbufId->mbufHead;    while ((mbufNext = mbufSeg->m_next) != NULL)	/* join */	{        if (!(M_HASCL(mbufSeg)) || !(M_HASCL(mbufNext)))	    break;				/* must be clusters */	if ((mtod (mbufSeg, int) + mbufSeg->m_len) != (mtod (mbufNext, int)))	    break;				/* data must be adjacent */        /* check that mbuf params are the exact same */        if ((mbufSeg->m_type		!= mbufNext->m_type) ||           (mbufSeg->m_flags		!= mbufNext->m_flags) ||           (mbufSeg->m_extBuf		!= mbufNext->m_extBuf) ||           (mbufSeg->m_extRefCnt	!= mbufNext->m_extRefCnt) ||           (mbufSeg->m_extFreeRtn	!= mbufNext->m_extFreeRtn) ||           (mbufSeg->m_extArg1		!= mbufNext->m_extArg1) ||           (mbufSeg->m_extArg2		!= mbufNext->m_extArg2) ||           (mbufSeg->m_extArg3		!= mbufNext->m_extArg3) ||           (mbufSeg->m_extSize		!= mbufNext->m_extSize))	    break;        mbufSeg->m_len += mbufNext->m_len;	/* join */        mbufSeg->m_next = m_free (mbufNext);	/* bump */        status = OK;	}    return (status);    }#endif	/* FALSE *//********************************************************************************* _mbufSegFindPrev - find the mbuf prev to a specified byte location** This routine finds the mbuf in <mbufId> that is previous to the byte* location specified by <mbufSeg> and <pOffset>.  Once found, a pointer* to the m_next pointer of that mbuf is returned by this routine,* and the offset to the specified location is returned in <pOffset>. ** This routine is similar to _mbufSegFind(), except that a pointer to the* previous mbuf's m_next is returned by this routine, instead of the mbuf* itself.  Additionally, the end boundary case differs.  This routine will* return a valid pointer and offset when the specified byte is the byte just* past the end of the chain.  Return values for this "imaginary" byte* will also be returned when an offset of MBUF_END is passed in.** RETURNS:* A pointer to the m_next pointer of the mbuf previous to the mbuf associated* with the mbuf containing the specified byte, or NULL if the operation failed.** NOMANUAL*/LOCAL MBUF_SEG * _mbufSegFindPrev    (    MBUF_ID		mbufId,		/* mbuf	ID to examine */    MBUF_SEG		mbufSeg,	/* mbuf base for <pOffset> */    int * 		pOffset		/* relative byte offset */    )    {    MBUF_SEG *		pMbufPrev;		/* prev ptr for return */    MBUF_SEG		mbuf;			/* mbuf in chain */    int			offset;			/* offset in bytes */    int 		length;			/* length counter */    if (mbufId == NULL	|| mbufId->type != MBUF_VALID)		/* invalid ID ? */	{	errno = S_mbufLib_ID_INVALID;	return (NULL);	}    pMbufPrev = &mbufId->mbufHead;		/* init prev ptr to head */    if ((mbuf = mbufId->mbufHead) == NULL)	/* is this chain empty ? */	{	if ((mbufSeg == NULL) && (*pOffset == 0))/* empty mbuf ID ? */	    return (pMbufPrev);			/* OK, if explicit */        else					/* else error condition */	    {	    errno = S_mbufLib_ID_EMPTY;	    return (NULL);	    }	}    if ((offset = *pOffset) == MBUF_BEGIN)	/* shortcut to head of chain */	{	*pOffset = 0;	return (pMbufPrev);	}    else if (offset == MBUF_END)		/* shortcut to end of chain */	{        if (mbufSeg != NULL)	    mbuf = mbufSeg;			/* set base as <mbufSeg> */        for (; mbuf->m_next != NULL; mbuf = mbuf->m_next)	    ;					/* find last mbuf in chain */        *pOffset = 0;				/* imaginary byte past mbuf */        return (&mbuf->m_next);	}    else if (offset < 0)			/* counting backwards ? */	{        if ((mbufSeg == NULL) || (mbufSeg == mbufId->mbufHead))	    {	    errno = S_mbufLib_OFFSET_INVALID;	    return (NULL);			/* offset before head */	    }        for (length = 0; (mbuf->m_next != NULL) && (mbuf->m_next != mbufSeg);	    mbuf = mbuf->m_next)	    {	    length += mbuf->m_len;		/* find length up to base */	    pMbufPrev = &mbuf->m_next;	    }        if (mbuf->m_next == NULL)	    {	    errno = S_mbufLib_SEGMENT_NOT_FOUND;	    return (NULL);			/* couldn't find base mbufSeg */	    }        if (-(offset) < mbuf->m_len)		/* within one mbuf */	    {	    *pOffset += mbuf->m_len;	    return (pMbufPrev);	    }	if ((offset += length + mbuf->m_len) < 0)/* adjust to positive */	    {	    errno = S_mbufLib_OFFSET_INVALID;	    return (NULL);	    }        mbuf = mbufId->mbufHead;        pMbufPrev = &mbufId->mbufHead;		/* init prev ptr to head */	}    else if ((mbufSeg != NULL) && (mbufSeg != mbuf))/* new base, init head */        {	if (offset < mbufSeg->m_len)		/* dest within this base ? */	    {	    if ((mbuf = _mbufSegPrev (mbufId, mbufSeg)) != NULL)	        return (&mbuf->m_next);		/* located previous mbuf */            else	        return (NULL);	    }	mbuf = mbufSeg;				/* set base as <mbufSeg> */	}    for (; (mbuf != NULL) && (offset >= mbuf->m_len); mbuf = mbuf->m_next)	{        offset -= mbuf->m_len;			/* find right mbuf in chain */	pMbufPrev = &mbuf->m_next;	}     if ((mbuf == NULL) && (offset != 0))	{	errno = S_mbufLib_OFFSET_INVALID;	return (NULL);				/* too large offset */	}    *pOffset = offset;				/* return new offset */    return (pMbufPrev);				/* return found mbuf */    }/********************************************************************************* _mbufSegFind - find the mbuf containing a specified byte location** This routine finds the mbuf in <mbufId> that contains the byte location* specified by <mbufSeg> and <pOffset>.  Once found, the mbuf is returned* by this routine, and the offset to the specified location is returned* in <pOffset>. ** <mbufSeg> determines the base from which <pOffset> is counted.* If <mbufSeg> is NULL, then <pOffset> starts from the beginning of <mbufId>.* If <mbufSeg> is not NULL, then <pOffset> starts relative to that* mbuf.  Byte locations after <mbufSeg> would be specified with a* positive offset, whereas locations previous to <mbufSeg> would be* accessed with a negative offset.** <pOffset> is a pointer to a byte offset into the mbuf chain, with offset 0* being the first byte of data in the mbuf.  The offset does not reset* for each mbuf in the chain when counting through <mbufId>.  For example,* if offset 100 is the last byte in a particular mbuf, offset 101 will be* the first byte in the next mbuf.  Also, the offset may be a negative value.* An offset of -1 locates the last byte in the previous mbuf.  If offset -55* is the first byte in a mbuf, an offset -56 would be the last byte in the* preceding mbuf.** The last byte in the mbuf chain may be specified by passing in an offset of* MBUF_END, which would cause this routine to return the last mbuf* in the chain, and return an offset to the last byte in that mbuf.* Likewise, an offset of MBUF_BEGIN may be passed in to specify the* first byte in the chain, causing the routine to return the first mbuf* in the chain, and return an offset of 0.** If the <mbufSeg>, <pOffset> pair specify a byte location past the end* of the chain, or before the first byte in the chain, NULL is returned by* this routine.** RETURNS:* An mbuf pointer associated with the mbuf containing the specified byte,* or NULL if the operation failed.** NOMANUAL*/MBUF_SEG _mbufSegFind    (    MBUF_ID		mbufId,		/* mbuf	ID to examine */    MBUF_SEG		mbufSeg,	/* mbuf base for <pOffset> */    int * 		pOffset		/* relative byte offset */    )    {    MBUF_SEG		mbuf;			/* mbuf in chain */    int			offset;			/* offset in bytes */    int 		length;			/* length counter */    if (mbufId == NULL	|| mbufId->type != MBUF_VALID)		/* invalid ID ? */	{	errno = S_mbufLib_ID_INVALID;	return (NULL);	}    if ((mbuf = mbufId->mbufHead) == NULL)	/* is this chain empty ? */	{	errno = S_mbufLib_ID_EMPTY;	return (NULL);	}    if ((offset = *pOffset) == MBUF_BEGIN)	/* shortcut to head of chain */	{	*pOffset = 0;	return (mbuf);	}    else if (offset == MBUF_END)		/* shortcut to end of chain */	{        if (mbufSeg != NULL)	    mbuf = mbufSeg;			/* set base as <mbufSeg> */        for (; mbuf->m_next != NULL; mbuf = mbuf->m_next)	    ;					/* find last mbuf in chain */        *pOffset = mbuf->m_len - 1;		/* stuff new offset */        return (mbuf);	}    else if (offset < 0)			/* counting backwards ? */	{        if ((mbufSeg == NULL) || (mbufSeg == mbufId->mbufHead))	    {	    errno = S_mbufLib_OFFSET_INVALID;	    return (NULL);			/* offset before head */	    }        for (length = 0; (mbuf->m_next != NULL) && (mbuf->m_next != mbufSeg);	    mbuf = mbuf->m_next)	    length += mbuf->m_len;		/* find length up to base */        if (mbuf->m_next == NULL)	    {	    errno = S_mbufLib_SEGMENT_NOT_FOUND;	    return (NULL);			/* couldn't find base mbufSeg */	    }        if (-(offset) < mbuf->m_len)		/* within one mbuf */	    {	    *pOffset += mbuf->m_len;	    return (mbuf);	    }	if ((offset += length + mbuf->m_len) < 0)/* adjust to positive */	    {	    errno = S_mbufLib_OFFSET_INVALID;	    return (NULL);	    }        mbuf = mbufId->mbufHead;	}    else if (mbufSeg != NULL)	mbuf = mbufSeg;				/* set base as <mbufSeg> */    for (; (mbuf != NULL) && (offset >= mbuf->m_len); mbuf = mbuf->m_next)        offset -= mbuf->m_len;			/* find right mbuf in chain */     if (mbuf == NULL)        errno = S_mbufLib_OFFSET_INVALID;    else        *pOffset = offset;			/* return new offset */    return (mbuf);				/* return found mbuf */    }/********************************************************************************* _mbufSegNext - get the next mbuf in an mbuf chain** This routine finds the mbuf in <mbufId> that is just after the* mbuf <mbufSeg>.  If <mbufSeg> is NULL, the mbuf after the first* mbuf in <mbufId> is returned.	 If <mbufSeg> is the last mbuf in* <mbufId>, NULL is returned** RETURNS:* An mbuf pointer associated with the mbuf after <mbufSeg>, * or NULL if the operation failed.** NOMANUAL*/MBUF_SEG _mbufSegNext    (    MBUF_ID		mbufId,		/* mbuf ID to examine */    MBUF_SEG		mbufSeg		/* mbuf to get next mbuf */    )    {    if (mbufId == NULL	|| mbufId->type != MBUF_VALID)		/* invalid ID ? */	{	errno = S_mbufLib_ID_INVALID;	return (NULL);	}    if (mbufId->mbufHead == NULL)		/* is this chain empty ? */	{	errno = S_mbufLib_ID_EMPTY;	return (NULL);	}    /* get mbuf after <mbufSeg> (or start of chain if <mbufSeg> is NULL) */    if (mbufSeg == NULL)        return (mbufId->mbufHead->m_next);    else        return (mbufSeg->m_next);    }/********************************************************************************* _mbufSegPrev - get the previous mbuf in an mbuf chain** This routine finds the mbuf in <mbufId> that is just previous* to the mbuf <mbufSeg>.  If <mbufSeg> is NULL, or is the first* mbuf in <mbufId>, NULL will be returned.** RETURNS:* An mbuf pointer associated with the mbuf previous to <mbufSeg>,* or NULL if the operation failed.** NOMANUAL*/MBUF_SEG _mbufSegPrev    (    MBUF_ID		mbufId,		/* mbuf ID to examine */    MBUF_SEG		mbufSeg		/* mbuf to get previous mbuf */    )    {    MBUF_SEG		mbuf = mbufId->mbufHead;/* mbuf in chain */    if (mbufId == NULL ||	mbufId->type != MBUF_VALID)		/* invalid ID ? */	{	errno = S_mbufLib_ID_INVALID;	return (NULL);	}    if ((mbufSeg == NULL) || (mbufSeg == mbuf))	return (NULL);				/* no previous to first mbuf */    /*     * Find <mbufSeg> and return a pointer to the previous mbuf.     * Note: OK if <mbufSeg> is not found... the return will be NULL anyway.     */    for (; (mbuf != NULL) && (mbuf->m_next != mbufSeg); mbuf = mbuf->m_next)	;    if (mbuf == NULL)				/* could not find mbufSeg */	errno = S_mbufLib_SEGMENT_NOT_FOUND;    return (mbuf);    }/********************************************************************************* _mbufSegData - determine the location of data in an mbuf** This routine returns the location of the first byte of data in the mbuf* <mbufSeg>.  If <mbufSeg> is NULL, the location of data in the first mbuf* in <mbufId> is returned.** RETURNS:* A pointer to the first byte of data in the specified mbuf,* or NULL if the mbuf chain is empty.** NOMANUAL*/caddr_t _mbufSegData    (    MBUF_ID		mbufId,		/* mbuf ID to examine  */    MBUF_SEG		mbufSeg		/* mbuf to get pointer to data */    )    {    if (mbufId == NULL 	|| mbufId->type != MBUF_VALID)		/* invalid ID ? */	{	errno = S_mbufLib_ID_INVALID;	return (NULL);	}    if (mbufId->mbufHead == NULL)		/* is this chain empty ? */	{	errno = S_mbufLib_ID_EMPTY;	return (NULL);	}    /* get data location <mbufSeg> (or start of chain if <mbufSeg> is NULL) */    if (mbufSeg == NULL)        return (mtod (mbufId->mbufHead, caddr_t));    else        return (mtod (mbufSeg, caddr_t));    }/********************************************************************************* _mbufSegLength - determine the length of an mbuf** This routine returns the number of bytes in the mbuf <mbufSeg>.   * If <mbufSeg> is NULL, the length of the first mbuf in <mbufId> is* returned. ** RETURNS:* The number of bytes in the specified mbuf, or ERROR if incorrect parameters.** NOMANUAL*/int _mbufSegLength    (    MBUF_ID		mbufId,		/* mbuf ID to examine  */    MBUF_SEG		mbufSeg		/* mbuf to determine length of */    )    {    if (mbufId == NULL 	|| mbufId->type != MBUF_VALID)		/* invalid ID ? */	{	errno = S_mbufLib_ID_INVALID;	return (ERROR);	}    if (mbufId->mbufHead == NULL)		/* is this chain empty ? */	{	if (mbufSeg == NULL)			/* empty mbuf chain */	    return (0);	errno = S_mbufLib_SEGMENT_NOT_FOUND;	return (ERROR);        }    /* get length of <mbufSeg> (or start of chain if <mbufSeg> is NULL) */    if (mbufSeg == NULL)	return (mbufId->mbufHead->m_len);    else        return (mbufSeg->m_len);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品亚洲国产奇米99| 丁香婷婷综合激情五月色| 欧美日韩精品免费观看视频| 夜夜夜精品看看| 色94色欧美sute亚洲13| 一区二区三区高清| 精品视频999| 日本网站在线观看一区二区三区| 5566中文字幕一区二区电影| 日韩黄色小视频| 日韩午夜激情视频| 国产乱码精品一品二品| 欧美国产精品专区| 色婷婷综合久色| 日韩精品乱码免费| 久久精品夜色噜噜亚洲a∨ | 视频一区在线播放| 欧美一卡二卡在线| 国产伦精一区二区三区| 国产精品久久久久久妇女6080| 91在线免费看| 三级精品在线观看| 国产无遮挡一区二区三区毛片日本| 成人国产一区二区三区精品| 午夜精彩视频在线观看不卡| 日韩精品资源二区在线| 高清不卡一二三区| 亚洲444eee在线观看| 2024国产精品视频| 欧美最猛性xxxxx直播| 日韩国产在线观看一区| 久久精品视频网| 在线观看亚洲精品| 国产一区二区伦理片| 亚洲黄色在线视频| 精品日本一线二线三线不卡| 91视视频在线观看入口直接观看www| 日韩高清在线观看| 亚洲美女电影在线| 久久九九全国免费| 欧美丰满嫩嫩电影| av男人天堂一区| 美女www一区二区| 亚洲精品成a人| 久久久久久久久久久久久女国产乱| 91高清在线观看| 国产不卡视频在线观看| 日本伊人色综合网| 一区二区三区四区视频精品免费 | 欧美疯狂做受xxxx富婆| 成人精品视频一区二区三区 | 一区二区免费在线播放| 国产亚洲精品资源在线26u| 欧美日韩国产高清一区二区三区| fc2成人免费人成在线观看播放| 老司机午夜精品| 天堂一区二区在线免费观看| 亚洲欧美电影院| 国产精品美女久久久久高潮| 日韩精品一区二区三区三区免费| 精品视频一区二区三区免费| 色婷婷久久99综合精品jk白丝| 国产精品一区免费在线观看| 秋霞av亚洲一区二区三| 亚洲国产综合人成综合网站| 1000部国产精品成人观看| 国产色爱av资源综合区| 亚洲精品一区二区三区99| 欧美日韩一区二区三区免费看| 色婷婷久久久久swag精品| 99re视频精品| caoporm超碰国产精品| 国产69精品一区二区亚洲孕妇| 国产综合久久久久影院| 国精产品一区一区三区mba视频 | 国产精品久久国产精麻豆99网站| 国产网站一区二区| 91精品国产综合久久久蜜臀粉嫩| 欧美性感一区二区三区| 欧美在线视频不卡| 欧美性大战xxxxx久久久| 色999日韩国产欧美一区二区| 91黄色激情网站| 欧美性极品少妇| 4438x亚洲最大成人网| 欧美肥胖老妇做爰| 91精品国产综合久久精品 | 精品国产欧美一区二区| 欧美第一区第二区| 久久精品一区二区三区四区| 亚洲国产精品二十页| 亚洲视频免费观看| 亚洲成人在线网站| 久久精品99国产精品| 国产经典欧美精品| 成人avav在线| 欧美日韩综合不卡| 精品久久五月天| 中文一区在线播放| 亚洲精品成人在线| 日本欧美一区二区三区| 国产原创一区二区| 色悠久久久久综合欧美99| 欧美日韩视频一区二区| 久久亚洲私人国产精品va媚药| 国产精品色哟哟| 亚洲午夜视频在线观看| 激情文学综合插| 99久久国产综合精品女不卡| 欧美色偷偷大香| 国产区在线观看成人精品| 一区二区三区精品在线| 蜜臀a∨国产成人精品| av中文一区二区三区| 欧美日韩国产综合一区二区三区| 精品国产免费人成电影在线观看四季 | 麻豆国产精品视频| 成人av在线网| 91精品国产欧美一区二区成人 | 日韩美女视频19| 日韩国产欧美视频| 成人激情免费网站| 日韩欧美自拍偷拍| 日韩伦理电影网| 国产一区二区三区国产| 色香色香欲天天天影视综合网| 欧美一区二区三区电影| 日韩理论片一区二区| 久久精品国产一区二区三| 色综合激情五月| 久久久国产精华| 香蕉成人啪国产精品视频综合网 | 欧美国产视频在线| 青青草国产精品亚洲专区无| 99久久久免费精品国产一区二区| 在线成人午夜影院| 日韩一区在线播放| 激情av综合网| 欧美日韩久久久久久| 亚洲日本在线观看| 成人在线视频一区| 久久影院电视剧免费观看| 亚洲成人精品一区二区| 国产成人午夜精品5599| 91精品国产综合久久久久久| 亚洲精品日产精品乱码不卡| 国产91精品一区二区麻豆网站 | 国产99久久久国产精品潘金| 91精品国产色综合久久不卡蜜臀 | 久久嫩草精品久久久久| 日韩黄色小视频| 欧美色手机在线观看| 亚洲手机成人高清视频| 成人国产亚洲欧美成人综合网| 久久久久久久久久看片| 国内精品不卡在线| 精品捆绑美女sm三区| 免费的成人av| 宅男在线国产精品| 亚洲不卡在线观看| 欧美日韩精品系列| 水蜜桃久久夜色精品一区的特点| 欧美色图天堂网| 亚洲不卡在线观看| 91精品国产综合久久婷婷香蕉| 五月婷婷综合激情| 在线不卡中文字幕播放| 天堂va蜜桃一区二区三区漫画版| 欧美影院一区二区三区| 午夜私人影院久久久久| 6080亚洲精品一区二区| 亚洲va国产va欧美va观看| 欧美日韩在线免费视频| 亚州成人在线电影| 欧美一区二区在线观看| 捆绑紧缚一区二区三区视频| 精品久久人人做人人爽| 久久99久久99小草精品免视看| 精品成人一区二区三区四区| 久久国产视频网| 日韩欧美国产精品| 国产麻豆日韩欧美久久| 国产精品污www在线观看| jiyouzz国产精品久久| 自拍偷拍欧美激情| 欧美性生交片4| 蜜桃久久精品一区二区| 日韩一级视频免费观看在线| 麻豆精品国产传媒mv男同| 久久女同精品一区二区| 99视频一区二区| 午夜精品福利在线| 精品免费日韩av| 国产91精品精华液一区二区三区| 最新久久zyz资源站| 欧美亚洲综合色| 精品在线播放免费| 亚洲视频香蕉人妖| 日韩一区二区三区电影在线观看| 激情小说亚洲一区|