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

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

?? ftplib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
**     if (ftpXfer ("server", "fred", "magic", "",*                  "RETR %s", "/usr/fred", "myfile",*                  &ctrlSock, &dataSock) == ERROR)*         return (ERROR);**     while ((nBytes = read (dataSock, buf, sizeof (buf))) > 0)*         {*         ...*         }**     close (dataSock);**     if (nBytes < 0)             /@ read error? @/*         status = ERROR;**     if (ftpReplyGet (ctrlSock, TRUE) != FTP_COMPLETE)*         status = ERROR;**     if (ftpCommand (ctrlSock, "QUIT", 0, 0, 0, 0, 0, 0) != FTP_COMPLETE)*         status = ERROR;**     close (ctrlSock);* .CE** RETURNS:* OK, or ERROR if any socket cannot be created or if a connection cannot be* made.** SEE ALSO: ftpReplyGet()*/STATUS ftpXfer    (    char *host,         /* name of server host */    char *user,         /* user name for host login */    char *passwd,       /* password for host login */    char *acct,         /* account for host login */    char *cmd,          /* command to send to host */    char *dirname,      /* directory to 'cd' to before sending command */    char *filename,     /* filename to send with command */    int *pCtrlSock,     /* where to return control socket fd */    int *pDataSock      /* where to return data socket fd, */                        /* (NULL == don't open data connection) */    )    {    FAST int ctrlSock = ERROR;    FAST int dataSock = ERROR;    UINT32 ftpReply   = 0;    UINT32 retryCount = 0;    int    cmdResult;          struct fd_set readFds; /* Used by select for PORT method */    int    width;          /* Used by select for PORT method */    BOOL   dataSockPassive = TRUE;    FTPLDEBUG ("ftpXfer: host:%s user:%s passwd:%s acct:%s cmd:%s dir:%s\n",  \               FTPL_DEBUG_ERRORS,host,user,passwd,acct,cmd,dirname);    if (((ctrlSock = ftpHookup (host)) == ERROR)    ||        (ftpLogin (ctrlSock, user, passwd, acct) != OK)    ||        (ftpCommand (ctrlSock, "TYPE I",0,0,0,0,0,0) != FTP_COMPLETE)  ||        ((dirname[0] != EOS) && (ftpCommand (ctrlSock, "CWD %s",         (int)dirname,0,0,0,0,0) != FTP_COMPLETE)))        {        /* Detected an error during command establishment */        FTPLDEBUG ("ftpXfer: Detected an error during command establishment errno:0x%08x",  \                    FTPL_DEBUG_ERRORS,errno,1,2,3,4,5);        close (ctrlSock);        return (ERROR);        }    /*     * This is a special when an FTP command does not need to establish a     * data connection.     */    if (pDataSock == NULL)        {        if (ftpCommand (ctrlSock, cmd, (int)filename, 0, 0, 0, 0, 0)                         != FTP_COMPLETE)            {            /* FTP command error. */            FTPLDEBUG ("ftpXfer: error during command.  errno:0x%08x",  \            FTPL_DEBUG_ERRORS, errno,1,2,3,4,5);            close (ctrlSock);            return (ERROR);            }        }           /*      * At this point we are trying to establish the data socket.     * We will first try using the modern, client-initiated PASV command.        * If PASV fails,  then we will fall back to the PORT command.      */    /*  Set up local data port and send the PORT command */    do         {        if ((dataSock = ftpDataConnInitPassiveMode (ctrlSock)) != ERROR)            {            FTPLDEBUG ("ftpXfer: notice - mode succeeded.\n ", \                FTPL_DEBUG_ERRORS, 0, 1, 2, 3, 4, 5);            dataSockPassive = TRUE; /* We do not need to listen() on the socket */            }        else            {            FTPLDEBUG ("ftpXfer: notice - PASV mode failed. Now trying older PORT connect method", \                FTPL_DEBUG_ERRORS, 0, 1, 2, 3, 4, 5);            if ((dataSock = ftpDataConnInit (ctrlSock)) == ERROR)                {                FTPLDEBUG ("ftpXfer:  ftpDataConnInit - error during trying of another port. errno:0x%08x",  \                    FTPL_DEBUG_ERRORS, errno, 1, 2, 3, 4, 5);                close (ctrlSock);                return (ERROR);                }             else                dataSockPassive = FALSE; /* We will need to listen() on the socket */            }        /* Send the FTP command.  */        cmdResult = ftpCommandEnhanced (ctrlSock,                                         cmd,                                         (int)filename,                                        0, 0, 0, 0, 0, NULL, 0);        if ((cmdResult/100) != FTP_PRELIM)            {            /*              * The command has failed.  Close the data socket and decode the error.             */            close (dataSock);            /* Check if something really bad happened: File not found, etc. */            if ((cmdResult/100) == FTP_ERROR)                {                FTPLDEBUG ("ftpXfer:  response 0x%08x - aborting transfer.\n", \                    FTPL_DEBUG_ERRORS, cmdResult, 1, 2, 3, 4, 5);                close (ctrlSock);                return (ERROR);                }            if ((cmdResult/100) == FTP_TRANSIENT && _func_ftpTransientFatal != NULL)                {                FTPLDEBUG ("ftpXfer:  calling user-supplied applette to see if 0x%08x FTP_TRANSIENT is fatal for this command.\n", \                    FTPL_DEBUG_ERRORS, cmdResult, 1, 2, 3, 4, 5);                if ((* _func_ftpTransientFatal) (cmdResult) == TRUE)                    {                    FTPLDEBUG ("ftpXfer:  user-supplied applette says 0x%08x FTP_TRANSIENT  ** IS ** fatal for this command.\n", \                    FTPL_DEBUG_ERRORS, cmdResult, 1, 2, 3, 4, 5);                    close (ctrlSock);                    errno = S_ftpLib_FATAL_TRANSIENT_RESPONSE;                    return (ERROR);                    }                FTPLDEBUG ("ftpXfer:  user-supplied applette says 0x%08x is  ** NOT ** fatal for this command.\n", \                    FTPL_DEBUG_ERRORS, cmdResult, 1, 2, 3, 4, 5);                }            if ((ftpReply = (cmdResult/100)) == FTP_TRANSIENT)                {                /*                 * If the error was due to transient error (e.x. the data port                 * was not available) retry the command                  * ftplTransientMaxRetryCount times.                   */                if (retryCount < ftplTransientMaxRetryCount)                    {                    ++retryCount;                    FTPLDEBUG ("ftpXfer: warning - reply was %d(decimal) - FTP_PRELIM - #%d attempt in %d ticks.\n", \                                FTPL_DEBUG_ERRORS,cmdResult,retryCount,                                ftplTransientRetryInterval, 5, 6, 7);                    if (ftplTransientRetryInterval)                        taskDelay (ftplTransientRetryInterval);                    continue; /* try another port */                }                else                {                /* Too many retries,  close socket and return failure */                FTPLDEBUG ("ftpXfer: error - reply was %d(decimal) - FTP_PRELIM - attempt limit (%d) exceeded.\n", \                           FTPL_DEBUG_ERRORS,                           cmdResult,                           ftplTransientMaxRetryCount,                           5, 6, 7, 8);                close (ctrlSock);                errno = S_ftpLib_TRANSIENT_RETRY_LIMIT_EXCEEDED;                return (ERROR);                }                /* Exit for any other error */                FTPLDEBUG ("ftpXfer: error - ftpCommand != FTP_PRELIM.  errno:0x%08x\n", \                           FTPL_DEBUG_ERRORS, errno, 1, 2, 3, 4, 5);                close (ctrlSock);                return (ERROR);                }            }        if ( dataSockPassive == FALSE)            {            /* At this point do a select on the data & control socket */            FTPLDEBUG ("ftpXfer: notice - cmdResult:%d dataSock:%d ctrlSock:%d  errno:0x%08x\n", \                FTPL_DEBUG_ERRORS, cmdResult, dataSock, ctrlSock, errno, 4, 5);            FD_ZERO (&readFds);            FD_SET  (ctrlSock, &readFds);            FD_SET  (dataSock, &readFds);            width = (dataSock > ctrlSock) ? dataSock : ctrlSock;            width++;            if (select (width, &readFds, NULL, NULL, NULL) == ERROR)                {                FTPLDEBUG ("ftpXfer: error - select()==ERROR. errno:0x%08x\n", \                           FTPL_DEBUG_ERRORS,errno, 1, 2, 3, 4, 5);                close (dataSock);                close (ctrlSock);                return (ERROR);                }            /* If the control socket is ready process it and take a decision,             * try again or return error. If the data socket is ready call             * ftpDataConnGet next.             */            if (FD_ISSET (ctrlSock, &readFds) && ! FD_ISSET (dataSock, &readFds))                {                close (dataSock);                FTPLDEBUG ("ftpXfer: warning - control socket ready but data socket not ready\n", \                           FTPL_DEBUG_ERRORS,0, 1, 2, 3, 4, 5);                if ((ftpReply = ftpReplyGet (ctrlSock, FALSE)) == FTP_TRANSIENT)                    continue; /* Try another port */                /* Regardless of response close sockets */                FTPLDEBUG ("ftpXfer:  error - sending QUIT command to host. errno:0x%08x\n", \                            FTPL_DEBUG_ERRORS,errno,1,2,3,4,5);                (void) ftpCommand (ctrlSock, "QUIT", 0, 0, 0, 0, 0, 0);                close (ctrlSock);                return (ERROR);                }            } /* PORT method requires checking for data socket connection */        } while ( ftpReply == FTP_TRANSIENT); /* Try again, we might need a different port */    /* If we used PASV mode,  then the socket is ready for use */    if (!dataSockPassive)        {        /*          * We used the PORT method to establish a connection.         * The data socket connection is configured. Wait for the FTP server to connect         * to us.         */        if ((dataSock = ftpDataConnGet (dataSock)) == ERROR)            {            FTPLDEBUG ("ftpXfer: error - ftpDataConnGet()==ERROR. errno:0x%08x\n", \                FTPL_DEBUG_ERRORS,errno, 1, 2, 3, 4, 5);            close (ctrlSock);            return (ERROR);            }        }    /* Store the control and data sockets */    if (pCtrlSock != NULL)        *pCtrlSock = ctrlSock;    if (pDataSock != NULL)        *pDataSock = dataSock;    return (OK);    }/********************************************************************************* ftpReplyGet - get an FTP command reply** This routine has been superceded by ftpReplyGetEnhanced()** This routine gets a command reply on the specified control socket.** The three-digit reply code from the first line is saved and interpreted.* The left-most digit of the reply code identifies the type of code* (see RETURNS below).** The caller's error status is always set to the complete three-digit reply code* regardless of the actual reply value (see the manual entry for errnoGet()).* If the reply code indicates an error, the entire reply* is printed if the ftp error printing is enabled (see the manual* entry for ftpLibDebugOptionsSet()).** If an EOF is encountered on the specified control socket, but no EOF was* expected (<expecteof> == FALSE), then ERROR is returned.** RETURNS:*  1 = FTP_PRELIM (positive preliminary)*  2 = FTP_COMPLETE (positive completion)*  3 = FTP_CONTINUE (positive intermediate)*  4 = FTP_TRANSIENT (transient negative completion)*  5 = FTP_ERROR (permanent negative completion)** ERROR if there is a read/write error or an unexpected EOF.*/int ftpReplyGet    (    int ctrlSock,       /* control socket fd of FTP connection */    BOOL expecteof      /* TRUE = EOF expected, FALSE = EOF is error */    )    {    /* return most significant digit of reply */    return (ftpReplyGetEnhanced (ctrlSock, expecteof, NULL, 0) / 100);    }/********************************************************************************* ftpReplyGetEnhanced - get an FTP command reply** This routine supercedes ftpReplyGet()** This routine gets a command reply on the specified control socket.** The three-digit reply code from the first line is saved and interpreted.* The left-most digit of the reply code identifies the type of code* (see RETURNS below).** The caller's error status is always set to the complete three-digit reply code* (see the manual entry for errnoGet()).* If the reply code indicates an error, the entire reply* is printed if the ftp error printing is enabled (see the manual* entry for ftpLibDebugOptionsSet()).** The last line of text retrieved from the servers response is stored*     in the location specified by replyString.   If replyString is NULL*     the parameter is ignored.** If an EOF is encountered on the specified control socket, but no EOF was* expected (<expecteof> == FALSE), then ERROR is returned.** RETURNS:*  The complete FTP response code (see RFC #959)** ERROR if there is a read/write error or an unexpected EOF.*/int ftpReplyGetEnhanced    (    int ctrlSock,       /* control socket fd of FTP connection */    BOOL expecteof,     /* TRUE = EOF expected, FALSE = EOF is error */    char *replyString,  /* Location to store text of reply, or NULL */    int  stringLengthMax /* Maximum length of reply (not including NULL) */     )    {    char c;    FAST int codeType;    FAST int code;    FAST int dig;    int continuation;    int origCode;    int stringIndex;    BOOL eof;    /* read all lines of a reply:     *    do     *	      while not eof and not eol     *	          process char     *    while not eof and not last line of reply     */    origCode = 0;    codeType = 0;    do        {        /* read all characters of a line */        dig  = 0;        code = 0;        stringIndex = 0;        continuation = FALSE;        while (!(eof = (read (ctrlSock, &c, 1) == 0)) && (c != '\n'))            {            /* Store the reply */            if (replyString != NULL)                {                if (stringIndex < stringLengthMax)                    {                    replyString[stringIndex] = c;                    stringIndex++;                    }                }            dig++;            

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩成人高清| 亚洲成人在线网站| 国产成人无遮挡在线视频| 26uuu亚洲婷婷狠狠天堂| 国内偷窥港台综合视频在线播放| 欧美一级日韩不卡播放免费| 青草av.久久免费一区| 精品欧美一区二区在线观看| 精品在线观看视频| 日本一区二区三区在线观看| k8久久久一区二区三区| 亚洲精品视频自拍| 欧美日韩五月天| 另类的小说在线视频另类成人小视频在线 | 一本色道久久加勒比精品| 亚洲黄色片在线观看| 在线不卡a资源高清| 国精产品一区一区三区mba视频| 久久精品一二三| 色欧美乱欧美15图片| 三级欧美在线一区| 国产丝袜在线精品| 欧洲另类一二三四区| 麻豆91精品91久久久的内涵| 日本一区二区综合亚洲| 在线国产电影不卡| 韩国精品久久久| 亚洲三级电影全部在线观看高清| 欧美三级韩国三级日本三斤| 精品一区二区免费视频| 中文字幕亚洲电影| 欧美一级高清片| 成a人片亚洲日本久久| 天天av天天翘天天综合网色鬼国产 | 色婷婷av一区二区三区软件| 亚洲一级在线观看| 久久久亚洲欧洲日产国码αv| 91在线视频网址| 蜜臀91精品一区二区三区| 亚洲美女一区二区三区| 久久亚洲精精品中文字幕早川悠里 | 亚洲男人的天堂av| 精品粉嫩超白一线天av| 欧美亚洲图片小说| 成人在线综合网站| 日韩精品免费视频人成| 亚洲精品成人天堂一二三| 日韩一区二区高清| 在线一区二区三区四区五区 | 色综合天天天天做夜夜夜夜做| 免费一级欧美片在线观看| 亚洲蜜臀av乱码久久精品 | 欧美日韩精品欧美日韩精品| 盗摄精品av一区二区三区| 免费人成在线不卡| 五月天网站亚洲| 亚洲人成网站色在线观看| 欧美精品一区二区久久久| 在线不卡a资源高清| 91在线无精精品入口| 国v精品久久久网| 久草中文综合在线| 美女视频网站黄色亚洲| 亚洲综合在线免费观看| 《视频一区视频二区| 国产亚洲精品中文字幕| 欧美大尺度电影在线| 欧美亚洲一区二区在线| 色欲综合视频天天天| 成人黄色a**站在线观看| 精品一区二区三区久久久| 日本va欧美va瓶| 日本欧美加勒比视频| 日韩高清电影一区| 日韩av中文在线观看| 日韩成人午夜精品| 日日骚欧美日韩| 亚洲不卡一区二区三区| 亚洲h精品动漫在线观看| 亚洲国产中文字幕| 亚洲综合在线免费观看| 一区二区三区免费看视频| 亚洲视频在线一区二区| 亚洲三级理论片| 尤物视频一区二区| 亚洲国产aⅴ成人精品无吗| 午夜成人免费电影| 日韩av电影天堂| 韩国一区二区在线观看| 国产成人亚洲综合a∨婷婷| 国产jizzjizz一区二区| 成人av高清在线| 色婷婷av一区二区三区大白胸 | 国产乱妇无码大片在线观看| 黄一区二区三区| 国产伦精品一区二区三区免费迷| 久久99精品久久只有精品| 国产精品1区2区| 99免费精品在线| 在线观看av一区| 欧美肥妇free| 国产欧美日韩综合精品一区二区| 国产精品剧情在线亚洲| 亚洲老司机在线| 人人超碰91尤物精品国产| 久久99精品久久久| 菠萝蜜视频在线观看一区| 色婷婷综合久色| 欧美一级片在线| 国产精品久久夜| 婷婷久久综合九色综合绿巨人| 久久国产精品99精品国产| 成人免费视频视频在线观看免费| 91黄色在线观看| 日韩精品一区二区三区中文不卡| 亚洲国产经典视频| 午夜成人免费视频| 成人涩涩免费视频| 欧美精品久久久久久久多人混战| 精品欧美乱码久久久久久1区2区| 国产精品黄色在线观看| 日日欢夜夜爽一区| 99在线精品免费| 欧美一级电影网站| 亚洲精品中文在线影院| 国产主播一区二区三区| 日本高清成人免费播放| 欧美va亚洲va| 一区二区三区免费看视频| 国产成人综合自拍| 91精品国产综合久久久久| 中文字幕在线不卡视频| 青青草国产成人av片免费| 成人国产精品免费网站| 日韩欧美一区二区免费| 1024成人网色www| 麻豆成人av在线| 欧美性做爰猛烈叫床潮| 国产精品美女久久久久久久久久久| 首页综合国产亚洲丝袜| 成人一区二区视频| 91精品久久久久久久99蜜桃| 亚洲精品欧美激情| 大胆欧美人体老妇| 精品国产伦一区二区三区免费| 亚洲成精国产精品女| 99re在线精品| 国产精品素人视频| 国产又粗又猛又爽又黄91精品| 7777精品伊人久久久大香线蕉最新版| 18涩涩午夜精品.www| 成人午夜视频在线观看| 日韩精品在线看片z| 日韩av电影天堂| 欧美日韩一区二区欧美激情| 亚洲欧美乱综合| 91在线云播放| 亚洲欧洲综合另类在线| 成a人片国产精品| 国产精品色呦呦| 国产成人av福利| 国产欧美日韩综合| 国产成+人+日韩+欧美+亚洲 | 欧美激情综合五月色丁香小说| 久久不见久久见免费视频1| 欧美日韩免费观看一区三区| 亚洲国产一区二区视频| 在线观看日韩电影| 亚洲精品国产一区二区精华液 | 亚洲成人av在线电影| 欧美亚州韩日在线看免费版国语版| 亚洲乱码国产乱码精品精小说 | 亚洲狠狠爱一区二区三区| 99re热这里只有精品免费视频| 国产精品高潮呻吟| 99久久国产综合精品麻豆| 亚洲婷婷综合久久一本伊一区| 91麻豆swag| 一区二区三区av电影| 欧美中文字幕一区二区三区亚洲| 一区二区激情视频| 欧美日韩国产首页| 秋霞成人午夜伦在线观看| 欧美一区二区三区白人| 精品亚洲porn| 久久久精品国产99久久精品芒果| 国产高清在线观看免费不卡| 国产精品午夜春色av| 91黄色免费观看| 亚洲aⅴ怡春院| 日韩一区二区三区av| 国产精品 欧美精品| 亚洲色图都市小说| 欧美日本精品一区二区三区| 久久99久久99精品免视看婷婷| 欧美r级电影在线观看| 成人小视频在线| 亚洲国产精品一区二区www| 日韩欧美久久一区| aa级大片欧美|