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

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

?? zl5011xpackettx.c

?? Zalink50114----TDMoIP芯片驅(qū)動(dòng)源碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
   /* With the fully populated structures, call the API functions to setup the
     headers. First layers 2and3 and then layers 4and5. */
   if (status == ZL5011X_OK)
   {
      /* The layer 2/3 header can only be changed when the device is in the INIT state.
         i.e. its a one-off setting because if you tried to change it dynamically you
         would almost certainly cause packet corruption while the change was in progress. */
      if (zl5011xParams->wanIf.plaCurrent.context[par->context].state == ZL5011X_STATE_INIT)
      {
         /* store the protocol type for future reference */
         zl5011xParams->packetIf.packetTx.txHeader[par->context].protocolType = par->protocolType;
         zl5011xParams->packetIf.packetTx.txHeader[par->context].pwStatusPos = pwStatusPos;

         ZL5011X_TRACE(ZL5011X_PACKET_FN_ID,
               "zl5011xPacketTxSetHeader: Ptx header length %d, length pos %d, chk %d, len val %d",
               layer2and3Header->header.txLowLength,
               layer2and3Header->header.layer3LengthPos,
               layer2and3Header->header.layer3ChecksumPos,
               layer2and3Header->header.layer3LengthValue, 0, 0);

         status = zl5011xLanTxSetLayer2and3Header(zl5011xParams, layer2and3Header);
      }
   }

   if (status == ZL5011X_OK)
   {
      /* The layer 4/5 header can be changed dynamically because any changes will go
         into the "shadow" header until a context switch occurs */
      if (layer4and5Header->header.txHighLength != 0)
      {
         ZL5011X_TRACE(ZL5011X_PACKET_FN_ID,
               "zl5011xPacketTxSetHeader: Rtp header length %d, length pos %d, chk %d, seq %d, time %d",
               layer4and5Header->header.txHighLength,
               layer4and5Header->header.layer4LengthPos,
               layer4and5Header->header.layer4ChecksumPos,
               layer4and5Header->header.layer5SequenceNumPos,
               layer4and5Header->header.layer5TimestampPos, 0);

         status = zl5011xLanTxSetLayer4and5Header(zl5011xParams, layer4and5Header);
      }
   }

   /* free up the memory allocated for the headers */
   if (layer2and3Header != NULL)
   {
      OS_FREE(layer2and3Header);
   }

   if (layer4and5Header != NULL)
   {
      OS_FREE(layer4and5Header);
   }

   return(status);
}

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

 Function:
    zl5011xAddEthernetHeader

 Description:
    Modify the structure information passed in to setup header for the common
    Ethernet (layer2) protocols. Take into account the impact of SNAP and VLAN

 Inputs:
    layer2and3Header  Pointer to zl5011xLanTxSetLayer2and3HeaderS structure to
                      be modified to with Ethernet information.
    par               Pointer to the zl5011xPacketTxSetHeaderS structure.

 Outputs:
    None

 Returns:
    zlStatusE

 Remarks:
    All protocol stacks use Ethernet.

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

zlStatusE zl5011xAddEthernetHeader(zl5011xLanTxSetLayer2and3HeaderS *layer2and3Header,
      zl5011xPacketTxSetHeaderS * par)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PACKET_FN_ID,
         "zl5011xAddEthernetHeader:",
         0, 0, 0, 0, 0, 0);

   /* Determine the format of the lowest layer header - Ethernet. This is
   dependent upon the presence of Subnetwork Access Protocol (SNAP).       */
   if (par->enableSnap == ZL5011X_TRUE)
   {
      layer2and3Header->header.txLowLength = ZL5011X_PKT_ETHERSNAP_HDR_LEN;
      layer2and3Header->header.layer2LengthEnable = ZL5011X_TRUE;
      layer2and3Header->header.layer2LengthPos = ZL5011X_PKT_ETHERSNAP_LEN_POS;
   }
   else
   {
      layer2and3Header->header.txLowLength = ZL5011X_PKT_ETHERNET_HDR_LEN;
   }

   /* If VLAN is turned on then the Ethernet header will be larger. */
   if (par->enableVlan == ZL5011X_TRUE)
   {
      layer2and3Header->header.txLowLength += ZL5011X_PKT_VLAN_HDR_LEN;
   }

   return(status);
}

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

