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

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

?? mbuflib.c

?? vxworks的完整的源代碼
?? 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一区二区三区免费野_久草精品视频
亚洲一区二区三区影院| 精品久久99ma| 国产精品美女久久久久久久久| 亚洲免费视频中文字幕| www.亚洲人| 中文字幕在线不卡一区| 岛国精品一区二区| 日韩欧美另类在线| 国产一区二区三区四区在线观看| 5858s免费视频成人| 午夜精品久久久久久久| 欧美日韩国产一二三| 亚洲18女电影在线观看| 欧美一级黄色录像| 日韩av在线发布| 日韩欧美一级特黄在线播放| 国产一区二区伦理片| 久久亚洲捆绑美女| 国内精品写真在线观看| 欧美一区二区二区| 久久99精品久久久| 久久久亚洲午夜电影| www.激情成人| 夜夜精品视频一区二区 | 亚洲va中文字幕| 欧美男男青年gay1069videost| 日本午夜精品视频在线观看 | 国产精品久久久久永久免费观看 | 亚洲一级二级三级| 欧洲人成人精品| 青青草成人在线观看| 欧美大度的电影原声| 色综合中文字幕国产 | 大胆亚洲人体视频| 国产精品色在线观看| 在线亚洲一区观看| 午夜精品久久久久久久久久| www久久久久| 91片在线免费观看| 一区二区三区 在线观看视频| 精品少妇一区二区三区| 99视频精品全部免费在线| 亚洲网友自拍偷拍| 国产精品网友自拍| 欧美猛男男办公室激情| 国产.精品.日韩.另类.中文.在线.播放| 一区二区三区精品在线观看| 精品日韩av一区二区| 成人午夜看片网址| 国内精品久久久久影院色| 国产精品每日更新| 欧美放荡的少妇| 欧美中文字幕一区| 国产成人亚洲综合a∨猫咪| 一区二区三区四区五区视频在线观看 | 欧美日本一区二区三区四区| 国产99一区视频免费| 五月天网站亚洲| 成人免费一区二区三区在线观看| 欧美va亚洲va| 欧美日韩国产精品自在自线| 国产精品一区二区三区乱码| 奇米影视7777精品一区二区| 亚洲天堂成人网| 久久九九99视频| 色综合久久中文字幕| 精品亚洲国产成人av制服丝袜| 一区二区三区精品视频| 中文字幕乱码久久午夜不卡| 欧美电影免费观看完整版| 在线视频综合导航| 精品在线播放免费| 秋霞午夜av一区二区三区| 一级做a爱片久久| 中文字幕一区二区三区色视频 | 91视频在线观看| 国产精品影视在线| 丝袜亚洲精品中文字幕一区| 午夜欧美一区二区三区在线播放| 国产精品久久久久久福利一牛影视| 欧美久久一二三四区| 欧美日韩在线三级| 色哟哟一区二区三区| 成人av电影在线网| 99re成人精品视频| 国产69精品一区二区亚洲孕妇| 精品亚洲免费视频| 国产成人久久精品77777最新版本| 日韩成人免费在线| 日韩精品电影在线| 麻豆视频一区二区| 精品一区二区国语对白| 久久99久久精品| 国产成人精品免费看| 国产夫妻精品视频| 成人免费视频国产在线观看| 成人免费毛片高清视频| 国产v日产∨综合v精品视频| 国产成人在线免费观看| 91无套直看片红桃| 在线观看国产精品网站| 欧美色男人天堂| 精品91自产拍在线观看一区| 日韩午夜激情视频| 久久久久久久久岛国免费| 亚洲国产精品高清| 亚洲人成7777| 亚洲一区二区三区影院| 久久精品99久久久| 国产一区999| 不卡一区二区三区四区| 欧美三级欧美一级| 精品国产自在久精品国产| 久久久.com| 亚洲第一久久影院| 久久99精品久久久久久动态图 | 欧美国产欧美综合| 日韩免费一区二区| 亚洲美女视频一区| 亚洲va在线va天堂| 亚洲 欧美综合在线网络| 精品在线播放免费| 99re8在线精品视频免费播放| 色综合中文综合网| 日本美女一区二区| 不卡在线观看av| 欧美日韩国产区一| 久久久精品影视| 亚洲国产另类av| 国产精品原创巨作av| 色伊人久久综合中文字幕| 精品日韩一区二区| 亚洲最色的网站| 久久er99精品| 精品视频999| 亚洲国产精品高清| 视频一区视频二区中文字幕| 国产91精品在线观看| 欧美色涩在线第一页| 久久综合色鬼综合色| 亚洲6080在线| 成人网男人的天堂| 日韩一级片在线播放| 亚洲一区二区三区爽爽爽爽爽| 狠狠色丁香婷综合久久| 91国在线观看| 中文字幕不卡在线观看| 免费观看在线综合| 91麻豆免费看片| 国产精品欧美一区喷水| 欧美aaaaaa午夜精品| 色婷婷国产精品综合在线观看| 久久久久久免费毛片精品| 亚洲va欧美va天堂v国产综合| 福利电影一区二区| 欧美综合亚洲图片综合区| 国产精品美女www爽爽爽| 精彩视频一区二区| 欧美大黄免费观看| 日日骚欧美日韩| 一本到三区不卡视频| 国产精品私房写真福利视频| 美女精品一区二区| 欧美色视频一区| 天堂在线一区二区| 欧美性生活久久| 亚洲图片激情小说| 91最新地址在线播放| 中文字幕乱码久久午夜不卡| 精品亚洲成a人| 久久精品视频在线免费观看| 美女视频黄久久| 欧洲精品在线观看| 天堂成人国产精品一区| 91福利区一区二区三区| 久久久噜噜噜久久中文字幕色伊伊| 精品在线播放免费| www国产亚洲精品久久麻豆| 美腿丝袜亚洲综合| 日韩午夜av一区| 激情深爱一区二区| 久久久亚洲综合| 99精品视频一区二区| 亚洲香肠在线观看| 制服丝袜激情欧洲亚洲| 久久er99精品| 国产精品国产三级国产aⅴ入口 | 成人妖精视频yjsp地址| 国产精品久久久久一区二区三区 | 欧美一区二区三区四区高清| 麻豆久久久久久| 国产精品视频线看| 欧美体内she精视频| 久久99最新地址| 国产精品女同一区二区三区| 一本一本大道香蕉久在线精品 | 欧美激情一区二区三区不卡| 99国产精品久久久久| 午夜精品久久一牛影视| 久久久久久久免费视频了|