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

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

?? download.c

?? hifn ipsec固件下載工具
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*----------------------------------------------------------------------------*  Copyright (c) 2006 by Hifn, Inc, Los Gatos, CA, U.S.A.  All Rights Reserved.  This  software is furnished to licensee under a software license  agreement  and may be used and copied only in accordance with the terms and conditions  of such license and with the inclusion of the above Copyright Notice.  This  software  or  any  other  copies  thereof may not be provided or  otherwise  made  available  to any  other person.  No title to and  ownership  of  the  software   is   hereby   transferred   and   licensee  is  subject  to  all  confidentiality  provisions set forth in the  software  license  agreement.  The information in this software is  subject to change without notice.*-----------------------------------------------------------------------------*/static char const hftc_id[] = "$Id: @(#) download.c 1.20@(#) $";/*----------------------------------------------------------------------------* * @file download.c * @brief Download of a cdl file. * * This is part of the download and configuration example program. * This code is very similar to that in the download_file utility, found in * tools/download_file/src. * *----------------------------------------------------------------------------*//* @defgroup CD_API_UTIL *//*------------------------------------* * Header Include *------------------------------------*//* Standard includes */#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>       /* for close  */#include "hftc_pub_common.h"#include "hftc_pub_types.h"#include "hftc_pub_errors.h"#include "hftc_pub_download.h"#include "hftc_pub_base.h"#include "hftc_pub_os_common.h"#include "hftc_pub_translate_enums.h"#include "hftc_pub_service.h"   /* For Viper Reset Patch */#include "hftc_pub_app_utils.h" /* For reading of esc unit table file */#include "download_configure.h"#include "load_config_params.h"      /* For indicies into esc unit table *//*------------------------------------* * Constants and Types *------------------------------------*/#define  DL_DEBUG   0     /* Set = 1 to get debug output, 0 for none. *//*   This is used intenally for exchangeFrames to determine if we are doing a   Code download (.cdl) or Data download (.ddl).*/typedef enum{   CodeDownLoad = 0,   DataDownLoad = 1} DownloadType_t;/*------------------------------------* * External Variables *------------------------------------*//*------------------------------------* * File-Scope Variables *------------------------------------*/static HFTC_socket_t    socket_fd_fs = HFTC_INVALID_SOCKET_FD;static HFTC_sockaddr_t  socket_addr_fs;/*   This is used as a temporary workaround until the status of the Viper   respin or not is known.  This is used to store off the PCI Device ID   of the chip, to know if the Viper soft reset workaround patch needs to be   applied.  A value of 0 is not currently a valid HFTC_DEVICE_ID value,   therefore it is used here to signify that the device id hasn't been set.   The value gets saved in doInfoGathering.*/static uint32_t         PCIDeviceID = 0;        /* 0 is unset *//*   This is used to signal if we need to apply the HFTC_MII_LENGTH_ADJUST   macro to adjust the length of a frame transmitted to the MII port on a   83x0 or 43x0.  We assume this is the case until proven otherwise.*/static HFTC_Boolean_t   MIIAdjust = HFTC_TRUE;/*   This is used to catch resets that occur on images that aren't the first   image being downloaded.  There was a bug where the DPU appeared to be in   a BOOT ROM state, yet the eSC was running code.  While downloading the   DPU worked, download configure issued a reset when downloading the second   image (an eSC image), which then put the DPU into a reset state.  By   catching this case, we can warn the user they need to force a reset via   the --force-reset flag.*/static uint32_t         imagesLoaded = 0;/*------------------------------------* * Local Function Prototypes *------------------------------------*//*------------------------------------* * Implementation *------------------------------------*//*----------------------------------------------------------------------------* *   exchangeFrames *----------------------------------------------------------------------------* * @ingroup CD_API_UTIL * @brief Transmit a frame, and receive a frame (and check its response) * * Does the common inner exchange of transmit, receive, check response * The logic in pseudo code is as follows: * *    do *       transmit frame *       do *          receive frame *          check response *       while pass another *    while timeout && time < RETRANSMIT_RETRY_SECONDS * * @param unit          RO: Unit number of target being downloaded. * @param frameLen      RO: Maximum received frame length in bytes. * @param sendFrameLen  RO: Length in bytes of frame being sent. * @param downloadType  WO: Type of download (cdl or ddl) * @param sframe        RO: Pointer to buffer with frame to send. * @param rframe        WO: Pointer to buffer where frame is received. * * @par Externals: *    None. * * @return * * @par Errors: *    None. * * @par Assumptions: *    Assumes parameters are valid. * *----------------------------------------------------------------------------*/staticHFTC_Status_t exchangeFrames(HFTC_Unit_t          unit,                             uint32_t             frameLen,                             uint32_t             sendFrameLen,                             DownloadType_t       downloadType,                             HFTC_Buffer_t       *sframe,                             HFTC_Buffer_t       *rframe){   HFTC_Status_t        status                  = HFTC_STATUS_OK;   HFTC_Status_t        tstatus                 = HFTC_STATUS_OK;   HFTC_Status_t        retransmitStatus        = HFTC_STATUS_OK;   uint32_t             numRetransmits          = 0;   uint32_t             current_seconds;   uint32_t             current_milliseconds;   uint32_t             end_seconds;   uint32_t             end_milliseconds;   uint32_t             recvFrameLen;   uint32_t             bytesSent;   /*      Get the current time.  We are only going to retry for a limited      amount of clock time, so we need to know how much time has passed.   */   status = HFTC_get_time(&current_seconds, &current_milliseconds);   if (status != HFTC_STATUS_OK)   {      printf("** ERROR: In %s HFTC_get_time problem, "               "status = %s (%d)\n", __func__,               HFTC_Status_t_text(status), status);      return status;   }   end_seconds = current_seconds + RETRANSMIT_RETRY_SECONDS;   end_milliseconds = current_milliseconds;   do   {      /*         Transmit the frame      */      if (MIIAdjust == HFTC_TRUE)      {         HFTC_MII_LENGTH_ADJUST(sendFrameLen);      }      status = HFTC_socket_sendto(socket_fd_fs, sframe, sendFrameLen,                                  &socket_addr_fs, &bytesSent);      if (status != HFTC_STATUS_OK || bytesSent != sendFrameLen)      {         printf("** ERROR: Transmit failed!  Status = %s (%d).\n",                HFTC_Status_t_text(status), status);         status = HFTC_SOCKET_ERROR;         break;      }      do      {         /*            receive frame            check response         */         status = HFTC_socket_recvfrom(socket_fd_fs, rframe, frameLen,                                       &socket_addr_fs, &recvFrameLen);         if (status == HFTC_STATUS_OK)         {            if (downloadType == CodeDownLoad)            {               status = HFTC_CD_CheckCodeResponse(unit,                                                  recvFrameLen,                                                  rframe);            }            else            {               status = HFTC_DD_CheckCfgDataResponse(unit,                                                     recvFrameLen,                                                     rframe);            }         }      } while (status == HFTC_PASS_ANOTHER_RESPONSE);      if (status == HFTC_TIMEOUT)      {         ++numRetransmits;         if (numRetransmits == NUM_RETRANSMITS)         {            printf("Timeout occurred; retrying...\n");         }         if (downloadType == CodeDownLoad)         {            retransmitStatus = HFTC_CD_CodeRetransmit(unit);         }         else         {            retransmitStatus = HFTC_DD_CfgDataRetransmit(unit);         }         if (retransmitStatus != HFTC_STATUS_OK)         {            printf("Code retransmit failed!  Status = %s (%d).\n",                   HFTC_Status_t_text(retransmitStatus), status);            break;         }      }      /*         If RETRANSMIT_RETRY_SECONDS have passed, exit with a timeout.      */      tstatus = HFTC_get_time(&current_seconds, &current_milliseconds);      if (tstatus != HFTC_STATUS_OK)      {         status = tstatus;         printf("** ERROR: In %s HFTC_get_time problem, status = %s (%d)\n",               __func__, HFTC_Status_t_text(status), status);         break;      }      if (current_seconds > end_seconds ||            (current_seconds == end_seconds &&            current_milliseconds >= end_milliseconds))      {         /* Status is already set. */         break;      }   } while (status == HFTC_TIMEOUT);   return status;} /* End exchangeFrames *//*----------------------------------------------------------------------------* *   doInitCodeDownload *----------------------------------------------------------------------------* * @ingroup CD_API_UTIL * @brief Do the HFTC_CD_InitCodeDownload call in the non error path. * * The logic in this routine is similar to that in doCodeDownload.  One * notable difference is that since the call to HFTC_CD_InitCodeDownload * doesn't take any internal data, we have no backing up to do. * Furthermore, it will handle any retransmit that is needed.  Thus, we * loop for not only a return value of HFTC_CALL_AGAIN, but also for a * return value of HFTC_RESULT_UNKNOWN, where the API will do its own * retransmit (transparently to us.) * * @param unit          RO: Unit number of target being downloaded. * @param resetState    RW: A Boolean value indicating if this is the first *                          call to HFTC_CD_InitCodeDownload. * @param param_p       RO: Pointer to initialization parameters for download * @param frameLen      RO: The maximum length of a frame, the size of the *                          sframe buffer and rframe buffer. * @param sframe        WO: Pointer to buffer for frame to send. * @param rframe        WO: Pointer to buffer where frame is received. * * @par Externals: *    None. * * @return * * @par Errors: *    None. * * @par Assumptions: *    None. * *----------------------------------------------------------------------------*/staticHFTC_Status_t doInitCodeDownload(HFTC_Unit_t          unit,                                 HFTC_Boolean_t       resetState,                                 download_param_t    *param_p,                                 uint32_t             frameLen,                                 HFTC_Buffer_t       *sframe,                                 HFTC_Buffer_t       *rframe){   HFTC_Status_t        status                  = HFTC_STATUS_OK;   uint32_t             sendFrameLen;   HFTC_PPCIAddress_t   destPPCIAddr;   /*      Program Download Config Variables      If not documented, then the value is arbitrary.      We don't support authentication at this time.   */   HFTC_Boolean_t       authenticate            = HFTC_FALSE;   HFTC_AuthData_t      authData                = {0};   if (DL_DEBUG)   {      printf("-->%s resetState=%s\n", __func__,             (resetState == HFTC_TRUE) ? "TRUE" : "FALSE");   }   /*      Do the initCodeDownload call.  Loop until we have nothing left to do.   */   do   {      /*         Set the destination PPCI address according to our processor type.      */      destPPCIAddr = param_p->destPPCIAddrDpu;      if (param_p->processorType == HFTC_ESC)      {         destPPCIAddr = param_p->destPPCIAddrEsc;      }      /*         We may get a result unknown (especially on the first transmit) due         to a sequence number error.      */      sendFrameLen = frameLen;      status = HFTC_CD_InitCodeDownload(unit, resetState,                                        param_p->forceDownload,                                        param_p->processorType,                                        param_p->srcMACAddr,                                        param_p->destMACAddr,                                        param_p->srcPPCIAddr,                                        destPPCIAddr,                                        authenticate, &authData,                                       &sendFrameLen, sframe);      if (status != HFTC_STATUS_OK)      {         break;      }      else      {         resetState = HFTC_FALSE;      }      /* Exchange frames */      status = exchangeFrames(unit, frameLen, sendFrameLen, CodeDownLoad,                              sframe, rframe);      /*         If a HFTC_INCONSISTENT error is returned it is probably from an         an old frame that may have been around from before this download         started).  So, we try again with another init code download.         We also loop if we are told to call again, or if we get a result         unknown which occurs when a response has been dropped.      */   } while ( (status == HFTC_CALL_AGAIN) ||             (status == HFTC_RESULT_UNKNOWN) ||             (status == HFTC_INCONSISTENT) );   if (DL_DEBUG)   {      printf("<--%s status = %s; resetState = %s\n", __func__,             HFTC_Status_t_text(status),             HFTC_Boolean_t_text(resetState));   }   return status;} /* End doInitCodeDownload *//*----------------------------------------------------------------------------* *   doSoftBootReset *----------------------------------------------------------------------------* * @ingroup CD_API_UTIL * @brief Do the HFTC_CD_SoftBootReset call in the non error path.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看日韩毛片| 国产一区二区精品久久91| 91麻豆免费在线观看| 国产精品久久久久一区二区三区| 成人精品免费网站| 亚洲日本护士毛茸茸| 欧美无人高清视频在线观看| 亚洲第一久久影院| 日韩片之四级片| 国产精品一二三四| 中文字幕一区免费在线观看 | 中文字幕五月欧美| 91香蕉视频污| 日日欢夜夜爽一区| 亚洲精品在线观| 成人av免费在线观看| 一区二区三区四区激情| 欧美一区二区三区人| 国产一区二区免费视频| 亚洲乱码国产乱码精品精可以看 | 国产精品国模大尺度视频| 色婷婷亚洲综合| 青青草97国产精品免费观看| 中文字幕av免费专区久久| 欧美色国产精品| 激情文学综合网| |精品福利一区二区三区| 欧美一区二区网站| 91小视频在线免费看| 青椒成人免费视频| 亚洲女子a中天字幕| 91精品久久久久久蜜臀| 不卡视频在线看| 日本aⅴ亚洲精品中文乱码| 国产精品区一区二区三区| 欧美男生操女生| 99麻豆久久久国产精品免费优播| 日韩黄色小视频| 亚洲欧洲精品天堂一级| 欧美不卡一二三| 欧洲色大大久久| 成人午夜av影视| 久久99精品久久久久| 亚洲大片免费看| 亚洲欧洲精品一区二区三区| 欧美精品一区二区三区四区| 欧美日韩一区二区在线视频| 国产高清在线精品| 蜜臀av亚洲一区中文字幕| 亚洲乱码一区二区三区在线观看| 久久精品视频一区二区| 91精品国产综合久久福利软件 | 久久精品男人的天堂| 欧美电影在哪看比较好| 91视频观看视频| 成人小视频免费观看| 韩国视频一区二区| 日韩av电影一区| 亚洲午夜精品一区二区三区他趣| 亚洲国产高清在线| 久久久精品综合| 精品国产一区二区在线观看| 91精品国产综合久久福利 | 日韩三级视频中文字幕| 欧美日韩在线播放一区| 在线一区二区三区四区| av午夜一区麻豆| 粉嫩av一区二区三区在线播放 | 中文字幕日韩欧美一区二区三区| 久久久99免费| 久久亚洲精品国产精品紫薇| 日韩一级完整毛片| 欧美大片一区二区| 欧美电视剧在线看免费| 日韩欧美色综合网站| 欧美一激情一区二区三区| 91精品国产综合久久精品| 欧美一卡2卡3卡4卡| 日韩免费在线观看| 欧美变态口味重另类| 精品奇米国产一区二区三区| 日韩午夜激情av| 精品国产凹凸成av人导航| 精品久久久久久综合日本欧美| 91精品国产欧美一区二区| 日韩三级视频在线观看| 欧美精品一区男女天堂| 国产亚洲精品免费| 国产精品久久久久久一区二区三区 | 日韩一区二区在线免费观看| 日韩欧美卡一卡二| 国产视频一区二区在线观看| 国产精品久久久久久久久免费相片| 国产人伦精品一区二区| 亚洲天堂免费在线观看视频| 一区二区三区日韩精品视频| 亚洲一区二区三区四区在线| 视频一区视频二区在线观看| 久久精品理论片| 国产91清纯白嫩初高中在线观看| 成人毛片老司机大片| 欧美亚洲愉拍一区二区| 91精品国产日韩91久久久久久| 久久综合久久综合亚洲| 国产精品久久久久四虎| 亚州成人在线电影| 国内精品自线一区二区三区视频| 国产精品影视网| 一本到一区二区三区| 欧美精品一二三四| 国产农村妇女精品| 亚洲最新视频在线播放| 精品亚洲国内自在自线福利| 成人av免费在线观看| 91精品国产高清一区二区三区蜜臀| 精品伦理精品一区| 亚洲私人黄色宅男| 美女视频一区二区| 91在线观看高清| 日韩欧美三级在线| 亚洲欧美精品午睡沙发| 免费高清成人在线| 97久久超碰国产精品电影| 这里是久久伊人| 亚洲视频中文字幕| 久久99在线观看| 在线视频一区二区三区| 久久久噜噜噜久噜久久综合| 婷婷综合在线观看| 成人网在线播放| 欧美zozo另类异族| 亚洲综合免费观看高清完整版在线| 激情综合色播激情啊| 欧美人狂配大交3d怪物一区| 国产精品国产馆在线真实露脸 | 国产传媒一区在线| 制服丝袜中文字幕一区| 亚洲欧洲精品成人久久奇米网| 韩国一区二区三区| 欧美一区二区国产| 亚洲国产一区二区三区青草影视| 成人永久aaa| 日韩精品一区二区三区视频| 午夜精品福利在线| 91一区在线观看| 国产精品国产三级国产aⅴ入口| 国产在线精品一区二区不卡了 | 精品粉嫩超白一线天av| 亚洲一区二区三区四区不卡| 成人精品小蝌蚪| 国产亚洲综合在线| 国内精品自线一区二区三区视频| 欧美男男青年gay1069videost| 亚洲啪啪综合av一区二区三区| 岛国一区二区三区| 国产三级精品三级在线专区| 另类欧美日韩国产在线| 在线电影欧美成精品| 亚洲一区二区三区视频在线播放| 99精品1区2区| 亚洲三级电影网站| 99国产精品久久久久久久久久 | 美美哒免费高清在线观看视频一区二区 | 欧洲亚洲国产日韩| 一区二区三区日韩在线观看| 色呦呦国产精品| 亚洲免费在线视频| 在线观看一区不卡| 亚洲一区二区在线免费看| 一本在线高清不卡dvd| 亚洲精品ww久久久久久p站| 91免费国产在线| 亚洲精品va在线观看| 一本久久精品一区二区| 亚洲一区二区视频在线| 欧美高清性hdvideosex| 日韩精品成人一区二区三区| 欧美一二三区精品| 国产曰批免费观看久久久| 久久久www免费人成精品| 成人av片在线观看| 一区二区三区国产精华| 欧美美女网站色| 国产麻豆9l精品三级站| 国产精品美女一区二区| 91视频91自| 性久久久久久久| 久久蜜桃av一区精品变态类天堂| 大白屁股一区二区视频| 亚洲欧洲日产国产综合网| 欧美日韩精品一区二区三区蜜桃| 日韩精品亚洲一区二区三区免费| 日韩欧美成人激情| 成人黄色国产精品网站大全在线免费观看 | 99久久婷婷国产精品综合| 亚洲综合网站在线观看| 7777精品伊人久久久大香线蕉超级流畅| 老司机精品视频导航| 国产精品日韩精品欧美在线| 欧美日韩日日夜夜|