Function:
   zl5011xAddIPHeader

Description:
   Modify the structure information passed in to setup header for the IP
   (layer3) protocols. Take into account the impact of different IP versions.

Inputs:
   layer2and3Header  Pointer to zl5011xLanTxSetLayer2and3HeaderS structure to
                     be modified with IP information.
   par               Pointer to the zl5011xPacketTxSetHeaderS structure.

Outputs:
   None

Returns:
   zlStatusE

Remarks:
   The length value set up by this function is just the length of the IP
   header itself. This means that the IP header is the last header contained
   in the PTX. That is, the payload length is updated by the RTP block when
   the higher headers are added.

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

zlStatusE zl5011xAddIPHeader(zl5011xLanTxSetLayer2and3HeaderS *
      layer2and3Header, zl5011xPacketTxSetHeaderS * par)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T ipHeaderStart;

   ZL5011X_TRACE(ZL5011X_PACKET_FN_ID,
         "zl5011xAddIPHeader:",
         0, 0, 0, 0, 0, 0);

   ipHeaderStart = layer2and3Header->header.txLowLength;

   /* The layer 3 portion of the header will depend on which version of IP we
   are dealing with. */
   if (par->ipVer4 == ZL5011X_TRUE)
   {
      /* setup IPv4 length */
      layer2and3Header->header.txLowLength += ZL5011X_PKT_IPV4_HDR_LEN;
      layer2and3Header->header.layer3LengthEnable = ZL5011X_TRUE;
      layer2and3Header->header.layer3LengthValue = ZL5011X_PKT_IPV4_HDR_LEN;
      layer2and3Header->header.layer3LengthPos = (Uint8T)(ipHeaderStart + ZL5011X_PKT_IPV4_LEN_POS);

      /* setup IPv4 checksum */
      layer2and3Header->header.layer3ChecksumEnable = ZL5011X_TRUE;
      layer2and3Header->header.layer3ChecksumPos = (Uint8T)(ipHeaderStart + ZL5011X_PKT_IPV4_CHKSUM_POS);
   }
   else
   {
      /* setup IPv6 length */
      layer2and3Header->header.txLowLength += ZL5011X_PKT_IPV6_HDR_LEN;
      layer2and3Header->header.layer3LengthEnable = ZL5011X_TRUE;
      layer2and3Header->header.layer3LengthValue = 0;
      layer2and3Header->header.layer3LengthPos = (Uint8T)(ipHeaderStart + ZL5011X_PKT_IPV6_LEN_POS);
   }

   return(status);
}

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

 Function:
    zl5011xAddMPLSHeader

 Description:
    Modify the structure information passed in to setup header for the
    MPLS (layer3) protocols.

 Inputs:
    layer2and3Header  Pointer to zl5011xLanTxSetLayer2and3HeaderS structure to
                      be modified to with MPLS information.
    par               Pointer to the zl5011xPacketTxSetHeaderS structure.

 Outputs:
    None

 Returns:
    zlStatusE

 Remarks:

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

