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

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

?? nfslib.c

?? vxworks操作系統源代碼_對于在vxworks環境下開發軟件的人員非常有用
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* nfsLib.c - Network File System (NFS) library *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------03k,10may02,kbw  making man page edits03j,06nov01,vvv  made max path length configurable (SPR #63551)03i,15oct01,rae  merge from truestack ver 03m, base 03h (cleanup)03h,15mar99,c_c  Doc: updated nfsAuthUnixSet manual (SPR #20867).03g,14mar99,jdi  doc: removed refs to config.h and/or configAll.h (SPR 25663).03f,20nov97,gnn  fix for spr#5436, need to support FIOFSTATFSGET03e,30may97,sgv  fix for spr#8653, Check for NULL parameter in nfsExportShow03d,06aug96,sgv  fix for spr#646803c,06aug96,sgv  fix for spr #4278. Eliminated the nfsLib closing		 of the UDP socket(multiple close).03b,06aug96,sgv  fix for spr#589503a,23feb95,caf  cleaned up pointer reference in nfsExportShow().02g,09oct94,jag  nfsDirReadOne() was changed to handle EOF correctly.02f,08sep94,jmm  Changed to use the new rpc genned versions of the xdr rtns02e,11aug93,jmm  Changed ioctl.h and socket.h to sys/ioctl.h and sys/socket.h02d,28jul93,jmm  moved AUTH_UNIX_FIELD_LEN and MAX_GRPS definitions to nfsLib.h02c,03feb93,jdi  documentation cleanup for 5.1.02b,16sep92,jcf  change typedef path to nfsPath.02a,07sep92,smb  added blksize and blocks to the stat structure initialisation.01z,19aug92,smb  Changed systime.h to sys/times.h.01y,18jul92,smb  Changed errno.h to errnoLib.h.01x,26may92,rrr  the tree shuffle		  -changed includes to have absolute path from h/01w,20jan92,jmm  changed nfsDirReadOne to also set errno to OK01w,20jan92,jmm  changed nfsThingCreate to recognize symlinks (spr 1059)02n,19dec91,rrr  put dirent.h before nfsLib.h so it would compile02m,13dec91,gae  ANSI fixes.02l,19nov91,rrr  shut up some ansi warnings.02k,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice02j,26apr91,shl  removed NULL entry in help_msg of nfsHelp() (spr 987).02i,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 switched nfsHelp() to first position; doc review by dnw.02h,08mar91,elh  added nfsReXmit{Sec,USec} so re-xmit time not hardcoded.02g,22feb91,lpf  made 'ls' command work on files mounted from HP. (SPR #0935)02f,21feb91,jaa	 documentation.02e,02oct90,hjb  added a call to htons() where needed.02d,19jul90,dnw  mangen fix02c,26jun90,jcf  changed semaphores to be mutex.02b,29may90,dnw  fixed bug in nfsInit, introduced in 01x, of testing		    taskRpcStatics->nfsClientCache before rpcTaskInit is called		 made nfsInit be NOMANUAL02a,10may90,dnw  fixed nfsDeleteHook to delete the owner task's nfs stuff rather		   than the exception task's (del hooks are called by exception		   task).		 fixed nfsDeleteHook to free nfsClientCache		 fixed nfsInit to add nfsDeleteHook only once		 fixed bug in authorization usage: added authCount field to		   verify that cached client authorization matches current		   global setting		 changed name of nfsAllUnmount() to nfsMntUnmountAll()		 optimized by removing some unnecessary "freeres" calls		 optimized by supplying buffers in xdr calls instead of having		   them malloc'd, in readres (nfsFileRead) result msgs.		 optimized by adding xdr_readdirresOne hack to nfsDirReadOne		   which just decodes first entry and discards the rest.		 changed references to taskModuleList to taskRpcStatics		 added nfsExportRead and nfsExportFree for use by nfsMountAll		   in nfsDrv		 extracted client cache stuff from nfsClientCall() to new		   function nfsClientCacheSetUp()		 added forward declarations to fix lint about void		 changed MAX_FILENAME_LENGTH to POSIX definitions PATH_MAX		   and NAME_MAX where appropriate		 cosmetic changes to print out of nfsExportShow and		   nfsMountListPrint		 removed nfsDirListPrint() (no longer used)		 removed some unnecessary error printing		 changed documentation about nfs's large stack requirements		   (no longer a pig!)01w,01may90,llk  deleted nfsLs().		 added nfsDirReadOne() and nfsFileAttrGet().		 changed to check return value of taskDeleteHookAdd().		 changed calls to pathBuild() and pathCat() to examine return		   values.01v,14apr90,jcf  removed tcb extension dependencies.01u,01apr90,llk  turned the `oldhost' field of moduleStatics into an array.		 substituted smaller constants MAX_FILENAME_LENGTH for the		   SUN specified NFS_MAXNAMLEN and NFS_MAXPATHLEN.		 added safety checks for filename lengths.		 deleted calls to pathArrayFree().		 changed call to pathParse().		 changed to clean out the CLIENT cache if authorization		   parameters are changed by calling nfsClientCacheCleanUp().		 changed rpcAuthUnix to nfsAuthUnix.  Made it LOCAL.01t,07mar90,jdi  documentation cleanup.01s,03dec89,llk  changed nfsClientClose() to check for non-null taskModuleList		   before cleaning up the nfs cache.01r,20oct89,hjb  changed "struct timeval" to nfsTimeval to avoid conflicts		 with the definition of "struct timeval" in "utime.h".01q,28aug89,dab  modified nfsFileRemove() to delete symbolic links.01p,23jul89,gae  added taskDeleteHook for nfsCleanup.01o,06jul89,llk  deleted nfsNameArrayFree().  Added call to pathArrayFree().		 reworked calls to pathLib.  added panic() calls.  delinted.01n,09jun89,llk  fixed bug in nfsLookUpByName() which showed up via rmdir().01m,23may89,dnw  lint.01l,26mar89,llk  added nfsClientCacheCleanUp and nfsNameArrayFree to get rid		   of memory eaters.01k,09nov88,llk  rearranged error checking of nfs structures returned by server.01j,28sep88,llk  added nfsSockBufSize, nfsTimeoutSec, nfsTimeoutUSec.		 added nfsIdSet().01i,25aug88,gae  documentation.01h,07jul88,jcf  lint.01g,30jun88,llk  changed to handle links.		 added nfsHelp().		 more name changes.01f,16jun88,llk  changed to more v4 names.		 added LOCAL and NOMANUAL where appropriate.		 moved pathSplit() to pathLib.c.01e,04jun88,llk  rewrote nfsLs and nfsDirRead so they clean up after themselves.		 incorporated pathLib.		 added nfsAuthUnix{Set Get Prompt Show} for unix authentication.01d,30may88,dnw  changed to v4 names.01c,28may88,dnw  copied promptParam...() stuff here from bootLib so that		   this lib doesn't depend on bootLib.01b,26apr88,llk  bug fix.  Internet address returned from remGetHostByName		   was compared to <= NULL.  Some large addresses can be		   mistaken for negative numbers.01a,19apr88,llk  written.*//*DESCRIPTIONThis library provides the client side of services for NFS (Network FileSystem) devices.  Most routines in this library should not be called byusers, but rather by device drivers.  The driver is responsible forkeeping track of file pointers, mounted disks, and cached buffers.  Thislibrary uses Remote Procedure Calls (RPC) to make the NFS calls.VxWorks is delivered with NFS disabled.To use this feature, include the following component:INCLUDE_NFSIn the same file, NFS_USER_ID and NFS_GROUP_ID should bedefined to set the default user ID and group ID at system start-up.For information about creating NFS devices, see the * .I "WindNet TCP/IP Network Programmer's Guide"Normal use of NFS requires no more than 2000 bytes of stack. This requirement may change depending on how the maximum file name path length parameter, NFS_MAXPATH, is configured. As many as 4 character arrays oflength NFS_MAXPATH may be allocated off the stack during client operation.Therefore any increase in the parameter can increase stack usage by afactor of four times the deviation from default NFS_MAXPATH. For example,a change from 255 to 1024 will increase peak stack usage by (1024 -255) * 4which is 3076 bytes.NFS USER IDENTIFICATIONNFS is built on top of RPC and uses a type of RPC authentication known asAUTH_UNIX, which is passed on to the NFS server with every NFS request.AUTH_UNIX is a structure that contains necessary information for NFS,including the user ID number and a list of group IDs to which the user belongs.  On UNIX systems, a user ID is specified in the file \f3/etc/passwd\fP.  The list of groups to which a user belongs is specified in the file \f3/etc/group\fP.To change the default authentication parameters, use nfsAuthUnixPrompt().To change just the AUTH_UNIX ID, use nfsIdSet().  Usually, only the userID needs to be changed to indicate a new NFS user.INCLUDE FILES: nfsLib.hSEE ALSOrpcLib, ioLib, nfsDrvINTERNALEvery routine starts with a call to nfsInit.  nfsInit initializes RPCand sets up the appropriate RPC task variables used for NFS.  Itmay be called more than once with the only ill effect being wasted time.The constant nfsMaxPath is used instead of NFS_MAXPATHLEN (1024) orPATH_MAX (255). nfsMaxPath is derived from the configuration parameterNFS_MAXPATH. A short length like 255 helps conserve memory but restricts use of longer paths. The introduction of NFS_MAXPATH allows the user todecide which is more important. The constant (NAME_MAX + 1) is used insteadof NFS_MAXNAMELEN (255) in order to conserve memory. All file/path names which have come to nfsLib via the I/O system, such as filenames being passed to nfsLookUpByName(), have already been screened for their path and name lengths being less than PATH_MAX and NAME_MAX.xdr_nfs has been changed to use the shorter lengths as well.*//* LINTLIBRARY */#include "vxWorks.h"#include "limits.h"#include "ctype.h"#include "string.h"#include "ioLib.h"#include "taskLib.h"#include "taskHookLib.h"#include "rpc/rpc.h"#include "stdlib.h"#include "sys/socket.h"#include "netinet/in.h"#include "rpc/auth.h"#include "rpc/rpcGbl.h"#include "xdr_nfs.h"#include "sys/stat.h"#include "dirent.h"#include "nfsLib.h"#include "hostLib.h"#include "sys/times.h"#include "sockLib.h"#include "pathLib.h"#include "stdio.h"#include "unistd.h"#include "errnoLib.h"#include "rpcLib.h"#include "netLib.h"#include "fioLib.h"#include "memPartLib.h"#define READDIR_MAXLEN		512	/* increased for NFSPROC_READDIR on */					/* HP server */#ifdef __GNUC__# ifndef alloca#  define alloca __builtin_alloca# endif#endif/* IMPORTS */IMPORT int   nfsMaxPath;               /* max. length of file path *//* GLOBALS */unsigned nfsMaxMsgLen = NFS_MAXDATA;	/* largest read or write buffer that					 * can be transfered to/from the nfs					 * server					 */u_int nfsTimeoutSec   = NFS_TIMEOUT_SEC;u_int nfsTimeoutUSec  = NFS_TIMEOUT_USEC;u_int nfsReXmitSec    = NFS_REXMIT_SEC;u_int nfsReXmitUSec   = NFS_REXMIT_USEC;int   nfsSockBufSize  = NFS_SOCKOPTVAL;/* LOCALS *//*Static RPC information.Set on initial NFS invocation and re-used duringsubsequent calls on a per task basis.*/typedef struct moduleStatics    {    CLIENT *client;     /* pointer to client structure */    int socket;         /* socket associated with this client */    int oldprognum;     /* last program number used with this client */    int oldversnum;     /* last version number used with this client */    int authCount;	/* auth count this client was built with */    int valid;          /* if TRUE, then this client information is valid */    char oldhost [MAXHOSTNAMELEN];    			/* last host name that was used with this client */    } NFS_MODULE_STATICS;typedef struct		/* NFS_AUTH_UNIX_TYPE - UNIX authentication structure */    {    char machname [AUTH_UNIX_FIELD_LEN];  /* host name where client is */    int uid;			/* client's UNIX effective uid */    int gid;			/* client's current group ID */    int len;			/* element length of aup_gids */    int aup_gids [MAX_GRPS];	/* array of groups user is in */    } NFS_AUTH_UNIX_TYPE;/* There is a single global nfs authorization, nfsAuthUnix. * Any time it is changed, nfsAuthCount is bumped.  This count is kept * in the nfsClientCache to make sure that the client was built with the * current authorization parameters.  In the future, it might be desirable * to let different tasks have different authorizations. */LOCAL NFS_AUTH_UNIX_TYPE nfsAuthUnix;LOCAL int  nfsAuthCount;LOCAL BOOL nfsInstalled;/* forward declarations */LOCAL STATUS nfsClientCall (char *host, u_int prognum, u_int versnum, u_int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out);LOCAL STATUS nfsLinkGet (char * hostName, nfs_fh * pHandle, nfspath realPath);LOCAL STATUS nfsInit (void);LOCAL void nfsDeleteHook ();LOCAL void nfsClientCacheCleanUp ();LOCAL void nfsMountListPrint ();LOCAL void nfsGroupsPrint ();LOCAL void nfsExportPrint ();LOCAL void nfsErrnoSet ();LOCAL void printClear ();LOCAL void promptParamString ();LOCAL void promptParamNum ();/********************************************************************************* nfsDirMount - mount an NFS directory** RETURNS: OK or ERROR** NOMANUAL*/STATUS nfsDirMount    (    char *hostName,    dirpath dirname,    nfs_fh *pFileHandle         /* the directory's file handle */    )    {    fhstatus fileHandleStatus;    bzero ((char *) &fileHandleStatus, sizeof (fileHandleStatus));    if (nfsClientCall (hostName, MOUNTPROG, MOUNTVERS, MOUNTPROC_MNT,			xdr_dirpath, (char *) &dirname,			xdr_fhstatus, (char *) &fileHandleStatus) == ERROR)	{	return (ERROR);	}    if (fileHandleStatus.fhs_status != 0)	{	netErrnoSet ((int) fileHandleStatus.fhs_status);	/* UNIX error */	return (ERROR);	}    bcopy ((char *) &fileHandleStatus.fhstatus_u.fhs_fhandle,	   (char *) pFileHandle, sizeof (nfs_fh));    return (OK);    }/********************************************************************************* nfsDirUnmount - unmount an NFS directory** RETURNS: OK or ERROR** NOMANUAL*/STATUS nfsDirUnmount    (    char *hostName,    dirpath dirname    )    {    return (nfsClientCall (hostName, MOUNTPROG, MOUNTVERS, MOUNTPROC_UMNT,				xdr_dirpath, (char *) &dirname,				xdr_void, (char *) NULL));    }/********************************************************************************* nfsMntUnmountAll - unmount all file systems on a particular host** This routine removes all NFS file systems mounted on <hostName> from that* host's client list.  It does NOT actually "unmount" the file systems.** RETURNS: OK or ERROR.** SEE ALSO: nfsMntDump()** NOMANUAL*/STATUS nfsMntUnmountAll    (    char *hostName              /* host machine to unmount from */    )    {    return (nfsClientCall (hostName, MOUNTPROG, MOUNTVERS, MOUNTPROC_UMNTALL,				xdr_void, (char *) NULL,				xdr_void, (char *) NULL));    }/********************************************************************************* nfsMntDump - display all NFS file systems mounted on a particular host** This routine displays all the NFS file systems mounted on a specified host* machine.** RETURNS: OK or ERROR.** NOMANUAL*/STATUS nfsMntDump    (    char *hostName              /* host machine */    )    {    mountlist mEntries;    bzero ((char *) &mEntries, sizeof (mEntries));    if (nfsClientCall (hostName, MOUNTPROG, MOUNTVERS, MOUNTPROC_DUMP,				xdr_void, (char *) NULL,				xdr_mountlist, (char *) &mEntries) == ERROR)	{	return (ERROR);	}    if (mEntries)	nfsMountListPrint (mEntries);    clntudp_freeres (taskRpcStatics->nfsClientCache->client, xdr_mountlist,		     (caddr_t) &mEntries);    return (OK);    }/*******************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产免费| 欧美日韩一级二级三级| 日本高清不卡视频| 亚洲精品一线二线三线无人区| 亚洲男人的天堂在线aⅴ视频| 美女任你摸久久| 在线精品视频一区二区| 国产日韩欧美精品一区| 另类小说欧美激情| 欧美午夜影院一区| 国产精品久久久久aaaa| 久久精品噜噜噜成人av农村| 欧美色图天堂网| 中文字幕在线观看不卡视频| 国产真实精品久久二三区| 欧美日韩一区二区三区免费看| 中文在线资源观看网站视频免费不卡| 免费在线一区观看| 911精品国产一区二区在线| 亚洲图片欧美激情| 99re成人在线| 亚洲视频电影在线| 成人爽a毛片一区二区免费| 久久人人97超碰com| 精品无人码麻豆乱码1区2区| 欧美精品1区2区| 五月天精品一区二区三区| 欧美午夜精品一区| 亚洲成人在线网站| 欧美性受xxxx黑人xyx性爽| 一区二区三区在线观看网站| 色综合久久六月婷婷中文字幕| 中文一区二区在线观看| 岛国av在线一区| 国产午夜精品久久久久久免费视| 国产麻豆精品在线观看| 久久久不卡网国产精品一区| 精品在线免费观看| 国产日本欧洲亚洲| 床上的激情91.| 亚洲天天做日日做天天谢日日欢| 91视频免费观看| 亚洲综合一二三区| 正在播放亚洲一区| 韩国午夜理伦三级不卡影院| 久久久午夜电影| 成人的网站免费观看| 亚洲欧洲成人av每日更新| 色94色欧美sute亚洲线路一ni| 亚洲人成伊人成综合网小说| 欧美亚洲综合另类| 日本亚洲欧美天堂免费| 精品va天堂亚洲国产| 粉嫩av一区二区三区粉嫩| 综合自拍亚洲综合图不卡区| 欧美日韩一区二区三区四区 | 国产精品久久三| 日本黄色一区二区| 日本欧美在线观看| 久久久久久**毛片大全| 91免费观看国产| 日韩精品电影在线| 欧美mv和日韩mv的网站| 不卡视频一二三| 日韩精品一区第一页| 欧美激情一区三区| 色婷婷av一区二区| 国产又黄又大久久| 亚洲一区免费在线观看| 久久久久国产精品免费免费搜索 | 国产又黄又大久久| 一区二区三区四区亚洲| 久久久久国产免费免费| 欧美日韩另类国产亚洲欧美一级| 国产在线播精品第三| 亚洲一区二区三区在线| 中文字幕不卡三区| 日韩丝袜情趣美女图片| 色综合久久中文综合久久97| 韩国精品主播一区二区在线观看| 中文字幕一区二区三区不卡| 欧美一级黄色录像| 欧美综合一区二区| 高清国产一区二区三区| 日韩国产精品久久久| 亚洲欧美日韩国产一区二区三区| 日韩精品一区二区三区三区免费 | 高清不卡一区二区| 人人精品人人爱| 亚洲午夜成aⅴ人片| 国产女同互慰高潮91漫画| 日韩欧美成人激情| 欧美日韩国产成人在线免费| 色网综合在线观看| 成人精品国产免费网站| 久久精品国产网站| 蜜臀av一区二区| 天天影视涩香欲综合网| 一区二区三区日韩精品| 国产精品国产三级国产三级人妇 | 亚洲精品免费电影| 17c精品麻豆一区二区免费| 国产女主播一区| 久久你懂得1024| 精品卡一卡二卡三卡四在线| 制服丝袜中文字幕一区| 欧美精品少妇一区二区三区| 91成人网在线| 91成人免费电影| 色88888久久久久久影院按摩| 成人一区二区三区在线观看| 国产酒店精品激情| 国产91综合一区在线观看| 国产美女娇喘av呻吟久久| 精品亚洲成a人| 国产精品综合一区二区三区| 国产在线不卡一区| 国产乱淫av一区二区三区 | 日韩不卡一区二区| 日韩精品久久理论片| 日本不卡在线视频| 久久精品国产一区二区三| 韩国av一区二区三区在线观看| 久久不见久久见免费视频7 | 不卡av在线网| 成人av电影在线| 色诱亚洲精品久久久久久| 在线视频欧美区| 91精品国产日韩91久久久久久| 欧美一区二区视频在线观看2022| 欧美成人一区二区三区| 欧美经典一区二区| 亚洲男同性视频| 日韩激情视频网站| 国产福利精品导航| 在线精品观看国产| 日韩欧美久久一区| 国产日产欧产精品推荐色| 亚洲精品综合在线| 免费观看日韩av| 成人免费高清在线观看| 色88888久久久久久影院野外| 91精品免费在线| 国产欧美精品日韩区二区麻豆天美| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 免费成人在线视频观看| 国产成人综合网站| 欧美日韩在线播| 久久久蜜桃精品| 一区二区三区四区蜜桃| 秋霞午夜鲁丝一区二区老狼| 成人激情开心网| 欧美一级欧美一级在线播放| 国产欧美视频一区二区三区| 亚洲国产日韩av| 成人黄色大片在线观看| 欧美一区二区三区成人| 国产精品的网站| 青青国产91久久久久久| 色综合咪咪久久| 久久精品视频免费| 日韩精品1区2区3区| 成人高清视频在线观看| 欧美一区二区高清| 亚洲精品国产成人久久av盗摄 | 婷婷综合久久一区二区三区| 韩国精品久久久| 3d动漫精品啪啪| 亚洲精品国产一区二区精华液 | 在线观看不卡一区| 亚洲国产电影在线观看| 免费成人美女在线观看| 91电影在线观看| 中文字幕亚洲一区二区va在线| 久久精品免费观看| 777色狠狠一区二区三区| 中文字幕一区二区日韩精品绯色| 黑人巨大精品欧美一区| 91精品中文字幕一区二区三区| 亚洲天堂精品视频| 国产91在线看| 国产三级精品视频| 国内精品免费在线观看| 日韩午夜激情视频| 免费在线观看成人| 欧美年轻男男videosbes| 尤物在线观看一区| 一本久久综合亚洲鲁鲁五月天| 国产女人18毛片水真多成人如厕| 久久99国产精品免费网站| 欧美一区日本一区韩国一区| 亚洲成人激情社区| 欧美日韩专区在线| 亚洲国产成人av好男人在线观看| av电影在线观看完整版一区二区| 欧美国产激情一区二区三区蜜月| 国产精品一区免费视频| 久久久噜噜噜久久人人看| 国产在线播精品第三| 国产丝袜欧美中文另类|