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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? zl5011xpkcclassify.c

?? Zalink50114----TDMoIP芯片驅(qū)動(dòng)源碼
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
   Uint32T address;
   Uint32T wrapAddress, bitShift;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKC_FN_ID,
         "zl5011xPkcClassifyEnableEntry: match %3d",
         matchNum, 0, 0, 0, 0, 0);

   /* check classifier entry number is in range */
   if (matchNum >= ZL5011X_PKC_NUM_CLASSIFY_ENTRIES)
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      /* disable the PW interrupt before enabling the classifier rule */
      status = zl5011xPkcSetPWInterrupt(zl5011xParams, (Uint32T)ZL5011X_INVALID_CONTEXT, matchNum,
            (ZL5011X_1BIT_MASK << ZL5011X_PKC_PW_INT_DISABLE_BIT) | ( 0xff << ZL5011X_PKC_PW_STATUS_MASK_BITS));
   }

   if (status == ZL5011X_OK)
   {
      /* mark the classifier entry as in use in the structure */
      zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyInUse = ZL5011X_TRUE;
      zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyReserved = ZL5011X_TRUE;

      /* if the match number is greater than 32, then need to increment
         the address for every multiple of 32 */
      wrapAddress = matchNum / 32;
      bitShift = matchNum % 32;

      address = ZL5011X_PKC_CLASSIFY_ENABLE + (wrapAddress * sizeof(Uint32T));

      /* set the bit to enable the classifier entry */
      status = zl5011xReadModWrite(zl5011xParams, address,
            ZL5011X_1BIT_MASK << bitShift,
            ZL5011X_1BIT_MASK << bitShift);
   }

   return status;
}

/*******************************************************************************

 Function:
    zl5011xPkcClassifyDisableEntry

 Description:
   Disables a classifier entry. The entry is marked as free, to allow it to
   be allocated again.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   matchNum       the number of the entry to disable

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

*******************************************************************************/

zlStatusE zl5011xPkcClassifyDisableEntry(zl5011xParamsS *zl5011xParams,
      Uint32T matchNum)
{
   Uint32T address;
   Uint32T wrapAddress, bitShift;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKC_FN_ID,
         "zl5011xPkcClassifyDisableEntry: match %3d",
         matchNum, 0, 0, 0, 0, 0);

   /* check classifier entry number is in range */
   if (matchNum >= ZL5011X_PKC_NUM_CLASSIFY_ENTRIES)
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      /* mark the classifier entry as unused in the structure */
      zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyInUse = ZL5011X_FALSE;

      /* if the match number is greater than 32, then need to increment
         the address for every multiple of 32 */
      wrapAddress = matchNum / 32;
      bitShift = matchNum % 32;

      address = ZL5011X_PKC_CLASSIFY_ENABLE + (wrapAddress * sizeof(Uint32T));

      /* clear the bit to disable the classifier entry */
      status = zl5011xReadModWrite(zl5011xParams, address,
            0,
            ZL5011X_1BIT_MASK << bitShift);
   }

   if (status == ZL5011X_OK)
   {
      /* disable the PW interrupt */
      status = zl5011xPkcSetPWInterrupt(zl5011xParams, (Uint32T)ZL5011X_INVALID_CONTEXT, matchNum,
            (ZL5011X_1BIT_MASK << ZL5011X_PKC_PW_INT_DISABLE_BIT) | ( 0xff << ZL5011X_PKC_PW_STATUS_MASK_BITS));
   }

   return status;
}

/*******************************************************************************

 Function:
    zl5011xPkcClassifyDeleteEntry

 Description:
   Deletes a classifier entry. The entry is marked as free, to allow it to
   be allocated again.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   matchNum       the number of the entry to delete

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

*******************************************************************************/

zlStatusE zl5011xPkcClassifyDeleteEntry(zl5011xParamsS *zl5011xParams,
      Uint32T matchNum)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKC_FN_ID,
         "zl5011xPkcClassifyDeleteEntry: match %3d",
         matchNum, 0, 0, 0, 0, 0);

   status = zl5011xPkcClassifyDisableEntry(zl5011xParams, matchNum);

   /* if the disable was okay, then free the protocol match by clearing
      the reserved flag */
   if (status == ZL5011X_OK)
   {
      zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyReserved = ZL5011X_FALSE;
   }

   return status;
}