zlStatusE zl5011xAddMPLSHeader(zl5011xLanTxSetLayer2and3HeaderS *layer2and3Header,
      zl5011xPacketTxSetHeaderS * par)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PACKET_FN_ID,
         "zl5011xAddMPLSHeader:",
         0, 0, 0, 0, 0, 0);

   layer2and3Header->header.txLowLength += ZL5011X_PKT_MPLS_HDR_LEN;

   return(status);
}

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

 Function:
    zl5011xAddUDPHeader

 Description:
    Modify the structure information passed in to setup header for UDP (layer4)

 Inputs:
    layer4and5Header  Pointer to zl5011xLanTxSetLayer4and5HeaderS structure to
                      be modified to with UDP information.
    par               Pointer to the zl5011xPacketTxSetHeaderS structure.

 Outputs:
    None

 Returns:
    zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xAddUDPHeader(zl5011xLanTxSetLayer4and5HeaderS *layer4and5Header,
      zl5011xPacketTxSetHeaderS * par)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PACKET_FN_ID,
         "zl5011xAddUDPHeader:",
         0, 0, 0, 0, 0, 0);

   /* setup the layer 4 fields : UDP length and checksum */
   layer4and5Header->header.layer4LengthEnable = ZL5011X_TRUE;
   layer4and5Header->header.layer4LengthPos = ZL5011X_PKT_UDP_LEN_POS;

   if (par->enableUDPChecksum == ZL5011X_TRUE)
   {
      layer4and5Header->header.layer4ChecksumEnable = ZL5011X_TRUE;
   }

   layer4and5Header->header.layer4ChecksumPresent = ZL5011X_TRUE;
   layer4and5Header->header.layer4ChecksumPos = ZL5011X_PKT_UDP_CHKSUM_POS;

   /* setup the layer 5 fields : */
   layer4and5Header->header.layer5TimestampIncrement = (Uint16T)par->rtpTimestampInc;    /* seq no. */
   layer4and5Header->header.layer5TimestampFromWan = par->rtpTimestampFromWan;  /* timestamp */

   switch (par->protocolType)
   {
      case ZL5011X_IP_UDP_RTP:
         layer4and5Header->header.layer5SequenceNumEnable = ZL5011X_TRUE;
         layer4and5Header->header.layer5SequenceNum16bit = ZL5011X_TRUE;
         layer4and5Header->header.layer5SequenceNumPos = ZL5011X_PKT_UDP_HDR_LEN + ZL5011X_PKT_RTP_SEQ_POS;

         layer4and5Header->header.layer5TimestampEnable = ZL5011X_TRUE;
         layer4and5Header->header.layer5Timestamp32bit = ZL5011X_TRUE;
         layer4and5Header->header.layer5TimestampPos = ZL5011X_PKT_UDP_HDR_LEN + ZL5011X_PKT_RTP_TS_POS;
         break;

      case ZL5011X_IP_UDP_RTP_PW:
      case ZL5011X_IP_UDP_RTP_PW_ALT:
         layer4and5Header->header.layer5SequenceNumEnable = ZL5011X_TRUE;
         layer4and5Header->header.layer5SequenceNum16bit = ZL5011X_TRUE;

         if (par->rtpForceSeqNumber == ZL5011X_TRUE)
         {
            layer4and5Header->header.layer5SequenceNumPos = ZL5011X_PKT_UDP_HDR_LEN + ZL5011X_PKT_RTP_SEQ_POS;
         }
         else
         {
            layer4and5Header->header.layer5SequenceNumPos = ZL5011X_PKT_UDP_HDR_LEN + ZL5011X_PKT_RTP_HDR_LEN + ZL5011X_PKT_PW_SEQ_POS;
         }

         layer4and5Header->header.layer5TimestampEnable = ZL5011X_TRUE;
         layer4and5Header->header.layer5Timestamp32bit = ZL5011X_TRUE;
         layer4and5Header->header.layer5TimestampPos = ZL5011X_PKT_UDP_HDR_LEN + ZL5011X_PKT_RTP_TS_POS;
         break;

      case ZL5011X_IP_UDP_L2TPV2_PW:
         layer4and5Header->header.layer5SequenceNumEnable = ZL5011X_TRUE;
         layer4and5Header->header.layer5SequenceNum16bit = ZL5011X_TRUE;
         layer4and5Header->header.layer5SequenceNumPos = ZL5011X_PKT_UDP_HDR_LEN + ZL5011X_PKT_L2TP_HDR_LEN + ZL5011X_PKT_PW_SEQ_POS;
         break;

      case ZL5011X_IP_UDP_PW:
         layer4and5Header->header.layer5SequenceNumEnable = ZL5011X_TRUE;
         layer4and5Header->header.layer5SequenceNum16bit = ZL5011X_TRUE;
         layer4and5Header->header.layer5SequenceNumPos = ZL5011X_PKT_UDP_HDR_LEN + ZL5011X_PKT_PW_SEQ_POS;
         break;

      case ZL5011X_IP_UDP_CD:      /* intentional fall through */
      case ZL5011X_IP_UDP:
         /* no special fields */
         break;

      default :
         status = ZL5011X_PARAMETER_INVALID;
   }

   return(status);
}

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

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕亚洲一区二区va在线| 日韩专区欧美专区| 国产女同互慰高潮91漫画| 欧美va亚洲va香蕉在线| 日韩欧美一区二区在线视频| 欧美男生操女生| 欧美丰满嫩嫩电影| 欧美xxxxx裸体时装秀| 日韩欧美高清在线| 精品欧美一区二区在线观看| 精品国产成人系列| 久久青草国产手机看片福利盒子 | 91精品久久久久久蜜臀| 欧美精品久久天天躁| 911国产精品| 精品国产乱码久久久久久久| 国产网站一区二区| 国产精品视频线看| 亚洲黄色在线视频| 午夜精品久久久久久不卡8050| 午夜电影一区二区三区| 日本午夜一区二区| 国产精品一线二线三线| 国产69精品久久久久毛片| eeuss国产一区二区三区| 91香蕉视频污| 欧美乱妇15p| 久久先锋影音av| 亚洲视频一二区| 舔着乳尖日韩一区| 精品一二三四在线| 97久久超碰国产精品| 欧美日韩国产综合一区二区三区| 日韩欧美黄色影院| 国产精品女同一区二区三区| 亚洲一区免费在线观看| 久久国产夜色精品鲁鲁99| 成人一区二区三区视频| 欧美亚洲国产怡红院影院| 欧美成人官网二区| 中文字幕一区二区三区不卡在线 | 麻豆成人久久精品二区三区红 | 蜜桃免费网站一区二区三区| 国产精品一级黄| 色噜噜夜夜夜综合网| 欧美一区二区三区白人| 欧美激情一区二区三区全黄 | 欧美日韩国产123区| 久久久久青草大香线综合精品| 国产精品欧美久久久久无广告| 亚洲国产精品影院| 国产成人av影院| 欧美日本免费一区二区三区| 国产精品视频看| 免费成人在线视频观看| 91视频观看视频| 欧美xfplay| 丝袜国产日韩另类美女| 91在线高清观看| 久久这里都是精品| 午夜精品影院在线观看| 99久久99久久免费精品蜜臀| 精品久久久久久无| 亚洲国产视频网站| gogo大胆日本视频一区| ww亚洲ww在线观看国产| 日韩精品高清不卡| 91久久人澡人人添人人爽欧美| 亚洲精品一区二区三区99| 亚洲成人一二三| 99国产精品国产精品久久| 久久综合久久综合九色| 日韩av电影免费观看高清完整版 | 最近中文字幕一区二区三区| 精品无人码麻豆乱码1区2区 | 午夜精品在线看| 色猫猫国产区一区二在线视频| 欧美激情一区二区三区在线| 狠狠色狠狠色综合系列| 欧美精品xxxxbbbb| 亚洲色图色小说| 成人国产精品免费| 国产无遮挡一区二区三区毛片日本 | 亚洲6080在线| 91久久国产最好的精华液| 中文字幕精品一区二区三区精品 | 欧美一区二区三区爱爱| 亚洲不卡一区二区三区| 91蜜桃视频在线| 中文字幕欧美一| 成人国产一区二区三区精品| 国产日韩欧美在线一区| 精品一区二区免费在线观看| 欧美大片一区二区三区| 午夜精品福利在线| 欧美日韩一区三区四区| 亚洲综合一区二区精品导航| 一本大道av一区二区在线播放| 国产精品狼人久久影院观看方式| 国产激情精品久久久第一区二区| 欧美一级精品在线| 免费在线观看一区二区三区| 欧美精品 国产精品| 午夜久久久久久| 91精品国产综合久久国产大片| 天天爽夜夜爽夜夜爽精品视频| 欧美日韩国产a| 男男视频亚洲欧美| 日韩视频一区在线观看| 久久91精品久久久久久秒播| 欧美va亚洲va香蕉在线| 国内精品伊人久久久久av影院| 精品久久免费看| 国产超碰在线一区| 国产精品人成在线观看免费| 波多野结衣91| 亚洲免费av高清| 欧美日韩成人一区二区| 美女在线观看视频一区二区| 2020日本不卡一区二区视频| 成人听书哪个软件好| 国产精品传媒视频| 欧美视频一二三区| 免费在线观看日韩欧美| 久久久高清一区二区三区| 成人一级片网址| 亚洲一二三四久久| 欧美猛男男办公室激情| 国产一区在线看| 自拍偷在线精品自拍偷无码专区| 在线视频国内一区二区| 日本一不卡视频| 欧美激情一区二区三区蜜桃视频| 99久久综合国产精品| 亚洲综合一二三区| 精品粉嫩aⅴ一区二区三区四区| 国产精品资源在线观看| 一卡二卡欧美日韩| 日韩久久精品一区| 成人97人人超碰人人99| 午夜国产精品影院在线观看| 久久青草欧美一区二区三区| 91久久久免费一区二区| 久久国产福利国产秒拍| 综合在线观看色| 欧美精品三级在线观看| 成人午夜碰碰视频| 天堂一区二区在线| 久久久91精品国产一区二区三区| 一本到不卡免费一区二区| 久久99久久99| 亚洲激情av在线| 2021国产精品久久精品| 91久久久免费一区二区| 国产麻豆精品一区二区| 亚洲18女电影在线观看| 欧美激情一区二区在线| 欧美日本在线观看| 9人人澡人人爽人人精品| 免费亚洲电影在线| 亚洲图片激情小说| 欧美刺激午夜性久久久久久久| 91美女片黄在线观看91美女| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲综合激情小说| 久久久精品综合| 日韩一区二区三区高清免费看看 | 国产亚洲制服色| 91精品欧美久久久久久动漫 | 欧美自拍偷拍午夜视频| 国产精品一区二区久激情瑜伽| 午夜精品一区二区三区免费视频| 国产精品久久久久久久久晋中| 欧美精品1区2区| 日本乱码高清不卡字幕| 成人性色生活片免费看爆迷你毛片| 婷婷开心激情综合| 亚洲激情五月婷婷| 国产精品卡一卡二| 国产日韩欧美精品电影三级在线| 在线播放国产精品二区一二区四区 | 亚洲成a人片在线观看中文| 国产精品国产三级国产三级人妇| 精品久久五月天| 日韩一区二区三区在线| 欧美中文字幕一二三区视频| 成人精品免费视频| 极品少妇一区二区三区精品视频| 亚洲综合成人在线| 日韩美女精品在线| 久久精品一区二区三区不卡牛牛| 91精品国产综合久久久久久久久久 | 一本一道久久a久久精品综合蜜臀| 国产东北露脸精品视频| 国产在线一区观看| 青青草国产精品97视觉盛宴| 天天综合天天做天天综合| 亚洲一区二区三区免费视频| 亚洲精品国产一区二区精华液 | 亚洲精品免费在线|