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

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

?? zl5011xdebugfuncs.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:

 Description:
   Displays information on the protocol matching and the classifier rules in use.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:

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

zlStatusE zl5011xDebugPkcConfig(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T loop;

   if (zl5011xParams == NULL)
   {
      status = ZL5011X_INVALID_POINTER;
   }

   if (status == ZL5011X_OK)
   {
      printf("Protocol matching\n");
      printf("=================\n");

      for (loop = 0; loop < ZL5011X_PKC_NUM_PROTOCOL_ENTRIES; loop++)
      {
         if (zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolInUse == ZL5011X_FALSE)
         {
            /* not used so skip info */
            continue;
         }

         printf("%ld: %2d bit seq = %2d, %2d, TS = %2d, %2d, %2d, %2d, PW = %2d\n", loop,
            (zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.protocolTwoByteSeq == ZL5011X_TRUE) ? 16 : 8,
            zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.extractSequenceBytes[1],
            zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.extractSequenceBytes[0],
            zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.extractTimestampBytes[3],
            zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.extractTimestampBytes[2],
            zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.extractTimestampBytes[1],
            zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.extractTimestampBytes[0],
            zl5011xParams->packetIf.packetRx.pkcProtocol[loop].protocolOutput.extractPwByte);
      }
   }

   if (status == ZL5011X_OK)
   {
      printf("\nClassifier matching\n");
      printf("===================\n");

      for (loop = 0; loop < ZL5011X_PKC_NUM_CLASSIFY_ENTRIES; loop++)
      {
         if (zl5011xParams->packetIf.packetRx.pkcClassify[loop].classifyInUse == ZL5011X_FALSE)
         {
            /* not used so skip info */
            continue;
         }

         printf("%3ld: prot = %d, context = %3ld, hdr off = %2d, flow = %2d\n", loop,
            zl5011xParams->packetIf.packetRx.pkcClassify[loop].classifyMatch.protocolMatchNum,
            zl5011xParams->packetIf.packetRx.pkcClassify[loop].classifyOutput.classifyMpid,
            zl5011xParams->packetIf.packetRx.pkcClassify[loop].classifyOutput.classifyHeaderOffset,
            zl5011xParams->packetIf.packetRx.pkcClassify[loop].classifyOutput.classifyFlow);
      }
   }

   zl5011xPrintErr(status);
   return(status);
}

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

 Function:
   zl5011xDebugPacketSniffCapture

 Description:
   Returns the first granule of data for a given context.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   context           context number to print stats for.

 Outputs:
   buf               buffer to hold packet data - assumed to be 64 bytes
   length            payload length in bytes

 Returns:
   zlStatusE

 Remarks:
   Sniffs the TDM queue - does not disable interrupts. Therefore may get
   pre-empted since run from a low priority task, so allow the process to retry.

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

#define ZL5011X_DEBUG_MAX_SNIFF_RETRIES  10

