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

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

?? nfslib.c

?? vxworks操作系統(tǒng)源代碼_對于在vxworks環(huán)境下開發(fā)軟件的人員非常有用
?? 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一区二区三区免费野_久草精品视频
欧美男女性生活在线直播观看| 国产在线精品一区在线观看麻豆| 99精品欧美一区二区三区综合在线| 国产婷婷色一区二区三区在线| 国产精品亚洲一区二区三区妖精 | 亚洲天堂av一区| 成人午夜激情影院| 国产精品久久毛片| 欧美在线观看视频在线| 亚洲成av人综合在线观看| 制服丝袜中文字幕一区| 日本欧美加勒比视频| 精品国产91乱码一区二区三区| 国产一区二区导航在线播放| 欧美极品美女视频| 91国偷自产一区二区三区成为亚洲经典 | 人人超碰91尤物精品国产| 日韩视频在线永久播放| 精品影视av免费| 亚洲色图在线看| 欧美日产国产精品| 国产精品12区| 亚洲一区二区三区四区在线| 欧美一卡在线观看| youjizz国产精品| 水蜜桃久久夜色精品一区的特点| 久久综合国产精品| 一本色道久久综合精品竹菊| 免费精品视频在线| 亚洲区小说区图片区qvod| 3d动漫精品啪啪1区2区免费| 国产1区2区3区精品美女| 亚洲精品乱码久久久久久黑人| 欧美久久久影院| 粉嫩aⅴ一区二区三区四区| 午夜视频在线观看一区二区三区| 久久综合九色综合97婷婷| 日本精品免费观看高清观看| 日产国产欧美视频一区精品 | 日韩免费电影网站| 一本高清dvd不卡在线观看| 毛片av中文字幕一区二区| 自拍偷在线精品自拍偷无码专区 | 久久一夜天堂av一区二区三区| 97久久精品人人澡人人爽| 久久国产精品99精品国产| 一区在线观看免费| 久久理论电影网| 91精品国产综合久久精品图片| www.99精品| 国产一区二区三区在线看麻豆| 亚洲精品伦理在线| 中文字幕不卡的av| 26uuu欧美| 欧美一区二区在线不卡| 欧美亚洲一区三区| 94-欧美-setu| 成人国产精品视频| 国产成人精品免费视频网站| 美女www一区二区| 亚洲成人福利片| 尤物在线观看一区| 自拍偷在线精品自拍偷无码专区| 久久久久国色av免费看影院| 日韩写真欧美这视频| 欧美日韩激情一区| 在线观看网站黄不卡| 91蜜桃在线免费视频| 成人妖精视频yjsp地址| 国产盗摄视频一区二区三区| 国内外成人在线| 激情久久五月天| 精品一区二区在线免费观看| 日韩精品亚洲一区二区三区免费| 亚洲成人av在线电影| 亚洲超碰精品一区二区| 亚洲欧美一区二区三区孕妇| 国产精品久久久99| 国产精品视频线看| 国产精品久线在线观看| 亚洲国产经典视频| 国产精品久久福利| 国产精品久久久久久久岛一牛影视| 久久久久久久免费视频了| 精品国产电影一区二区| 日韩美女在线视频| 精品粉嫩超白一线天av| 久久久综合网站| 中文字幕欧美区| 最新日韩在线视频| 亚洲精品免费在线播放| 一区二区三区欧美日| 亚洲国产精品一区二区www在线 | 91麻豆精品国产91久久久| 欧美一区二区三区免费视频| 欧美一区二区三区电影| 精品福利一区二区三区免费视频| 精品国产一区二区亚洲人成毛片| 国产亚洲精品精华液| 国产精品久久福利| 香蕉加勒比综合久久| 毛片基地黄久久久久久天堂| 激情丁香综合五月| www.亚洲色图.com| 欧美日韩精品欧美日韩精品| 欧美一区二区在线视频| 国产日韩三级在线| 有码一区二区三区| 韩国三级电影一区二区| jlzzjlzz欧美大全| 欧美日韩视频一区二区| 欧美一区二区三区公司| 国产精品欧美综合在线| 亚洲一区二区三区激情| 韩国女主播成人在线| 99热精品一区二区| 欧美一二区视频| 国产精品久久久久久久久久免费看 | 99麻豆久久久国产精品免费 | 欧美成人伊人久久综合网| 久久久99精品免费观看不卡| 亚洲精品国产a| 精品一区二区三区影院在线午夜 | 欧美系列在线观看| 久久久久久夜精品精品免费| 一区二区三区不卡视频在线观看| 免费人成精品欧美精品| 欧美在线观看一区二区| 欧美变态tickle挠乳网站| 中文字幕一区二区三中文字幕| 日本午夜一区二区| 色婷婷精品久久二区二区蜜臀av| 日韩欧美成人激情| 亚洲伊人色欲综合网| 国产成人综合在线播放| 欧美一二三四在线| 一区二区三区成人| www.色综合.com| 亚洲精品一区二区三区蜜桃下载| 国产精品每日更新在线播放网址| 免费看黄色91| 精品婷婷伊人一区三区三| 欧美国产一区视频在线观看| 麻豆精品一区二区三区| 日本乱人伦一区| 中文一区二区完整视频在线观看 | 久久亚洲欧美国产精品乐播 | 欧美大片免费久久精品三p| 亚洲综合久久久久| 99久久婷婷国产综合精品电影| 久久婷婷色综合| 老色鬼精品视频在线观看播放| 欧美日韩在线精品一区二区三区激情 | 91极品美女在线| 狠狠色狠狠色综合系列| 久久免费看少妇高潮| 久久精品久久99精品久久| 精品一二三四区| 欧美高清精品3d| 亚洲mv大片欧洲mv大片精品| 91麻豆123| 国产欧美视频一区二区| 免费成人av在线播放| 欧美日韩国产天堂| 一区二区国产视频| 欧美亚洲日本一区| 性久久久久久久久| 欧美三级视频在线观看| 亚洲国产欧美日韩另类综合| 一本色道亚洲精品aⅴ| 亚洲黄一区二区三区| 色综合中文字幕国产 | 亚洲特级片在线| 成人av在线电影| 中文字幕综合网| 97精品久久久午夜一区二区三区| 欧美韩国一区二区| www.欧美日韩国产在线| 国产精品久久久久国产精品日日| 99视频超级精品| 亚洲免费高清视频在线| 欧美性大战xxxxx久久久| 日精品一区二区三区| 日韩一区二区三免费高清| 麻豆精品国产91久久久久久| 日韩欧美一级精品久久| 久久爱另类一区二区小说| xf在线a精品一区二区视频网站| 九九九精品视频| 中文字幕国产一区| 99精品视频在线播放观看| 伊人婷婷欧美激情| 制服丝袜在线91| 国产成人在线看| 一区二区成人在线观看| 日韩一区二区电影| 丁香婷婷综合五月| 亚洲一区二区三区在线看| 日韩美女在线视频| 99v久久综合狠狠综合久久|