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

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

?? zl5011xpkcclassify.c

?? Zalink50114----TDMoIP芯片驅(qū)動(dòng)源碼
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
   }

   return status;
}

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

 Function:
    zl5011xPkcClassifySetGeneralMatch

 Description:
   This function is used to setup a classifier match for a non-context packet.
   That is a control packet destined for the host.
   For host connection, the mpid would be set to indicate one of the CPU queues
   (0 to 3).

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   matchNum       the number of the entry to disable
   match          structure containing the classifier match settings
   flow           the flow type to be used for the matched packet
   mpid           the MPID to be used for the matched packet.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xPkcClassifySetGeneralMatch(zl5011xParamsS *zl5011xParams,
      Uint32T matchNum, zl5011xPacketClassifyMatchS *match,
      zl5011xFlowTypeE flow, Uint32T mpid)
{
   Uint32T tempWord[(ZL5011X_PKC_CLASSIFY_OUTPUT_RAM_SIZE / 4) + 1];
   Uint8T tempPos = 0;
   Uint8T index = 0;
   Uint32T address;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKC_FN_ID,
         "zl5011xPkcClassifySetGeneralMatch: match %3d, flow %d, mpid %3d",
         matchNum, flow, mpid, 0, 0, 0);

   /* check that the parameters are okay */
   if ((matchNum >= ZL5011X_PKC_NUM_CLASSIFY_ENTRIES) ||
         (match == NULL))
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      if (match->protocolMatchNum >= ZL5011X_PKC_NUM_PROTOCOL_ENTRIES)
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_FLOW_TYPE(flow);
   }

   /* setup the match, mask and check fields for the recognition
      stage of the classifier */
   if (status == ZL5011X_OK)
   {
      status = zl5011xPkcClassifySetMatchField(zl5011xParams, matchNum,
            match->classifyMatchBytes, match->protocolMatchNum);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xPkcClassifySetMaskField(zl5011xParams,
            matchNum, match->classifyMaskBytes);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xPkcClassifySetCheckField(zl5011xParams,
            matchNum, match->classifyCheckBytes);
   }

   /* set up the output Ram */
   address = ZL5011X_PKC_CLASSIFY_OUTPUT_RAM +
         (matchNum * ZL5011X_PKC_CLASSIFY_OUTPUT_RAM_SIZE);

   if (status == ZL5011X_OK)
   {
      /* the first field in the output RAM is the flow type */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            flow, ZL5011X_PKC_CLASSIFY_SIZE_FLOW_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* the next field is the MPID */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            mpid, ZL5011X_PKC_CLASSIFY_SIZE_MPID_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* fill the header offset and length fields with 0 */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            0,
            ZL5011X_PKC_CLASSIFY_SIZE_OFFSET_FIELD +
            ZL5011X_PKC_CLASSIFY_SIZE_LENGTH_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* set the raw packet length field to 1, since the packet length will
         be used for transfer to the host */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            1, ZL5011X_PKC_CLASSIFY_SIZE_RAW_LENGTH_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* fill all of the remaining fields with 0 */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            0,
            ZL5011X_PKC_CLASSIFY_SIZE_LENGTH_CHG_FIELD +
            ZL5011X_PKC_CLASSIFY_SIZE_LENGTH_SIZE_FIELD +
            ZL5011X_PKC_CLASSIFY_SIZE_RTP_FIELD);
   }

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

   /* need to store all of these settings into the device structure */
   if (status == ZL5011X_OK)
   {
      memcpy(&zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyMatch,
            match, sizeof(zl5011xPacketClassifyMatchS));
   }

   return status;
}

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

 Function:
    zl5011xPkcClassifySetContextMatch

 Description:
   This function is used to setup a classifier match for a context.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   matchNum       the number of the entry to disable
   match          structure containing the classifier match settings
   output         structure containing the classifier output settings.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xPkcClassifySetContextMatch(zl5011xParamsS *zl5011xParams,
      Uint32T context, Uint32T matchNum, zl5011xPacketClassifyMatchS *match,
      zl5011xPacketClassifyOutputS *output)
{
   Uint32T tempWord[(ZL5011X_PKC_CLASSIFY_OUTPUT_RAM_SIZE / 4) + 1];
   Uint8T tempPos = 0;
   Uint8T index = 0;
   Uint32T address;
   Uint32T bits;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE_CONTEXT(ZL5011X_PKC_FN_ID, context,
         "zl5011xPkcClassifySetContextMatch: ctxt %3d, match %3d",
         context, matchNum, 0, 0, 0, 0);

   /* check that the parameters are okay */
   if ((matchNum >= ZL5011X_PKC_NUM_CLASSIFY_ENTRIES) ||
         (match == NULL) ||
         (output == NULL))
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      if (match->protocolMatchNum >= ZL5011X_PKC_NUM_PROTOCOL_ENTRIES)
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   /* check that the output parameters are okay */
   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_BOOLEAN(output->classifyLengthNoCalc);
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_BOOLEAN(output->classifyTwoByteLength);
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_BOOLEAN(output->classifyLengthFromPacket);
   }

   if ((status == ZL5011X_OK) &&
         (((output->classifyLengthModifier & ~ZL5011X_PKC_CLASSIFY_LENGTH_MASK) != 0) ||
         ((output->classifyHeaderOffset & ~ZL5011X_PKC_CLASSIFY_OFFSET_MASK) != 0)))
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_FLOW_TYPE(output->classifyFlow);
   }

   /* setup the match, mask and check fields for the recognition
      stage of the classifier */
   if (status == ZL5011X_OK)
   {
      status = zl5011xPkcClassifySetMatchField(zl5011xParams, matchNum,
            match->classifyMatchBytes, match->protocolMatchNum);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xPkcClassifySetMaskField(zl5011xParams,
            matchNum, match->classifyMaskBytes);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xPkcClassifySetCheckField(zl5011xParams,
            matchNum, match->classifyCheckBytes);
   }

   /* set up the output Ram  */
   address = ZL5011X_PKC_CLASSIFY_OUTPUT_RAM +
         (matchNum * ZL5011X_PKC_CLASSIFY_OUTPUT_RAM_SIZE);

   if (status == ZL5011X_OK)
   {
      /* the first field in the output RAM is the flow type */
       status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            output->classifyFlow, ZL5011X_PKC_CLASSIFY_SIZE_FLOW_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* the next field is the MPID */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            output->classifyMpid, ZL5011X_PKC_CLASSIFY_SIZE_MPID_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* the next field is the header offset */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            output->classifyHeaderOffset, ZL5011X_PKC_CLASSIFY_SIZE_OFFSET_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* the next field is the length modifier */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            output->classifyLengthModifier, ZL5011X_PKC_CLASSIFY_SIZE_LENGTH_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* set the raw packet length field to 0, since the packet length will
         be specified or use fields in the header */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            output->classifyLengthFromPacket, ZL5011X_PKC_CLASSIFY_SIZE_RAW_LENGTH_FIELD);
   }

   /* carry on adding the remaining fields */
   if (status == ZL5011X_OK)
   {
      /* the next field is the length selection field. When the variable is
         TRUE, the length inthe length modifier field is used directly as the
         length of the message. When it is FALSE, the length modifier setting
         is subtracted from the packet length to get the message length. */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            output->classifyLengthNoCalc, ZL5011X_PKC_CLASSIFY_SIZE_LENGTH_CHG_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* the next field is the size of the length field - 1 or 2 bytes */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            output->classifyTwoByteLength, ZL5011X_PKC_CLASSIFY_SIZE_LENGTH_SIZE_FIELD);
   }

   if (status == ZL5011X_OK)
   {
      /* if the flow is being set to an RTP flow then enable the RTP stats */
      switch (output->classifyFlow)
      {
         case ZL5011X_FLOW_PKT_PE_WAN:
         case ZL5011X_FLOW_PKT_PE_PKT:
         case ZL5011X_FLOW_PKT_TS_WAN:
            bits = ZL5011X_1BIT_MASK;
            break;

         default:
            bits = 0;
            break;
      }

      /* the next field is the RTP stats enable */
      status = zl5011xAssembleBitFields(tempWord, &index, &tempPos,
            bits, ZL5011X_PKC_CLASSIFY_SIZE_RTP_FIELD);
   }

   /* need to write the 2nd word to the device */
   if (status == ZL5011X_OK)
   {
      status = zl5011xWriteAssembledBitFields(zl5011xParams, tempWord,
            index, tempPos, address);
   }

   /* need to store all of these settings into the device structure */
   if (status == ZL5011X_OK)
   {
      zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyContext = context;
      memcpy(&zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyMatch,
            match, sizeof(zl5011xPacketClassifyMatchS));
      memcpy(&zl5011xParams->packetIf.packetRx.pkcClassify[matchNum].classifyOutput,
            output, sizeof(zl5011xPacketClassifyOutputS));
   }

   return status;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品视频网| 亚洲精品国产高清久久伦理二区| 成人爱爱电影网址| 亚洲1区2区3区视频| 久久久天堂av| 欧美日本国产视频| 成a人片亚洲日本久久| 麻豆精品在线看| 亚洲一二三四在线| 国产精品美女一区二区在线观看| 欧美日本韩国一区二区三区视频 | 国产成人夜色高潮福利影视| 亚洲一区二区三区免费视频| 中文字幕不卡在线播放| 欧美一级久久久| 欧美肥妇bbw| 在线免费一区三区| 欧美一三区三区四区免费在线看| 亚洲精品一线二线三线| 日韩三级电影网址| 在线观看日韩电影| 不卡影院免费观看| 国产精品一区二区果冻传媒| 美女一区二区三区| 午夜影视日本亚洲欧洲精品| 亚洲品质自拍视频| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 91黄色在线观看| 国产成人精品影视| 国产精品99久久久久| 久久99国产精品久久99 | 亚洲高清在线视频| 亚洲免费av网站| 中文字幕一区二区日韩精品绯色| 久久久久国产精品免费免费搜索| 日韩欧美中文一区| 日韩欧美国产不卡| 亚洲精品在线免费观看视频| 日韩手机在线导航| 日韩欧美你懂的| 精品久久久久香蕉网| 精品免费一区二区三区| 精品国产一二三区| 26uuu精品一区二区| 久久久久久免费网| 久久久久青草大香线综合精品| 久久久久国产免费免费| 国产精品美女一区二区在线观看| 中文字幕av一区二区三区高| 中文字幕永久在线不卡| 亚洲三级电影网站| 亚洲自拍偷拍麻豆| 石原莉奈在线亚洲三区| 美女在线观看视频一区二区| 老司机免费视频一区二区三区| 玖玖九九国产精品| 国产成人福利片| 97久久人人超碰| 色欧美片视频在线观看在线视频| 在线亚洲免费视频| 91精品麻豆日日躁夜夜躁| 欧美成人乱码一区二区三区| 久久免费视频色| 中文字幕中文字幕在线一区 | 成人午夜短视频| 一本到不卡精品视频在线观看| 欧美三级日韩三级国产三级| 91精品国产aⅴ一区二区| 久久蜜桃av一区二区天堂 | 天天综合网天天综合色| 久久99国产精品麻豆| 99久久久久久| 6080午夜不卡| 中文字幕 久热精品 视频在线| 亚洲视频一区在线观看| 日本少妇一区二区| 成人av手机在线观看| 欧美精品一级二级三级| 久久蜜桃av一区精品变态类天堂| 亚洲精品一二三四区| 久久国产福利国产秒拍| 91蜜桃传媒精品久久久一区二区| 欧美日韩精品系列| 国产女同互慰高潮91漫画| 亚洲精品写真福利| 精品亚洲成a人| 在线亚洲精品福利网址导航| 精品av综合导航| 亚洲美女淫视频| 国产一区二区免费看| 91成人网在线| 欧美国产一区在线| 视频一区二区中文字幕| 成人99免费视频| 欧美xxxxx裸体时装秀| 亚洲欧美福利一区二区| 国产一区二区视频在线播放| 欧美性一二三区| 国产精品美女久久久久久久| 免费成人av在线| 91国在线观看| 免费成人美女在线观看.| 99综合电影在线视频| 亚洲精品在线免费观看视频| 午夜欧美在线一二页| 91影视在线播放| 久久久久久久久久美女| 亚洲超碰精品一区二区| 99re成人精品视频| 中文av一区特黄| 激情av综合网| 欧美精品精品一区| 亚洲欧美激情插 | 成人av在线观| 久久久综合网站| 日本欧美久久久久免费播放网| 色婷婷av一区二区三区大白胸| 久久久91精品国产一区二区精品 | 91伊人久久大香线蕉| 久久免费的精品国产v∧| 久久国产三级精品| 日韩一区二区三区四区| 天堂久久久久va久久久久| 日本国产一区二区| 亚洲三级在线看| www.视频一区| 国产精品国产三级国产普通话蜜臀 | 不卡影院免费观看| 国产欧美一区二区三区在线看蜜臀| 国内精品国产成人国产三级粉色| 91精品综合久久久久久| 亚洲第一主播视频| 欧美日韩国产影片| 亚洲成a人片综合在线| 欧美在线|欧美| 午夜视频一区二区| 欧美日韩在线三级| 亚洲成a人片综合在线| 69精品人人人人| 麻豆成人久久精品二区三区小说| 欧美一级一区二区| 久久不见久久见免费视频1| 亚洲精品一区二区三区福利| 激情综合色播激情啊| 久久这里只有精品视频网| 国产乱人伦精品一区二区在线观看| 久久综合狠狠综合久久激情 | 成人动漫视频在线| 亚洲精品国产一区二区三区四区在线 | 久久精品国产精品亚洲精品| 欧美成人国产一区二区| 精品综合久久久久久8888| 久久精品视频在线看| 成人精品在线视频观看| 亚洲日本成人在线观看| 欧美日韩综合不卡| 蜜臀91精品一区二区三区 | 在线观看日韩毛片| 欧美aⅴ一区二区三区视频| 久久亚洲精品国产精品紫薇| 成人综合婷婷国产精品久久 | 日韩欧美不卡在线观看视频| 国产在线国偷精品免费看| 欧美国产精品中文字幕| 91福利在线播放| 日韩电影网1区2区| 国产欧美日韩三区| 欧美性一级生活| 国产一区999| 一区二区免费视频| 欧美不卡在线视频| 不卡大黄网站免费看| 亚洲午夜国产一区99re久久| 精品捆绑美女sm三区| 91在线视频18| 免费观看成人av| 国产精品视频免费看| 欧美理论在线播放| 风间由美一区二区三区在线观看 | 久久久亚洲精华液精华液精华液| a亚洲天堂av| 久久99国内精品| 一二三区精品视频| 日韩免费福利电影在线观看| 99国产精品99久久久久久| 日韩精品一级中文字幕精品视频免费观看 | 91九色02白丝porn| 黄色资源网久久资源365| 亚洲精品视频自拍| 久久婷婷综合激情| 欧美色图激情小说| 国产成人精品一区二| 丝袜诱惑制服诱惑色一区在线观看| 国产欧美1区2区3区| 91精品婷婷国产综合久久性色| 丁香婷婷综合五月| 美女一区二区在线观看| 亚洲午夜精品网| 中文字幕一区二区三区色视频| 日韩精品中文字幕一区二区三区|