zlStatusE zl5011xDebugPacketSniffCapture(zl5011xParamsS *zl5011xParams, Uint32T context, Uint32T *buf, Uint32T *length)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T tfqWrite = 0, tfqQueue = 0, queueMask = 0;
   Uint32T gran = 0, tfq1, tfq2;
   Uint32T loop, readValue, retryCount;
   zl5011xBooleanE failed;

   if (zl5011xParams->wanIf.txQueue[context].queueBaseAddress == (Uint32T)ZL5011X_NOT_INITIALISED)
   {
      status = ZL5011X_ERROR;
   }
   else
   {
      /* queue has been set up so work out a mask based on it's size.
         The sequence numbers in the packet get this mask applied in order to
         put the packet into a slot in the queue, so this operation needs to be
         repeated to find the data in the packet */
      queueMask = (1 << zl5011xParams->wanIf.txQueue[context].queueSize) - 1;

      /* get the address of the TFQ register that holds the write pointer */
      tfqWrite = ZL5011X_TFQ_CTXT_STATUS + (ZL5011X_TFQ_CTXT_CONTROL_SIZE * context);
   }

   retryCount = 0;

   /* allow the packet sniff to retry in the event of failing - most likely cause
      is no packet Rx or concurrency (higher priority task or interrupt) */
   while ((retryCount < ZL5011X_DEBUG_MAX_SNIFF_RETRIES) && (status == ZL5011X_OK))
   {
      failed = ZL5011X_FALSE;
      retryCount++;

      status = zl5011xRead(zl5011xParams, tfqWrite, &readValue);

      /* work out the address for the last packet added to the queue.
         Masking out any bits not related to the write pointer. */
      tfqQueue = zl5011xParams->wanIf.txQueue[context].queueBaseAddress + ((readValue & queueMask) * 8);

      if (status == ZL5011X_OK)
      {
         /* read the first word from the queue */
         status = zl5011xRead(zl5011xParams, tfqQueue, &tfq1);

         /* retrieve the granule pointer for the start of the packet */
         gran = tfq1 & 0x3ffff;
      }

      if (status == ZL5011X_OK)
      {
         /* read the second word from the queue */
         status = zl5011xRead(zl5011xParams, tfqQueue + sizeof(Uint32T), &tfq2);

         /* check that there is data for this entry in the queue.
            No entry in the queue probably means that there are no Rx packets */
         if ((tfq2 & 0x80000000) == 0)
         {
            failed = ZL5011X_TRUE;
         }
      }

      if (failed == ZL5011X_FALSE)
      {
         /* retrieve a granules worth of data for the context */
         for (loop = 0; loop < (ZL5011X_GRANULE_DATA_SIZE / sizeof(Uint32T)); loop++)
         {
            if (status != ZL5011X_OK)
            {
               break;
            }

            status = zl5011xRead(zl5011xParams,
                  zl5011xParams->packetMemory.granBaseAddr + (gran * ZL5011X_GRANULE_DATA_SIZE) + (loop * sizeof(Uint32T)),
                  buf + loop);
         }

         /* check that the queue hasn't changed since we first read it. If it has then means
            that we were delayed and the queue entry changed, so the data is most likely invalid. */
         if (status == ZL5011X_OK)
         {
            status = zl5011xRead(zl5011xParams, tfqQueue, &readValue);

            if (readValue != tfq1)
            {
               failed = ZL5011X_TRUE;
            }
         }

         if (status == ZL5011X_OK)
         {
            status = zl5011xRead(zl5011xParams, tfqQueue + sizeof(Uint32T), &readValue);

            if (readValue != tfq2)
            {
               failed = ZL5011X_TRUE;
            }
         }
      }

      if (failed == ZL5011X_FALSE)
      {
         /* collected a packet so break out of the loop */
         break;
      }
   }

   if (retryCount == ZL5011X_DEBUG_MAX_SNIFF_RETRIES)
   {
      status = ZL5011X_ERROR;
   }

   /* retrieve the payload length from the TFQ word */
   *length = (tfq2 >> 10) & 0x7ff;

   return(status);
}

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

 Function:
   zl5011xDebugPacketSniff

 Description:
   Displays the first granule of data for a packet sniffed from a TDM queue.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   context           context number to print stats for.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xDebugPacketSniff(zl5011xParamsS *zl5011xParams, Uint32T context)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T *buf = NULL;
   Uint32T loop, payloadLength;

   /* allocate some memory - only fetching one granule. Since the header will
      almost always be contained in the first granule, there is no need to traverse
      the chain */
   buf = (Uint32T *)OS_MALLOC(ZL5011X_GRANULE_DATA_SIZE);

   if (buf == NULL)
   {
      status = ZL5011X_ERROR;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xDebugPacketSniffCapture(zl5011xParams, context, buf, &payloadLength);
   }

   /* display the packet information */
   if (status == ZL5011X_OK)
   {
      printf("payload length  = %ld\n", payloadLength);

      for (loop = 0; loop < ZL5011X_GRANULE_DATA_SIZE / sizeof(Uint32T); loop++)
      {
         printf("   %02X %02X %02X %02X",
               (Uint8T)(buf[loop] >> 0),
               (Uint8T)(buf[loop] >> 8),
               (Uint8T)(buf[loop] >> 16),
               (Uint8T)(buf[loop] >> 24));

         if (loop & 1)
         {
            printf("\n");
         }
      }
   }

   if (buf != NULL)
   {
      free(buf);
   }
   zl5011xPrintErr(status);
   return(status);
}

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

 Function:
   zl5011xDebugPacketTxHeader

 Description:
   Displays the packet header programmed for given Wan Rx context

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   context           Wan Rx context to inspect

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xDebugPacketTxHeader(zl5011xParamsS *zl5011xParams, Uint32T context)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T tempAddr;
   Uint32T loop, temp, readValue;
   zl5011xContextHeaderSwitchE currTxHeader;

   temp = zl5011xParams->packetIf.packetTx.txHeader[context].lowHeader.txLowLength;

   status = zl5011xPtxGetHeaderAddress(zl5011xParams, context, &tempAddr);

   printf("Low header\n");
   printf("==========\n   ");

   for (loop = 0; loop < temp; loop++)
   {
      if (status != ZL5011X_OK)
      {
         break;
      }

      if ((loop % sizeof(Uint32T)) == 0)
      {
         status = zl5011xRead(zl5011xParams, tempAddr + loop, &readValue);
      }

      printf("%02lX ", readValue >> (loop % sizeof(Uint32T) * 8) & 0xff);

      if ((loop % 8) == 7)
      {
         printf("\n   ");
      }
   }

   printf("\n\nHigh header\n");
   printf(    "===========\n   ");

   if (status == ZL5011X_OK)
   {
      status = zl5011xPlaGetCurrentHeader(zl5011xParams,
             context, &currTxHeader);

      if (status == ZL5011X_OK)
      {
         temp = zl5011xParams->packetIf.packetTx.txHeader[context].highHeader[currTxHeader].txHighLength;

         status = zl5011xRtpGetHeaderAddress(zl5011xParams, context,
               currTxHeader, &tempAddr);
      }
   }

   for (loop = 0; loop < temp; loop++)
   {
      if (status != ZL5011X_OK)
      {
         break;
      }

      if ((loop % sizeof(Uint32T)) == 0)
      {
         status = zl5011xRead(zl5011xParams, tempAddr + loop, &readValue);
      }

      printf("%02lX ", readValue >> (loop % sizeof(Uint32T) * 8) & 0xff);

      if ((loop % 8) == 7)
      {
         printf("\n   ");
      }
   }

   printf("\n");

   zl5011xPrintErr(status);
   return status;
}