/*******************************************************************************

 Function:
    zl5011xPkcClassifySetMatchField

 Description:
   Sets the match bytes in the classifier. There is also a mask field, that is
   used to control which of the bits in these mask bytes are compared.
   The pre-classifier determines the protocol type (1 of 8 matches in the pre
   classifier).
   Each classifier match corresponds to protocol match.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   matchNum       the number of the entry to set
   matchIndex     array of bytes to be used
   protocolNum    the protocol entry that this match corresponds to

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

*******************************************************************************/

zlStatusE zl5011xPkcClassifySetMatchField(zl5011xParamsS *zl5011xParams,
      Uint32T matchNum, Uint8T *matchIndex, Uint8T protocolNum)
{
   Uint32T tempWord[(ZL5011X_PKC_CLASSIFY_MATCH_SIZE / 4) + 1];
   Uint8T tempPos = 0;
   Uint8T index = 0;
   Uint32T address;
   Uint32T loop;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKC_FN_ID,
         "zl5011xPkcClassifySetMatchField: match %3d, protocol %d",
         matchNum, protocolNum, 0, 0, 0, 0);

   address = ZL5011X_PKC_CLASSIFY_MATCH +
         (matchNum * ZL5011X_PKC_CLASSIFY_MATCH_SIZE);

   /* assemble the classify match entries into 32 bit words and
      then write them to the device */
   for (loop = 0; loop < ZL5011X_PKC_CLASSIFY_NUM_MATCH_FIELDS; loop++)
   {
      if (status != ZL5011X_OK)
         break;

      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            matchIndex[loop], ZL5011X_PKC_CLASSIFY_SIZE_MATCH_FIELD);
   }

   /* the last field to be added is the protocol match that this classify
      entry is valid for. */
   if (status == ZL5011X_OK)
   {
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            (protocolNum*2), ZL5011X_PKC_CLASSIFY_SIZE_PROTOCOL_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xWriteAssembledBitFields(zl5011xParams, tempWord,
            index, tempPos, address);
   }

   return status;
}

/*******************************************************************************

 Function:
    zl5011xPkcClassifySetMaskField

 Description:
   Sets the masck bytes in the classifier. These are used to control which of
   the bits in the match bytes are compared.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   matchNum       the number of the entry to set
   maskIndex      array of bytes to be used for masking

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

*******************************************************************************/

zlStatusE zl5011xPkcClassifySetMaskField(zl5011xParamsS *zl5011xParams,
      Uint32T matchNum, Uint8T *maskIndex)
{
   Uint32T tempWord[(ZL5011X_PKC_CLASSIFY_MASK_SIZE / 4) + 1];
   Uint8T tempPos = 0;
   Uint8T index = 0;
   Uint32T address;
   Uint32T loop;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKC_FN_ID,
         "zl5011xPkcClassifySetMaskField: match %3d",
         matchNum, 0, 0, 0, 0, 0);

   address = ZL5011X_PKC_CLASSIFY_MASK +
         (matchNum * ZL5011X_PKC_CLASSIFY_MASK_SIZE);

   /* assemble the classify mask entries into 32 bit words and
      then write them to the device */
   for (loop = 0; loop < ZL5011X_PKC_CLASSIFY_NUM_MATCH_FIELDS; loop++)
   {
      if (status != ZL5011X_OK)
         break;

      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            maskIndex[loop], ZL5011X_PKC_CLASSIFY_SIZE_MASK_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xWriteAssembledBitFields(zl5011xParams, tempWord,
            index, tempPos, address);
   }

   return status;
}

