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

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

?? nfslib.c

?? Tornado平臺下
?? C
?? 第 1 頁 / 共 5 頁
字號:
	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.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲精品一区| 色8久久人人97超碰香蕉987| 精品伦理精品一区| 国产91综合网| 亚洲国产一区二区a毛片| 88在线观看91蜜桃国自产| 麻豆精品精品国产自在97香蕉| 国产三级精品视频| 欧美日韩一区小说| 久草热8精品视频在线观看| 中文字幕中文字幕一区| 91精品国产综合久久香蕉的特点| 福利91精品一区二区三区| 亚洲无人区一区| 欧美大肚乱孕交hd孕妇| 91久久精品一区二区| 日韩av中文字幕一区二区三区 | 在线一区二区三区四区五区| 美女高潮久久久| 一区二区三区四区国产精品| 欧美精品一二三区| 国产成人免费视频| 天天综合色天天| 欧美国产日韩亚洲一区| 日韩精品中文字幕在线一区| 欧美视频一二三区| a级高清视频欧美日韩| 亚洲一区二区三区影院| 中文字幕永久在线不卡| 精品国产网站在线观看| 欧美二区乱c少妇| 91福利资源站| 丁香婷婷深情五月亚洲| 久久99热99| 五月天婷婷综合| 伊人一区二区三区| 亚洲欧美中日韩| 日本一区二区三区在线观看| 欧美一级黄色大片| 欧美日本视频在线| 欧洲精品在线观看| 91在线一区二区| 成人美女在线视频| 国产99久久久久久免费看农村| 日本麻豆一区二区三区视频| 夜夜嗨av一区二区三区网页| 国产精品不卡在线观看| 国产精品美女久久久久久久久| 久久综合资源网| 精品久久久久久久久久久院品网| 欧美一区二区三区喷汁尤物| 欧美精品一二三| 欧美精品高清视频| 欧美一区二区视频网站| 91高清视频在线| 成人一级黄色片| 国产一区不卡精品| 男女性色大片免费观看一区二区 | 中文字幕佐山爱一区二区免费| 国产女人水真多18毛片18精品视频| 欧美女孩性生活视频| 在线不卡的av| 日韩三级在线免费观看| 日韩欧美在线网站| 久久一留热品黄| 欧美国产日产图区| 综合亚洲深深色噜噜狠狠网站| 国产精品私人影院| 综合久久一区二区三区| 亚洲免费观看高清完整版在线观看熊 | 久草在线在线精品观看| 国产一区二区三区电影在线观看 | 狠狠色综合日日| 精品夜夜嗨av一区二区三区| 国产激情视频一区二区在线观看| 国产成人免费高清| 一本一本久久a久久精品综合麻豆| 97精品国产露脸对白| 91激情五月电影| 91麻豆精品国产无毒不卡在线观看| 日韩一区二区三区精品视频 | 91激情五月电影| 在线免费不卡电影| 欧美色综合久久| 欧美视频日韩视频| 日韩一区二区视频在线观看| 久久精品视频免费观看| 亚洲欧美日韩在线播放| 日产国产高清一区二区三区| 九色porny丨国产精品| 成人av一区二区三区| 在线亚洲一区观看| 精品久久久久久久久久久久久久久| 中文无字幕一区二区三区| 一区二区三区高清| 奇米四色…亚洲| 成人18视频在线播放| 欧美日韩精品福利| 国产欧美一区二区在线观看| 国产精品久久99| 天堂成人免费av电影一区| 国产成人日日夜夜| 欧美日韩一区二区三区免费看| 2022国产精品视频| 亚洲福利视频一区二区| 国产高清一区日本| 欧美精品日日鲁夜夜添| 欧美激情一二三区| 欧美a级理论片| 日本韩国欧美一区| 久久婷婷一区二区三区| 亚洲h在线观看| 国产91富婆露脸刺激对白| 欧美美女一区二区三区| 国产精品每日更新| 精品一区二区三区免费视频| 欧美性猛交xxxx乱大交退制版| 久久影音资源网| 日韩av一区二区在线影视| 一本久久精品一区二区| 国产日本亚洲高清| 奇米一区二区三区| 欧美丝袜自拍制服另类| 中文字幕第一区综合| 毛片av中文字幕一区二区| 欧亚洲嫩模精品一区三区| 国产精品免费久久| 国产一区二区剧情av在线| 欧美日韩一级二级三级| 自拍偷在线精品自拍偷无码专区| 国产曰批免费观看久久久| 欧美日韩极品在线观看一区| 国产精品乱人伦| 国产麻豆欧美日韩一区| 日韩三级视频在线看| 午夜精品福利一区二区蜜股av | 一本大道久久a久久精品综合 | 亚洲一区精品在线| 91免费小视频| 国产精品毛片a∨一区二区三区| 精品亚洲aⅴ乱码一区二区三区| 欧美精品日韩精品| 亚洲狠狠爱一区二区三区| 色综合中文综合网| 日韩三级电影网址| 日韩极品在线观看| 欧美日本视频在线| 日韩二区在线观看| 91精品国产免费久久综合| 亚洲高清不卡在线观看| 欧美日韩国产综合草草| 午夜不卡在线视频| 91精品一区二区三区久久久久久| 午夜影视日本亚洲欧洲精品| 欧美日韩一区久久| 日韩av一区二区三区四区| 日韩欧美专区在线| 捆绑紧缚一区二区三区视频| 欧美日韩国产高清一区二区三区| 亚洲国产美女搞黄色| 欧美日韩一区三区四区| 一区二区三区高清| 欧美午夜不卡视频| 国产欧美日韩三级| 久久草av在线| 欧美高清视频www夜色资源网| 夜夜亚洲天天久久| 欧美日韩一区高清| 亚洲成人你懂的| 欧美日韩国产另类不卡| 亚洲男人的天堂网| 欧美三区免费完整视频在线观看| 亚洲h动漫在线| 精品少妇一区二区三区日产乱码| 国产精品一区二区在线看| 国产精品乱码一区二区三区软件| 91在线观看下载| 日日噜噜夜夜狠狠视频欧美人| 日韩一区二区三区在线视频| 国产黄色精品网站| 亚洲图片激情小说| 欧美日韩精品一区视频| 精一区二区三区| 中文字幕制服丝袜成人av| 欧美综合天天夜夜久久| 美女高潮久久久| 国产精品理伦片| 欧美精品自拍偷拍动漫精品| 麻豆视频一区二区| 久久一区二区三区四区| 狠狠色狠狠色综合日日91app| 欧美一区二区精品久久911| 国内成+人亚洲+欧美+综合在线| 国产日产欧美一区| 欧美日本在线一区| 成人永久aaa| 石原莉奈一区二区三区在线观看| 国产亚洲欧美日韩在线一区| 91福利国产成人精品照片| 精品中文字幕一区二区小辣椒 |