/******************************************************************************/
/* the following functions provided information on the task messages */
/******************************************************************************/

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

 Function:
    zl5011xDebugScanTmMsg

 Description:
   This function just scans through the task manager trace buffer and provides
   a count of the number of messages found for each context. The number of
   messages found can provide information on packet generation (Wan Rx contexts)
   and packet reception (Wan Tx).

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xDebugScanTmMsg(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;
   zl5011xTmTraceMessageS msg;
   Uint32T found[128];
   Uint32T loop;

   if (zl5011xParams == NULL)
   {
      status = ZL5011X_INVALID_POINTER;

      zl5011xPrintErr(status);
      return(status);
   }

   memset(found, 0, sizeof(found));

   for (loop = 0; loop < ZL5011X_TM_TRACE_BUFFER_SIZE / zl5011xParams->taskManager.tmBufferSize; loop++)
   {
      if (status != ZL5011X_OK)
      {
         break;
      }

      status = zl5011xTmGetTraceMessage(zl5011xParams, loop, &msg);
      found[msg.mpid & 0x7f]++;
   }

   for (loop = 0; loop < 128; loop++)
   {
      if (found[loop] != 0)
      {
         printf("context %3ld, found %3ld messages\n", loop, found[loop]);
      }
   }

   zl5011xPrintErr(status);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av一二三| 91精品国产欧美一区二区| 91福利小视频| 亚洲精品在线观看视频| 最新欧美精品一区二区三区| 日本视频中文字幕一区二区三区| 99久久久精品| 精品毛片乱码1区2区3区| 一区二区三区美女视频| 国产精品影视在线| 欧美一区二区三区在线观看视频 | 在线亚洲人成电影网站色www| 宅男噜噜噜66一区二区66| 中文字幕中文在线不卡住| 美女性感视频久久| 欧美日韩精品综合在线| 国产精品毛片a∨一区二区三区| 秋霞电影网一区二区| 欧美视频一区二区| 亚洲激情网站免费观看| bt7086福利一区国产| 久久亚洲一区二区三区四区| 日本视频一区二区三区| 欧美日韩一区二区三区在线| 亚洲人成在线播放网站岛国| 国产sm精品调教视频网站| 精品国产一区二区三区不卡| 日韩va欧美va亚洲va久久| 欧美精品日韩一本| 亚洲夂夂婷婷色拍ww47| 91色|porny| 亚洲欧美偷拍另类a∨色屁股| 成人精品一区二区三区四区| 国产欧美精品在线观看| 国产999精品久久久久久| 欧美激情一区在线观看| 国产经典欧美精品| 久久精品这里都是精品| 极品美女销魂一区二区三区| 精品国产露脸精彩对白| 国产一区二区调教| 国产农村妇女精品| 99久久er热在这里只有精品15| 国产精品久久久久久久第一福利| 成人免费视频一区二区| 国产精品福利一区| 91热门视频在线观看| 一区二区三区在线视频播放| 欧美日韩激情在线| 捆绑调教一区二区三区| 久久青草欧美一区二区三区| 国产精选一区二区三区| 中文字幕一区av| 色94色欧美sute亚洲线路一ni| 亚洲福利视频一区二区| 日韩三级视频在线观看| 国产精品资源在线看| 国产精品伦一区二区三级视频| av一二三不卡影片| 五月天精品一区二区三区| 欧美一卡二卡三卡| 成人黄色av网站在线| 亚洲一区二区三区在线看| 91精品国产综合久久福利软件| 国产资源精品在线观看| 国产精品不卡在线| 欧美日韩日日夜夜| 国产一二三精品| 一区二区在线观看免费视频播放| 欧美二区在线观看| 成人激情免费网站| 日韩国产在线一| 国产精品三级在线观看| 欧美色精品在线视频| 国产一区二区不卡| 亚洲成va人在线观看| 欧美激情在线一区二区| 精品视频在线视频| 国产成人免费高清| 蜜臀久久久久久久| 亚洲精品一二三| xnxx国产精品| 欧美精品乱码久久久久久| 成人高清视频在线观看| 免费在线观看一区二区三区| 成人免费在线视频观看| 精品av久久707| 欧美日韩精品系列| 91麻豆免费观看| 国产精品一二三| 日本亚洲最大的色成网站www| 亚洲欧美另类小说视频| 久久久久久久久99精品| 8v天堂国产在线一区二区| 91在线国内视频| 国产精品1024久久| 久久成人综合网| 亚洲va欧美va人人爽午夜| 亚洲少妇屁股交4| 国产日韩欧美精品一区| 欧美va亚洲va香蕉在线| 欧美老肥妇做.爰bbww视频| 91小宝寻花一区二区三区| 国产精品香蕉一区二区三区| 秋霞午夜av一区二区三区| 亚洲大片精品永久免费| 一区二区三区欧美久久| 国产精品高潮呻吟| 国产精品国产三级国产专播品爱网| 精品日韩在线观看| 精品美女一区二区| 精品国产一区a| 精品国产一区二区在线观看| 精品久久久久久最新网址| 日韩一区二区电影| 日韩精品一区国产麻豆| 欧美一区二区女人| 日韩欧美一级片| 日韩欧美卡一卡二| 欧美刺激午夜性久久久久久久| 制服丝袜亚洲网站| 日韩午夜激情av| 日韩欧美国产1| 久久久久青草大香线综合精品| 欧美精品一区二区三区高清aⅴ| 精品国产第一区二区三区观看体验| 日韩欧美中文字幕一区| 精品成人在线观看| 国产日韩欧美在线一区| 国产精品卡一卡二卡三| 国产精品网站在线| 一区二区三区四区激情| 日韩国产欧美在线播放| 狠狠色丁香久久婷婷综合_中| 六月丁香综合在线视频| 91久久精品一区二区三| 欧美天堂一区二区三区| 欧美一级专区免费大片| 久久综合久久99| 一区在线观看免费| 五月激情综合婷婷| 狠狠色狠狠色综合系列| 成人精品视频一区| 在线观看91视频| 精品日韩99亚洲| 亚洲免费在线电影| 免费成人在线播放| 成人黄页毛片网站| 精品视频在线免费观看| 欧美精品一区二区三区在线| 最近日韩中文字幕| 日本不卡免费在线视频| 国产福利91精品一区二区三区| 91看片淫黄大片一级在线观看| 欧美精品v日韩精品v韩国精品v| 久久久国际精品| 五月婷婷综合在线| 不卡在线视频中文字幕| 欧美日本国产视频| 中文字幕av一区二区三区高| 亚洲成av人在线观看| 国产999精品久久久久久绿帽| 欧美三级中文字幕在线观看| 久久精品人人做| 亚洲va欧美va天堂v国产综合| 成人自拍视频在线观看| 91精品国产入口| 成人欧美一区二区三区白人| 久久www免费人成看片高清| 欧美综合久久久| 国产精品夫妻自拍| 久国产精品韩国三级视频| 在线观看国产日韩| 国产精品色哟哟网站| 久久精品二区亚洲w码| 在线观看日韩av先锋影音电影院| 久久女同性恋中文字幕| 三级欧美韩日大片在线看| 99re这里只有精品视频首页| 精品国产乱码久久久久久免费 | 99久久国产综合精品麻豆| 欧美精品一区二区三区蜜桃视频| 亚洲va国产天堂va久久en| 成人国产精品免费网站| 久久先锋影音av| 蜜桃视频在线一区| 欧美人狂配大交3d怪物一区| 亚洲色图欧美激情| 成人动漫av在线| 欧美国产一区视频在线观看| 久久不见久久见免费视频7| 91精品国产全国免费观看| 日韩不卡在线观看日韩不卡视频| 欧美体内she精高潮| 一区二区三区av电影| 91免费在线看| 亚洲欧美日韩国产综合| k8久久久一区二区三区| 欧美国产精品一区| 波多野结衣的一区二区三区|