/*******************************************************************************

 Function:
    zl5011xPkcClassifySetCheckField

 Description:
   Once a match has been determined using the match and mask fields, a check
   is performed to ensure that the match is correct. This function sets the
   check bytes. The check mask and the check bytes that are extracted from the
   header are controlled by the pre-classifier.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   matchNum       the number of the entry to disable
   checkBytes     array of bytes to be used for checking

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

*******************************************************************************/

zlStatusE zl5011xPkcClassifySetCheckField(zl5011xParamsS *zl5011xParams,
      Uint32T matchNum, Uint8T *checkBytes)
{
   Uint32T tempWord[(ZL5011X_PKC_CLASSIFY_CHECK_SIZE / 4) + 1];
   Uint8T tempPos = 0;
   Uint8T index = 0;
   Uint32T address;
   Uint32T loop;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKC_FN_ID,
         "zl5011xPkcClassifySetCheckField: match %3d",
         matchNum, 0, 0, 0, 0, 0);

   address = ZL5011X_PKC_CLASSIFY_CHECK +
         (matchNum * ZL5011X_PKC_CLASSIFY_CHECK_SIZE);

   /* assemble the check entries into 32 bit words and
      then write them to the device */
   for (loop = 0; loop < ZL5011X_PKC_CLASSIFY_NUM_CHECK_FIELDS; loop++)
   {
      if (status != ZL5011X_OK)
         break;

      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            checkBytes[loop], ZL5011X_PKC_CLASSIFY_SIZE_CHECK_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xWriteAssembledBitFields(zl5011xParams, tempWord,
            index, tempPos, address);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美裸体bbwbbwbbw| 国产乱淫av一区二区三区| 日韩影院精彩在线| 日韩精品一区二区三区三区免费| 日韩欧美色电影| 国产三级精品三级| 一区二区三区**美女毛片| 免费人成精品欧美精品| 福利一区二区在线| 在线精品视频免费播放| 欧美大片拔萝卜| 国产精品久久久久久一区二区三区 | 精品日韩欧美在线| 国产精品短视频| 青青草精品视频| 91在线观看美女| 欧美一级专区免费大片| 中文字幕制服丝袜成人av| 丝袜诱惑亚洲看片 | 国产精品亲子伦对白| 丝袜诱惑亚洲看片| 成人激情免费网站| 91精品国产91久久久久久一区二区| 国产三级精品视频| 蜜臀av性久久久久蜜臀av麻豆| 成人免费毛片嘿嘿连载视频| 欧美高清精品3d| 国产精品理论在线观看| 麻豆极品一区二区三区| 在线免费观看不卡av| 国产日韩欧美综合在线| 日韩精品每日更新| 91色综合久久久久婷婷| 久久午夜老司机| 亚洲成人7777| 99久久99久久综合| 精品一区二区三区久久久| 欧美综合亚洲图片综合区| 国产精品美女久久久久久久久 | 91精品在线免费观看| 国产精品久久精品日日| 另类小说一区二区三区| 欧美性色欧美a在线播放| 国产视频不卡一区| 精品在线一区二区| 欧美久久高跟鞋激| 亚洲女爱视频在线| 国产成人av电影在线观看| 91精品国产麻豆| 亚洲国产综合91精品麻豆| 99热99精品| 日本一区二区高清| 韩国一区二区三区| 精品久久久久久综合日本欧美| 亚洲图片有声小说| 94-欧美-setu| 国产精品免费久久久久| 国产一区二区在线看| 日韩亚洲欧美中文三级| 亚洲va欧美va国产va天堂影院| 色综合天天综合给合国产| 欧美国产激情一区二区三区蜜月| 久久国产三级精品| 欧美一区二区视频观看视频| 亚洲成人av电影| 欧美亚州韩日在线看免费版国语版| 国产精品高潮久久久久无| 成人免费观看视频| 国产精品少妇自拍| 国产黑丝在线一区二区三区| 久久中文娱乐网| 韩国理伦片一区二区三区在线播放| 日韩女优视频免费观看| 久久99国产精品成人| 日韩欧美国产三级| 精品亚洲成a人在线观看| 日韩你懂的电影在线观看| 男男成人高潮片免费网站| 欧美日韩在线免费视频| 亚洲国产视频在线| 欧美主播一区二区三区美女| 亚洲尤物在线视频观看| 欧美日韩视频在线观看一区二区三区| 亚洲免费电影在线| 欧美在线综合视频| 亚洲成av人片在线观看| 欧美肥大bbwbbw高潮| 日本成人在线看| 欧美α欧美αv大片| 精品一区二区影视| 久久精品一区二区三区av| 高清不卡一区二区| 亚洲日本在线视频观看| 欧美在线短视频| 日韩专区欧美专区| 精品国产免费一区二区三区四区| 激情欧美一区二区三区在线观看| 国产日产亚洲精品系列| 99久久99久久精品免费看蜜桃| 亚洲精品高清视频在线观看| 亚洲sss视频在线视频| 7777精品伊人久久久大香线蕉完整版| 久久成人精品无人区| 国产亚洲精品7777| 91在线视频在线| 香蕉av福利精品导航| 欧美一级电影网站| 国产成人免费高清| 亚洲欧美日韩综合aⅴ视频| 欧美区一区二区三区| 极品少妇xxxx精品少妇| 成人免费一区二区三区视频| 欧美天堂一区二区三区| 精品中文字幕一区二区小辣椒| 国产精品美女www爽爽爽| 欧美色倩网站大全免费| 精品一区二区三区视频| 亚洲丝袜美腿综合| 日韩精品一区二| 91在线无精精品入口| 蜜桃av一区二区三区| 中文字幕乱码一区二区免费| 欧美无人高清视频在线观看| 国产剧情av麻豆香蕉精品| 亚洲欧美另类图片小说| 欧美一区二区视频在线观看| 成人爱爱电影网址| 日本视频中文字幕一区二区三区| 国产人成一区二区三区影院| 色狠狠色噜噜噜综合网| 久久国产精品无码网站| 亚洲品质自拍视频网站| 日韩免费观看高清完整版 | 国产精品入口麻豆原神| 欧美色网一区二区| 国产成人在线看| 午夜精品视频在线观看| 国产精品国产a级| 日韩一区二区三区电影在线观看| 97se亚洲国产综合自在线观| 韩国av一区二区| 午夜视黄欧洲亚洲| 亚洲啪啪综合av一区二区三区| 精品国产3级a| 欧美日韩国产一级| k8久久久一区二区三区| 精品一区二区三区免费观看| 亚洲国产日产av| 亚洲欧洲日本在线| 久久久久国产免费免费| 91精品国产一区二区三区| 色一情一伦一子一伦一区| 国产馆精品极品| 久久99精品国产.久久久久久| 一区二区三区免费看视频| 国产精品网站一区| 精品日韩欧美一区二区| 欧美精品久久99| 欧美在线免费观看视频| 91亚洲午夜精品久久久久久| 国产成人精品免费在线| 六月丁香综合在线视频| 午夜av一区二区| 一区二区三区视频在线观看| 国产精品免费人成网站| 久久久电影一区二区三区| 欧美成人精品二区三区99精品| 欧美日精品一区视频| 91美女视频网站| 91一区二区三区在线观看| 不卡的电影网站| 成人app网站| 成人国产精品视频| 成人三级伦理片| 国产成人精品网址| 国产欧美一区二区精品秋霞影院 | 蜜臀久久99精品久久久久久9 | 制服.丝袜.亚洲.中文.综合| 在线欧美日韩精品| 色屁屁一区二区| 91丨九色porny丨蝌蚪| 91在线视频免费91| 一本色道亚洲精品aⅴ| 91欧美激情一区二区三区成人| 成人伦理片在线| 91在线播放网址| 日本电影欧美片| 在线亚洲免费视频| 欧美三级一区二区| 欧美理论电影在线| 91麻豆精品久久久久蜜臀 | 韩国中文字幕2020精品| 韩国三级在线一区| 国产馆精品极品| 99国产精品久久久久| 色婷婷综合久久久久中文一区二区| 99国内精品久久| 欧美日韩国产一级二级| 日韩女优毛片在线| 国产三级精品三级|