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

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

?? netdrv.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
    if (pNetDev->protocol == PROTO_FTP &&        ftpCommand (ctrlSock, "QUIT",0,0,0,0,0,0) != FTP_COMPLETE)        {        NETDRV_DEBUG ("netFileExists:  error calling ftpCommand(\"QUIT\"). errno:0x%08x\n", errno,1,2,3,4,5);        status = ERROR;        }    close (ctrlSock);    KHEAP_FREE (pDirName);    KHEAP_FREE (pFileName);    NETDRV_DEBUG ("netFileExists:  returning (%d)\n", status,1,2,3,4,5);    return (status);    }/********************************************************************************* netGet - downLoad a file from a remote machine via the network.** The remote shell daemon on the machine 'host' is used to download* the given file to the specified previously opened network file descriptor.* The remote userId should have been set previously by a call to iam().* If the file does not exist, the error message from the UNIX 'host'* is printed to the VxWorks standard error file descriptor and ERROR* is returned.** RETURNS: OK or ERROR.*/LOCAL STATUS netGet    (    FAST NET_FD *pNetFd    )    {    int dataSock;    int ctrlSock;    char buf [DATASIZE];	/* make buf the same size as NET_FD's databuf */    FAST int nBytes = -1;    char command[MAX_FILENAME_LENGTH];    char buffer [MAX_FILENAME_LENGTH];    int saveOptions;    STATUS status = OK;    char usr [MAX_IDENTITY_LEN];    char passwd [MAX_IDENTITY_LEN];    char *errMsg = "cat: read error: Is a directory";    int errMsgLen = strlen (errMsg);    remCurIdGet (usr, passwd);    if (pNetFd->pNetDev->protocol == PROTO_FTP)        {        if (ftpXfer (pNetFd->pNetDev->host, usr, passwd, "",                     "RETR %s", pNetFd->remDirName, pNetFd->remFileName,                     &ctrlSock, &dataSock) == ERROR)            {            NETDRV_DEBUG ("netGet:  error calling ftpXfer(). errno:0x%08x\n", errno,1,2,3,4,5);            return (ERROR);            }        }    else        {        if (pathCat (pNetFd->remDirName, pNetFd->remFileName, buffer) == ERROR)           {           NETDRV_DEBUG ("netGet:  error calling pathCat(). errno:0x%08x\n", errno,1,2,3,4,5);           return (ERROR);           }         sprintf (command, "/bin/cat < %s", buffer);        dataSock = rcmd (pNetFd->pNetDev->host, RSHD, usr,                         usr, command, &ctrlSock);        if (dataSock == ERROR)            {            NETDRV_DEBUG ("netGet:  error calling rcmd(). errno:0x%08x\n", errno,1,2,3,4,5);            return (ERROR);            }        }    /* Set file pointer to beginning of file */    if (netSeek (pNetFd, 0) == ERROR)        {        if (pNetFd->pNetDev->protocol == PROTO_FTP &&            ftpCommand (ctrlSock, "QUIT",0,0,0,0,0,0) != FTP_COMPLETE)            {            NETDRV_DEBUG ("netGet:  error calling ftpCommand(\"QUIT\"). errno:0x%08x\n",\                          errno,1,2,3,4,5);            status = ERROR;            }        close (dataSock);        close (ctrlSock);        return (ERROR);        }    /* set mode to write so that file can be written to,    *  save original options so they can be restored later    */    saveOptions = pNetFd->options;    pNetFd->options = O_WRONLY & pNetFd->pNetDev->fdMode;    /* read bytes from socket and write them     * out to file descriptor one block at a time     */    while ((status == OK) &&           ((nBytes = read (dataSock, buf, sizeof (buf))) > 0))        {        if (netWrite (pNetFd, buf, nBytes) != nBytes)            {            NETDRV_DEBUG ("netGet:  error calling netWrite(). errno:0x%08x\n", \                          errno,1,2,3,4,5);            status = ERROR;            }        }    if (nBytes < 0)   /* recv error */            status = ERROR;    close (dataSock);    if (pNetFd->pNetDev->protocol == PROTO_FTP)        {        if (ftpReplyGet (ctrlSock, FALSE) != FTP_COMPLETE)            {            NETDRV_DEBUG ("netGet:  error calling ftpReplyGet(). errno:0x%08x\n", \                          errno,1,2,3,4,5);            status = ERROR;            }        }    else        {        /* check control socket for error */        if ((nBytes = fioRead (ctrlSock, buf, sizeof (buf) - 1)) > 0)            {            /* print error message on standard error fd */            buf [nBytes] = EOS;	/* insure string termination */            /* check error message indicating cat of NFS mounted directory */            if (strncmp (buf, errMsg, errMsgLen) != 0)                {                NETDRV_DEBUG ("netGet: %s:%s  . errno:0x%08x\n",                                   pNetFd->pNetDev->host, buf, errno,1,2,3);                /* set the task's status according to the UNIX error */                getNetStatus (buf);                status = ERROR;                }            }    }    if (pNetFd->pNetDev->protocol == PROTO_FTP &&        ftpCommand (ctrlSock, "QUIT",0,0,0,0,0,0) != FTP_COMPLETE)        {        NETDRV_DEBUG ("netGet:  error calling ftpCommand(\"QUIT\"). errno:0x%08x\n", \                      errno,1,2,3,4,5);        status = ERROR;        }    close (ctrlSock);    pNetFd->options = saveOptions;	/* restore original options */    return (status);    }/********************************************************************************* netPut - upload a file to a remote machine via the network.** The remote shell daemon on the machine 'host' is used to upload* from the open network file descriptor to a remote file.* The remote userId should have been set previously be a call* to iam().  If an error occurs, the UNIX error is output to the* VxWorks standard error fd.** RETURNS: OK or ERROR.*/LOCAL STATUS netPut    (    FAST NET_FD *pNetFd    )    {    int dataSock;    int ctrlSock;    char buf [DATASIZE];	/* make buf the same size as NET_FD's databuf */    FAST int nBytes = -1;    char command[MAX_FILENAME_LENGTH];    char buffer[MAX_FILENAME_LENGTH];    int saveOptions;    STATUS status = OK;    char usr [MAX_IDENTITY_LEN];    char passwd [MAX_IDENTITY_LEN];    remCurIdGet (usr, passwd);    if (pNetFd->pNetDev->protocol == PROTO_FTP)        {        if (ftpXfer (pNetFd->pNetDev->host, usr, passwd, "",                     "STOR %s", pNetFd->remDirName, pNetFd->remFileName,                      &ctrlSock, &dataSock) == ERROR)            {            NETDRV_DEBUG ("netPut:  error calling ftpXfer()  errno:0x%08x\n", \                          errno,1,2,3,4,5);            return (ERROR);            }        }    else        {        if (pathCat (pNetFd->remDirName, pNetFd->remFileName, buffer) == ERROR)            {            NETDRV_DEBUG ("netPut:  error calling pathCat(). errno:0x%08x\n", \                          errno,1,2,3,4,5);            return (ERROR);            }        sprintf (command, "/bin/cat > %s", buffer);        dataSock = rcmd (pNetFd->pNetDev->host, RSHD, usr,                         usr, command, &ctrlSock);        if (dataSock == ERROR)            {            NETDRV_DEBUG ("netPut:  error calling rcmd(). errno:0x%08x\n", \                          errno,1,2,3,4,5);            return (ERROR);            }        }    /* Set file pointer to beginning of file */    if (netSeek (pNetFd, 0) == ERROR)        {        if (pNetFd->pNetDev->protocol == PROTO_FTP &&            ftpCommand (ctrlSock, "QUIT",0,0,0,0,0,0) != FTP_COMPLETE)            {            NETDRV_DEBUG ("netPut: error calling ftpCommand(\"QUIT\").  errno:0x%08x\n",\                          errno,1,2,3,4,5);            status = ERROR;            }        close (dataSock);        close (ctrlSock);        return (ERROR);        }    /* set mode to write so that file can be written to,     * save original options so they can be restored later     */        saveOptions = pNetFd->options;        pNetFd->options = O_RDONLY & pNetFd->pNetDev->fdMode;    /* Read the data from one DATABLOCK into buffer.     *  Continue until file pointer reaches the end of file.     */    while (status == OK && (nBytes = netRead (pNetFd, buf, sizeof (buf))) > 0)        {        if (write (dataSock, buf, nBytes) != nBytes)            {            NETDRV_DEBUG ("netPut:  error calling write(). errno:0x%08x\n", \                          errno,1,2,3,4,5);            status = ERROR;            }        }    if (nBytes < 0)		/* netRead error */        {        NETDRV_DEBUG ("netPut:  error calling netRead(). errno:0x%08x\n",                       errno,1,2,3,4,5);        status = ERROR;        }    if (close (dataSock) == ERROR)        {        NETDRV_DEBUG ("netPut:  error calling close(). errno:0x%08x\n", errno,1,2,3,4,5);        status = ERROR;        }    if (pNetFd->pNetDev->protocol == PROTO_FTP)        {        if (ftpReplyGet (ctrlSock, FALSE) != FTP_COMPLETE)            {            NETDRV_DEBUG ("netPut:  error calling ftpReplyGet(). errno:0x%08x\n", \                          errno,1,2,3,4,5);            status = ERROR;            }        }    else        {        /* check control socket for error */        if ((nBytes = fioRead (ctrlSock, buf, sizeof (buf) - 1)) > 0)            {            /* print error message */            buf [nBytes] = EOS;	/* insure string termination */            NETDRV_DEBUG ("netPut: %s:%s  . errno:0x%08x\n",                            pNetFd->pNetDev->host, buf, errno,1,2,3);            /* set the task's status according to the UNIX error */            getNetStatus (buf);            NETDRV_DEBUG ("netPut:  error calling fioRead(). errno:0x%08x\n", \                          errno,1,2,3,4,5);            status = ERROR;            }        }    if (pNetFd->pNetDev->protocol == PROTO_FTP &&        ftpCommand (ctrlSock, "QUIT",0,0,0,0,0,0) != FTP_COMPLETE)        {        NETDRV_DEBUG ("netPut:  error calling ftpCommand(). errno:0x%08x\n", \                      errno,1,2,3,4,5);        status = ERROR;        }    close (ctrlSock);    pNetFd->options = saveOptions;	/* restore original options */    return (status);    }/****************************************************************************** getNetStatus - set task status according to network error** Compares string in buf with some known UNIX errors that can occur when* copying files over the network.  Sets task status accordingly.*/LOCAL void getNetStatus    (    char *buf           /* buffer containing string with UNIX error */    )    {    FAST char *pErr;    pErr = (char *) index (buf, ':');    if (pErr == NULL)        errno = S_netDrv_UNIX_FILE_ERROR;    else if (strcmp (pErr, ": Permission denied\n") == 0)        errno = S_netDrv_PERMISSION_DENIED;    else if (strcmp (pErr, ": No such file or directory\n") == 0)        errno = S_netDrv_NO_SUCH_FILE_OR_DIR;    else if (strcmp (pErr, ": Is a directory\n") == 0)        errno = S_netDrv_IS_A_DIRECTORY;    else        errno = S_netDrv_UNIX_FILE_ERROR;    }/********************************************************************************* netRead - read bytes from remote file** netRead reads up to the specified number of bytes from the open network* file descriptor and puts them into a buffer.  Bytes are read starting* from the point marked by the file pointer.  The file pointer is then* updated to point immediately after the last character that was read.** Called only by the I/O system.** SIDE EFFECTS: moves file pointer** RETURNS: Number of bytes read, or ERROR.*/LOCAL int netRead    (    FAST NET_FD *pNetFd,        /* pointer to open network file descriptor */    char *buf,                  /* pointer to buffer to receive bytes   */    FAST int maxBytes           /* max number of bytes to read into buffer */    )    {    STATUS status = OK;    FAST int byteCount = 0;	/* number of bytes read so far */    /* check for valid maxbytes */    if (maxBytes <= 0)        {        errno = S_netDrv_INVALID_NUMBER_OF_BYTES;        return (ERROR);        }    /* if file opened for O_WRONLY, don't read */    if ((pNetFd->options & pNetFd->pNetDev->fdMode) == O_WRONLY)        {        errno = S_netDrv_WRITE_ONLY_CANNOT_READ;        return (ERROR);        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷综合久久久久中文一区二区| 亚洲国产精品一区二区久久 | 国产日韩欧美制服另类| 91精品国产综合久久久久久| 欧美日韩一区二区欧美激情| 欧美日韩国产天堂| 欧美日本一区二区三区四区| 欧美精品粉嫩高潮一区二区| 在线观看精品一区| 欧美色图在线观看| 91精品在线一区二区| 欧美一区二区啪啪| 欧美不卡一区二区三区| 欧美v亚洲v综合ⅴ国产v| 欧美电影免费观看高清完整版在| 不卡的电影网站| 91福利在线导航| 欧美一级搡bbbb搡bbbb| 久久综合色天天久久综合图片| 欧美一区2区视频在线观看| 91精品国产高清一区二区三区蜜臀 | 精品剧情在线观看| 国产欧美日韩另类一区| 亚洲精品免费视频| 日韩av网站免费在线| 国产一区二区三区香蕉| av在线综合网| 7777精品伊人久久久大香线蕉完整版 | 欧美性一二三区| 日韩一卡二卡三卡四卡| 国产三级三级三级精品8ⅰ区| 亚洲婷婷在线视频| 免费欧美日韩国产三级电影| 成人小视频在线| 欧美一区二区在线视频| 国产精品国产三级国产普通话99| 水蜜桃久久夜色精品一区的特点| 国产精品一二三四区| 在线免费观看不卡av| 欧洲一区在线观看| 国产拍欧美日韩视频二区| 一区二区三区在线免费视频| 国产呦萝稀缺另类资源| 91黄色免费网站| 久久久www免费人成精品| 亚洲成人777| 91视频在线看| 久久综合九色综合97婷婷女人| 日韩毛片精品高清免费| 国产在线一区二区综合免费视频| 欧美在线观看一二区| 国产亚洲自拍一区| 男女性色大片免费观看一区二区 | 在线区一区二视频| 国产精品国产三级国产普通话蜜臀| 日韩精品色哟哟| 91蜜桃免费观看视频| 国产日韩视频一区二区三区| 美女高潮久久久| 6080国产精品一区二区| 亚洲在线免费播放| 色综合天天综合在线视频| 国产欧美精品一区二区色综合| 另类综合日韩欧美亚洲| 欧美一区二区三区喷汁尤物| 亚洲va天堂va国产va久| 在线精品视频小说1| 亚洲少妇中出一区| 91麻豆国产在线观看| 亚洲欧美在线aaa| 成人a级免费电影| 国产精品素人视频| 成人av在线播放网址| 久久久国产精品麻豆| 精品一区二区三区视频| 精品成a人在线观看| 激情文学综合丁香| 国产性做久久久久久| 成人综合在线观看| 国产精品久久久久9999吃药| 成人av高清在线| 亚洲摸摸操操av| 欧美午夜理伦三级在线观看| 一区二区三区在线免费播放| 欧美亚洲国产一区二区三区va| 国产精品久久久久婷婷| hitomi一区二区三区精品| 亚洲欧美日韩国产一区二区三区| 色婷婷久久久综合中文字幕| 夜夜亚洲天天久久| 91精品国产免费| 国产麻豆精品久久一二三| 欧美国产精品一区二区三区| 波多野结衣亚洲一区| 一区二区三区在线视频观看58| 欧美精品久久一区二区三区| 久久 天天综合| 久久精品男人天堂av| 一本大道久久a久久综合| 亚洲第一成年网| 精品久久久久久久久久久久久久久 | 国产乱码精品1区2区3区| 国产精品嫩草久久久久| 欧洲视频一区二区| 久久国内精品视频| 国产精品毛片大码女人| 欧美日韩你懂得| 国产成人亚洲综合a∨婷婷图片| 亚洲色图制服诱惑| 日韩欧美一卡二卡| 91麻豆免费看| 国产在线视频一区二区三区| 亚洲久草在线视频| 精品国产一区二区国模嫣然| 91网页版在线| 国产精品亚洲一区二区三区妖精 | 国产午夜精品在线观看| 色999日韩国产欧美一区二区| 久久99精品久久久久久动态图| 1区2区3区国产精品| 日韩一区二区三区四区| 色婷婷国产精品| 国产成人一区二区精品非洲| 日韩黄色在线观看| 一区二区三区视频在线观看| 2023国产一二三区日本精品2022| 色天使久久综合网天天| 久久国产精品色婷婷| 一二三区精品福利视频| 日本一区二区三区高清不卡| 欧美不卡一区二区三区四区| 欧美性猛交xxxxxx富婆| 成人爱爱电影网址| 国产精品一区二区久久精品爱涩 | 成人小视频在线观看| 麻豆精品一区二区av白丝在线| 一区二区三区四区在线播放| 国产精品天天摸av网| 国产区在线观看成人精品| 欧美不卡一区二区三区四区| 91麻豆精品91久久久久久清纯| 欧美色区777第一页| 色综合久久天天| 成+人+亚洲+综合天堂| 高清不卡一区二区在线| 国产精品综合网| 国产成人精品免费网站| 国产美女av一区二区三区| 精品一区二区日韩| 久久狠狠亚洲综合| 韩国中文字幕2020精品| 一区二区三区精品| 亚洲另类春色国产| 亚洲一区自拍偷拍| 亚洲成人午夜影院| 日韩精品电影在线观看| 视频一区视频二区中文| 日本不卡视频一二三区| 久久国产精品露脸对白| 美女视频黄频大全不卡视频在线播放| 三级影片在线观看欧美日韩一区二区| 日日摸夜夜添夜夜添国产精品 | 夜夜嗨av一区二区三区中文字幕| 亚洲日本在线天堂| 一区二区三区鲁丝不卡| 亚洲综合另类小说| 美女视频黄久久| 国产福利精品一区二区| zzijzzij亚洲日本少妇熟睡| av电影天堂一区二区在线| 在线中文字幕一区| 91精品国产综合久久精品app| 欧美成人video| 国产精品国产三级国产有无不卡| 亚洲免费av观看| 美女性感视频久久| 国产91高潮流白浆在线麻豆| 色哟哟国产精品| 欧美性做爰猛烈叫床潮| 日韩欧美在线123| 中文字幕欧美一| 日韩中文字幕区一区有砖一区| 激情av综合网| 在线观看日韩高清av| 欧美va天堂va视频va在线| 国产精品短视频| 美日韩一区二区三区| 国产精品一区二区在线观看不卡 | 亚洲成人在线网站| 国产盗摄一区二区| 欧美精品在线一区二区三区| 精品成人佐山爱一区二区| 亚洲制服欧美中文字幕中文字幕| 国产综合色精品一区二区三区| 99久久er热在这里只有精品66| 色屁屁一区二区| 国产亚洲一区二区三区在线观看| 洋洋av久久久久久久一区| 国产精品亚洲一区二区三区妖精| 欧美日韩国产系列|