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

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

?? nfslib.c

?? vxwork源代碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
	nfsErrnoSet (pReadDirRes->status);	return (ERROR);	}    /* normally, the readdirres structure would be freed up here, but     * the calling routine needs its information, so the calling routine     * must call clntudp_freeres after calling nfsDirRead     */    return (OK);    }/********************************************************************************* nfsDirResFree - free the rcp readdirres result structure** RETURNS: TRUE if successful, FALSE if error*/LOCAL BOOL nfsDirResFree    (    readdirres *pReadDirRes    )    {    return (clntudp_freeres (taskRpcStatics->nfsClientCache->client,			     xdr_readdirres, (caddr_t) pReadDirRes));    }#endif/********************************************************************************* nfsDirReadOne - read one directory entry** Read one directory entry on the host from the directory represented by* the file handle *pDirHandle.  Update the DIR structure that is passed* in and pointed to by pDir.** NOTE:* There is actually no way to tell the server we want only one entry.* We only want one entry, but we have to provide a buffer for the maximum* length filename, where the buffer size is specified in the "count" param* to nfsDirRead.  The server will return as many entries as will fit in* this buffer.  We will return the first entry to the caller and throw* away the rest.  A subsequent call with the cookie of the previous* entry will acquire the next entry, even though it may have been* sent in previous call.** In the future, we could cache several entries at a time and just return* them to the caller, one at a time.** RETURNS: OK, or ERROR if dir read fails,*   returns ERROR but errno unchanged if EOF** NOMANUAL*/STATUS nfsDirReadOne    (    char *      hostName,       /* host name */    nfs_fh *    pDirHandle,     /* file handle of directory */    DIR *       pDir            /* ptr to DIR structure, return values here */    )    {    readdirres   readRes;    readdirargs  readDirArgs;    bzero ((char *) &readRes, sizeof (readRes));        if (nfsInit () != OK)	return (ERROR);    bzero ((char *) &readDirArgs, sizeof (readdirargs));    bcopy ((char *) pDirHandle, (char *) &readDirArgs.dir, sizeof (nfs_fh));    bcopy ((char *) &pDir->dd_cookie, readDirArgs.cookie, sizeof (nfscookie));    /*    readDirArgs.count = sizeof (struct readdirres) + sizeof (struct entry) +			NAME_MAX;    */    /*     For reasons yet unknown to me, the HP server expects the value of     count to be AT LEAST 512 in order to successfully read directory files     mounted from HP. Sun server does not have this limitation.    */    readDirArgs.count = READDIR_MAXLEN;    if (nfsClientCall (hostName, NFS_PROGRAM, NFS_VERSION, NFSPROC_READDIR,			xdr_readdirargs, (char *) &readDirArgs,			xdr_readdirres, (char *) &readRes) == ERROR)	{	return (ERROR);	}    if (readRes.status != NFS_OK)	{	nfsErrnoSet (readRes.status);	return (ERROR);	}    if (readRes.readdirres_u.reply.entries == NULL && 	readRes.readdirres_u.reply.eof)        {	/* No entries were returned - must be end of file.	 * (Note that xdr_readdirresOne hack discarded EOF flag.)         * Return ERROR, but don't alter errno because there is no real error.	 * (Thank you POSIX for this lovely, clear construct.)	 */	/*	 * Need to set errno to OK, otherwise ls will print out an error	 * message at the end of every directory listing.	 */	errnoSet (OK);	return (ERROR);	}    strcpy (pDir->dd_dirent.d_name,	    readRes.readdirres_u.reply.entries[0].name);        /* update caller's cookie */    bcopy (readRes.readdirres_u.reply.entries[0].cookie,	   (char *) &pDir->dd_cookie, sizeof (nfscookie));    /* free the memory used by RPC */    clnt_freeres (taskRpcStatics->nfsClientCache->client, xdr_readdirres,		  (caddr_t) &readRes);    return (OK);    }/********************************************************************************* nfsFileAttrGet - get file attributes and put them in a stat structure** NOMANUAL*/void nfsFileAttrGet    (    FAST fattr *        pFattr, /* ptr to nfs file attributes */    FAST struct stat *  pStat   /* ptr to stat struct, return attrs here */    )    {    /*     * INTERNAL:  block information is kept in the fattr     * structure, but we decided not to hold it in the     * stat structure.  It could be added later.     */    pStat->st_ino         = (ULONG) pFattr->fileid;    pStat->st_mode        = pFattr->mode;    pStat->st_nlink       = pFattr->nlink;    pStat->st_uid         = pFattr->uid;    pStat->st_gid         = pFattr->gid;    pStat->st_rdev        = 0;                          /* unused */    pStat->st_size        = pFattr->size;    pStat->st_atime       = pFattr->atime.seconds;    pStat->st_mtime       = pFattr->mtime.seconds;    pStat->st_ctime       = pFattr->ctime.seconds;    pStat->st_blksize     = 0;    pStat->st_blocks      = 0;    }/******************************************************************************** nfsFsAttrGet - get file system attributes across NFS** This routine does an FSTATFS across NFS.** NOMANUAL*/STATUS nfsFsAttrGet    (    char* pHostName,                         /* host name */    nfs_fh* pDirHandle,                      /* file handle of directory */    struct statfs* pArg                      /* return value here */    )    {    int status;    statfsres retStat;    status = nfsClientCall (pHostName,                            NFS_PROGRAM, NFS_VERSION, NFSPROC_STATFS,                            xdr_fhandle, (char *)pDirHandle,                            xdr_statfsres, (char *)&retStat);        if (retStat.status != NFS_OK)        {        nfsErrnoSet (retStat.status);        return (ERROR);        }    pArg->f_type = 0;    pArg->f_bsize = retStat.statfsres_u.reply.bsize;    pArg->f_blocks = retStat.statfsres_u.reply.blocks;    pArg->f_bfree = retStat.statfsres_u.reply.bfree;    pArg->f_bavail = retStat.statfsres_u.reply.bavail;        /* The following are undefined for NFS under vxWorks and     * so are set to 0.     */    pArg->f_files = 0;    /* total file nodes in file system */    pArg->f_ffree = 0;    /* free file nodes in fs */    clnt_freeres (taskRpcStatics->nfsClientCache->client, xdr_statfsres,                  (caddr_t)&retStat);    return (OK);    }/********************************************************************************* nfsDeleteHook - cleanup NFS data structures*/LOCAL void nfsDeleteHook    (    WIND_TCB *pTcb    )    {#ifdef  _WRS_VXWORKS_5_X    FAST RPC_STATICS *pRPCModList = pTcb->pRPCModList;#else    FAST RPC_STATICS *pRPCModList = pTcb->pLcb->pRPCModList;#endif /*  _WRS_VXWORKS_5_X */        if (pRPCModList != NULL)	{	nfsClientCacheCleanUp (pRPCModList->nfsClientCache);	if (pRPCModList->nfsClientCache != NULL)	    {	    KHEAP_FREE((char *) pRPCModList->nfsClientCache);	    pRPCModList->nfsClientCache = NULL;	    }	}    }/********************************************************************************* nfsInit - initialize NFS** nfsInit must be called by a task before it uses NFS.* It is okay to call this routine more than once.** RETURNS: OK or ERROR** NOMANUAL*/LOCAL STATUS nfsInit (void)    {    /* make sure rpc is initialized for this task */    if (rpcTaskInit () == ERROR)	return (ERROR);    /* if first nfs use by this task, initialize nfs stuff for this task */    if (taskRpcStatics->nfsClientCache == NULL)	{	/* if this the very first use of NFS in the system, add nfsDeleteHook */	if (!nfsInstalled)	    {	    if (taskDeleteHookAdd ((FUNCPTR)nfsDeleteHook) == ERROR)		return (ERROR);	    nfsInstalled = TRUE;	    }	/* allocate nfs specific stuff for this task */	taskRpcStatics->nfsClientCache =	    (NFS_MODULE_STATICS *) KHEAP_ALLOC(sizeof (NFS_MODULE_STATICS));	if (taskRpcStatics->nfsClientCache == NULL)	    return (ERROR);        bzero ((char *)taskRpcStatics->nfsClientCache,            sizeof (NFS_MODULE_STATICS));	}    return (OK);    }/********************************************************************************* nfsClientCacheCleanUp - clean up the NFS client cache** This routine is used to free up structures that are part of a valid* NFS client cache.  The client cache is marked as invalid.*/LOCAL void nfsClientCacheCleanUp    (    FAST NFS_MODULE_STATICS *pClientCache       /* pointer to client cache */    )    {    if ((pClientCache != NULL) && (pClientCache->valid))	{	pClientCache->valid = FALSE;	/* close client socket */	if (pClientCache->socket > 0)	    {#if 0	    close (pClientCache->socket);#endif	    pClientCache->socket = NONE;	    }	pClientCache->oldhost[0] = EOS;	/* destroy authorization and client */	if (pClientCache->client != NULL)	    {	    if (pClientCache->client->cl_auth != NULL)		{		auth_destroy (pClientCache->client->cl_auth);		pClientCache->client->cl_auth = NULL;		}	    clnt_destroy (pClientCache->client);	    pClientCache->client = NULL;	    }	}    }/********************************************************************************* nfsClientCacheSetUp - set up the NFS client cache** This routine is used to set up structures that are part of a valid* NFS client cache.  If successful, the client cache is marked as valid.*/LOCAL STATUS nfsClientCacheSetUp    (    FAST NFS_MODULE_STATICS *ms,        /* pointer to client cache */    char *      host,                   /* server's host name */    u_int       prognum,                /* RPC program number */    u_int       versnum                 /* RPC version number */    )    {    int			hp;		/* host's inet address */    struct sockaddr_in	server_addr;    struct timeval	timeout;    int			optval;    /* check if cached client is appropriate */    if (ms->valid && ms->oldprognum == prognum && ms->oldversnum == versnum	&& strcmp (ms->oldhost, host) == 0 && ms->authCount == nfsAuthCount)	{	return (OK);	/* reuse old client */    	}    /* get rid of any old client and create new one */    nfsClientCacheCleanUp (ms);    if ((hp = hostGetByName (host)) == ERROR)	return (ERROR);    timeout.tv_sec  = nfsReXmitSec;    timeout.tv_usec = nfsReXmitUSec;    server_addr.sin_addr.s_addr	= hp;    server_addr.sin_family	= AF_INET;    server_addr.sin_port	= htons (0);    ms->socket = RPC_ANYSOCK;    if ((ms->client = clntudp_create(&server_addr, prognum, versnum,				     timeout, &ms->socket)) == NULL)	{	server_addr.sin_port = htons (NFS_PORT);	ms->client = clntudp_create (&server_addr, prognum, versnum,				     timeout, &ms->socket);	if (ms->client == NULL)	    return (ERROR);	}    optval = nfsSockBufSize;    if ((setsockopt (ms->socket, SOL_SOCKET, SO_SNDBUF, (char *)&optval,		     sizeof (optval)) == ERROR)	|| (setsockopt (ms->socket, SOL_SOCKET, SO_RCVBUF, (char *)&optval,			sizeof (optval)) == ERROR))	{	nfsClientCacheCleanUp (ms);	return (ERROR);	}    ms->client->cl_auth = authunix_create (nfsAuthUnix.machname,					   nfsAuthUnix.uid, nfsAuthUnix.gid,					   nfsAuthUnix.len,					   nfsAuthUnix.aup_gids);    if (ms->client->cl_auth == NULL)	{	nfsClientCacheCleanUp (ms);	errnoSet (S_nfsLib_NFS_AUTH_UNIX_FAILED);	return (ERROR);	}    ms->oldprognum = prognum;    ms->oldversnum = versnum;    ms->authCount  = nfsAuthCount;    (void) strcpy (ms->oldhost, host);    ms->valid = TRUE;    return (OK);    }/********************************************************************************* nfsClientCall - make an NFS request to the server using RPC** This is the routine which does the actual RPC call to the server.* All NFS routines which communicate with the file server use this routine.

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美综合在线| 国产精品乱码久久久久久| 99久久综合精品| 国产成人在线视频网址| 久久精品国产一区二区三| 亚洲综合男人的天堂| 中文字幕av一区二区三区| 欧美一区二区视频在线观看 | 欧美日韩一区二区在线观看视频| 久久99日本精品| 日韩中文字幕91| 亚洲成av人片一区二区三区| 亚洲制服丝袜一区| 亚洲一区二区高清| 视频一区在线播放| 激情成人午夜视频| 午夜一区二区三区视频| 午夜伊人狠狠久久| 奇米四色…亚洲| 麻豆精品一区二区综合av| 狠狠网亚洲精品| 福利视频网站一区二区三区| 成人理论电影网| 在线影视一区二区三区| 欧美日韩电影在线播放| 91精品国产综合久久香蕉的特点 | 国产99精品国产| av日韩在线网站| 欧美亚洲综合在线| 日韩一区二区三区视频在线| 2024国产精品视频| 亚洲婷婷综合久久一本伊一区| 亚洲一区视频在线观看视频| 久久精品国产秦先生| 国产盗摄一区二区三区| 91丨porny丨户外露出| 日韩一区二区三区视频| 国产精品国产a| 久久精品国产一区二区三 | 亚洲妇女屁股眼交7| 99国产精品一区| 欧美性生活一区| 国产日韩欧美a| 亚洲v日本v欧美v久久精品| 九九九精品视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 国产一区美女在线| 日本韩国视频一区二区| 久久蜜桃av一区二区天堂| 一区二区三区不卡在线观看 | 亚洲综合视频在线观看| 国产福利一区在线观看| 7777精品伊人久久久大香线蕉最新版| 国产日本欧洲亚洲| 国产一区二区三区在线看麻豆| 欧美三区在线视频| 亚洲精品日日夜夜| 国产成人免费视频网站高清观看视频| 日韩一级高清毛片| 免费成人在线影院| 337p亚洲精品色噜噜狠狠| 一区二区三区精品| 在线这里只有精品| 伊人性伊人情综合网| 91香蕉视频在线| 自拍偷拍亚洲欧美日韩| 99久久久无码国产精品| 国产精品久久久久久久第一福利 | 男女激情视频一区| 欧美浪妇xxxx高跟鞋交| 日韩中文字幕亚洲一区二区va在线| 精品视频一区二区三区免费| 亚洲国产另类av| 欧美一区二区啪啪| 精品中文av资源站在线观看| 精品91自产拍在线观看一区| 国产乱理伦片在线观看夜一区| 国产日韩欧美电影| 日本精品一级二级| 五月天丁香久久| 久久综合九色综合97婷婷| 成人小视频在线观看| 亚洲精品视频一区| 精品乱码亚洲一区二区不卡| 国产精品资源网| 最新热久久免费视频| 欧美男生操女生| 国产成人免费在线观看| 一区二区三区四区亚洲| 精品国产一区二区精华| 91玉足脚交白嫩脚丫在线播放| 亚洲综合小说图片| 国产色综合久久| 欧美日韩第一区日日骚| 国产69精品久久777的优势| 成人性生交大合| 久久国产精品色| 亚洲高清免费观看| 国产精品久久久久婷婷二区次 | 91精品国产一区二区| av一区二区久久| 国产一区二区三区在线看麻豆| 亚洲一区二区精品久久av| 中文字幕国产一区二区| 久久夜色精品国产噜噜av| 欧美视频日韩视频| 懂色av一区二区夜夜嗨| 欧美日免费三级在线| 91女厕偷拍女厕偷拍高清| 国产激情一区二区三区桃花岛亚洲| 亚洲福利视频一区| 亚洲自拍都市欧美小说| 亚洲色图.com| 中文字幕亚洲综合久久菠萝蜜| 日本一区二区视频在线| 国产亚洲精品bt天堂精选| 欧美白人最猛性xxxxx69交| 日韩午夜av一区| 欧美电视剧在线观看完整版| 日韩欧美一区二区久久婷婷| 日韩三级在线观看| 久久人人超碰精品| 欧美激情一区二区三区| 久久久国产一区二区三区四区小说| 日韩精品一区二区三区视频在线观看| 精品少妇一区二区三区| 精品成a人在线观看| 亚洲国产高清aⅴ视频| 国产精品成人一区二区艾草| 国产精品国产三级国产aⅴ入口| 国产精品久久久久国产精品日日| 亚洲人成网站影音先锋播放| 一区二区三区在线观看欧美| 免费在线观看视频一区| 国产精品一区二区视频| 91麻豆免费观看| 欧美一级高清大全免费观看| 国产精品久久久久久久久果冻传媒| 亚洲欧洲精品天堂一级 | 偷拍与自拍一区| 国产精品77777| 欧美日韩久久一区二区| 国产日产欧美一区| 成人永久aaa| 欧美大片顶级少妇| 亚洲综合视频网| www.爱久久.com| 26uuu亚洲| 青青青伊人色综合久久| 91蜜桃婷婷狠狠久久综合9色| 欧美成人精精品一区二区频| 亚洲欧美日韩小说| 福利一区二区在线观看| 日韩午夜在线影院| 亚洲一区二区三区三| 不卡一二三区首页| 久久精品男人的天堂| 日韩精品一区第一页| 91免费视频网址| 中国av一区二区三区| 国产精品一级在线| 欧美大尺度电影在线| 欧美三级视频在线| 国产精品久久久久影院老司| 国产一区福利在线| 2020国产精品自拍| 久久国产精品区| 久久蜜桃av一区精品变态类天堂 | 亚洲色图在线看| 国产成人av在线影院| 欧美精品一区二区三区一线天视频| 午夜精品在线看| 日韩欧美国产电影| 狠狠v欧美v日韩v亚洲ⅴ| 久久久午夜电影| 顶级嫩模精品视频在线看| 国产精品丝袜一区| 日本高清不卡aⅴ免费网站| 亚洲成年人影院| 精品日韩欧美在线| 国产福利电影一区二区三区| 国产精品久久午夜夜伦鲁鲁| a在线欧美一区| 午夜精品影院在线观看| 日韩视频一区二区三区在线播放 | 久久久久久99久久久精品网站| 国产乱码字幕精品高清av| 国产精品美女久久久久久久久 | 欧美美女直播网站| 激情欧美一区二区| 一区二区三区在线不卡| 欧美一区二视频| 94色蜜桃网一区二区三区| 日韩电影在线观看网站| 欧美韩国日本不卡| 欧美午夜片在线看| 国产99久久久国产精品潘金 | 国产成人av电影在线| 亚洲成人7777| 中文字幕字幕中文在线中不卡视频|