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

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

?? mountlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* mountLib.c - Mount protocol library *//* Copyright 1994 - 2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01s,10may02,kbw  making man page edits01r,07may02,kbw  making man page edits01q,05nov01,vvv  made max. path length configurable (SPR #63551)01p,05nov01,wap  Fix memory leak in mountproc_umnt_1 and mountproc_umntall_1                 (SPR #63489)01o,15oct01,rae  merge from truestack ver 01v, base 01m (SPRs 62705,                 29301/29362, 32821/31223)01n,04dec00,ijm  fixed file descriptor leak in nfsUnexport (SPR# 7531)01n,21jun00,rsh  upgrade to dosFs 2.001l,05nov98,rjc  modifications for dosfs2.01m,14mar99,jdi  doc: removed refs to config.h and/or configAll.h (SPR 25663).01l,05feb99,dgp  document errno values01k,26aug97,spm  removed compiler warnings (SPR #7866)01j,12dec96,jag  fix spr 7601 on procedure mountproc_umnt_1, deleted unused		 variable deleteThis.01i,30aug95,rch  fix for spr 4333.01h,27feb95,jdi  doc: changed dosFsMode to dosFsFileMode (doc only) (SPR 4085).01g,11feb95,jdi  doc format repair.01f,24jan95,rhp  update initialization info for exportable file systems,                 and misc doc tweaks01e,11may94,jmm  integrated Roland's doc changes01d,25apr94,jmm  doc cleanup; changed mode to readOnly in NFS_EXPORT_ENTRY01c,21apr94,jmm  fixed problem with mountproc_dump_1 overwritting strings                 documentation cleanup, reordered routines01b,20apr94,jmm  formatting cleanup, mountproc_dump_1 and mountproc_exports_1                 fixed01a,07mar94,jmm  written*//*DESCRIPTIONThis library implements a mount server to support mounting VxWorksfile systems remotely.  The mount server is an implementation ofversion 1 of the mount protocol as defined in RFC 1094.  It is closelyconnected with version 2 of the Network File System ProtocolSpecification, which in turn is implemented by the library nfsdLib.\&NOTE: The only routines in this library that are normally called byapplications are nfsExport() and nfsUnexport().  The mount daemon isnormally initialized indirectly by nfsdInit().The mount server is initialized by calling mountdInit().  Normally,this is done by nfsdInit(), although it is possible to callmountdInit() directly if the NFS server is not being initialized.Defining INCLUDE_NFS_SERVER enables the call to nfsdInit() duringthe boot process, which in turn calls mountdInit(), so there isnormally no need to call either routine manually.  mountdInit() spawnsone task, `tMountd', which registers as an RPC service with theportmapper.Currently, only the dosFsLib file system is supported.File systems are exported with the nfsExport() call.To export VxWorks file systems via NFS, you need facilities from boththis library and from nfsdLib.  To include both, add INCLUDE_NFS_SERVERand rebuild VxWorks..SS ExampleThe following example illustrates how to export anexisting dosFs file system.First, initialize the block device containing your file system.Then assuming the dosFs system is called "/export" execute the following code on the target:.CSnfsExport ("/export", 0, FALSE, 0);           /@ make available remotely @/.CEThis makes it available to allclients to be mounted using the client's NFS mounting command.  (OnUNIX systems, mounting file systems normally requires root privileges.)VxWorks does not normally provide authentication services for NFSrequests, and the DOS file system does not provide file permissions.If you need to authenticate incoming requests, see the documentationfor nfsdInit() and mountdInit() for information about authorizationhooks.The following requests are accepted from clients.  For details oftheir use, see Appendix A of RFC 1094, "NFS: Network File SystemProtocol Specification.".TStab(|);lf3 lf3l n. Procedure Name     |   Procedure Number_ MOUNTPROC_NULL     |   0 MOUNTPROC_MNT      |   1 MOUNTPROC_DUMP     |   2 MOUNTPROC_UMNT     |   3 MOUNTPROC_UMNTALL  |   4 MOUNTPROC_EXPORT   |   5.TESEE ALSO: dosFsLib, nfsdLib, RFC 1094INTERNAL: mountd is not reentrant, and there cannot be more than onemountd task running at any one time.The routines called by mountd are named mountproc_ROUTINENAME_1.  Thisis the standard RPC naming convention used by code generated fromrpcgen.*//* LINTLIBRARY */#include "vxWorks.h"#include "sys/stat.h"#include "ioLib.h"#include "taskLib.h"#include "lstLib.h"#include "mountLib.h"#include "nfsdLib.h"#include "pathLib.h"#include "rpcLib.h"#include "rpc/pmap_clnt.h"#include "rpc/rpc.h"#include "rpcLib.h"#include "inetLib.h"#include "semLib.h"#include "hostLib.h"#include "stdio.h"#include "stdlib.h"#include "string.h"#include "xdr_nfsserv.h"#include "private/nfsHashP.h"#include "memPartLib.h"/* defines */#ifndef KHEAP_REALLOC#define KHEAP_REALLOC(pBuf,newsize) 	memPartRealloc(memPartIdKernel,pBuf,newsize)#endif /* KHEAP_REALLOC */#ifdef __GNUC__# ifndef alloca#  define alloca __builtin_alloca# endif#endif/* IMPORTS */IMPORT int nfsMaxPath;  /* max. length of file path *//* DATA STRUCTURES */typedef struct    {    char * next;           /* next and prev are used by lstLib */    char * prev;    char   clientName [MAXHOSTNAMELEN + 1]; /* name of the host mounting this					     * directory */    /*     * Mounted directory. Though it appears a single character, it is a char     * array. The array is allocated when a MOUNT_CLIENT struct is allocated.     * This change was required for adding configurable path length support.     */    char   directory [1];            } MOUNT_CLIENT;/* GLOBALS */int     mountdNExports = MAX_EXPORTED_FILESYSTEMS; /* max. num. exported FS's */int     mountdTaskId           = 0;	        /* Task ID of the mountd task */int     mountdPriorityDefault  = MOUNTD_PRIORITY_DEFAULT; /* default priority */int     mountdStackSizeDefault = MOUNTD_STACKSIZE_DEFAULT; /* default stack   *//* LOCALS */LOCAL FUNCPTR mountdAuthHook = NULL; /* Hook to run to authorize packets */LOCAL LIST *  mountPoints = NULL; /* Linked list of exported mount points */LOCAL SEM_ID  mountSem    = NULL; /* Sem controlling access to mountPoints */LOCAL LIST *  nfsClients  = NULL; /* Linked list of clients mounting fs's */LOCAL SEM_ID  clientsSem  = NULL; /* Sem controlling access to nfsClients */LOCAL int     fsIdNumber  = 1;	/* ID number for exported file systems *//* forward LOCAL functions */LOCAL void mountdRequestProcess (struct svc_req * rqstp,				 register SVCXPRT * transp);LOCAL char * svc_reqToHostName (struct svc_req * rqstp, char * hostName);LOCAL MOUNT_CLIENT * mountListFind (struct svc_req * rqstp, dirpath * path);/******************************************************************************** mountdInit - initialize the mount daemon* * This routine spawns a mount daemon if one does not already* exist.  Defaults for the <priority> and <stackSize> arguments are* in the global variables `mountdPriorityDefault' and* `mountdStackSizeDefault', and are initially set to* MOUNTD_PRIORITY_DEFAULT and MOUNTD_STACKSIZE_DEFAULT respectively.** Normally, no authorization checking is performed by either mountd or* nfsd.  To add authorization checking, set <authHook> to point to a* routine declared as follows:** .CS* nfsstat routine*     (*     int                progNum,       /@ RPC program number @/*     int                versNum,	/@ RPC program version number @/*     int                procNum,	/@ RPC procedure number @/*     struct sockaddr_in clientAddr,    /@ address of the client @/*     MOUNTD_ARGUMENT *  mountdArg   	/@ argument of the call @/*     )* .CE* * The <authHook> callback must return OK if the request is authorized,* and any defined NFS error code (usually NFSERR_ACCES) if not.** VXWORKS AE PROTECTION DOMAINS* Under VxWorks AE, you can call mountdInit() from within the kernel * protection domain only, and the function referenced in the <authHook> * parameter must reside in the kernel protection domain.  * This restriction does not apply under non-AE versions of VxWorks.  ** RETURNS: OK, or ERROR if the mount daemon could not be correctly* initialized.*/STATUS mountdInit    (    int priority,		/* priority of the mount daemon            */    int stackSize,		/* stack size of the mount daemon          */    FUNCPTR authHook,		/* hook to run to authorize each request   */    int nExports,		/* maximum number of exported file systems */    int options			/* currently unused - set to 0             */    )    {    if (0 != mountdTaskId)	{	printf ("Mount daemon already initialized\n");	return (ERROR);	}    mountdAuthHook = authHook;    if (nExports > 0)        mountdNExports = nExports;    if ((nfsClients = KHEAP_ALLOC (sizeof (*nfsClients))) == NULL)        return (ERROR);    if ((clientsSem = semMCreate (SEM_Q_PRIORITY)) == NULL)	{	KHEAP_FREE ((char *)nfsClients);	return (ERROR);	}    lstInit (nfsClients);        if ((mountPoints = KHEAP_ALLOC (sizeof (*mountPoints))) == NULL)            return (ERROR);    if ((mountSem = semMCreate (SEM_Q_PRIORITY)) == NULL)        {        KHEAP_FREE ((char *)mountPoints);        return (ERROR);        }     lstInit (mountPoints);    if (priority == 0)	priority = mountdPriorityDefault;    if (stackSize == 0)	stackSize = mountdStackSizeDefault;        if ((mountdTaskId = taskSpawn ("tMountd", priority, 0, stackSize,				(FUNCPTR) mountd, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))	== ERROR)	{	perror ("Could not spawn mountd task");	return (ERROR);	}    return (OK);    }/******************************************************************************** mountd - mount daemon process** This routine processes incoming mount daemon requests.  It is* normally used as the entry point of a task by mountdInit() and* should not be called directly.  It will only return if svc_run()* returns, which should only happen if select() returns an error.* * This routine is global only so that its name will appear in the* task display list.* * Most of this routine was generated by rpcgen.** RETURNS: N/A* * NOMANUAL*/void mountd    (    void    )    {    register SVCXPRT *transp;        rpcTaskInit ();        (void) pmap_unset(MOUNTPROG, MOUNTVERS);    transp = svcudp_create(RPC_ANYSOCK);    if (transp == NULL)	{	fprintf(stderr, "cannot create udp service.");	exit(1);	}        if (!svc_register(transp, MOUNTPROG, MOUNTVERS, mountdRequestProcess,		      IPPROTO_UDP))	{	fprintf(stderr, "unable to register (MOUNTPROG, MOUNTVERS, udp).");	exit(1);	}        svc_run();    /* Should never reach this point */        fprintf(stderr, "svc_run returned");    exit(1);    }/******************************************************************************** mountdRequestProcess - process mount requests* * This routine is registered from the mountd process via* svc_register().  It parses the incoming request, decides which* mountproc_*_1 routine to call, calls it, and sends the reply back* to the client.* * NOTE:  Most of this routine was generated by rpcgen.* * RETURNS:  N/A.* * NOMANUAL*/LOCAL void mountdRequestProcess    (    struct svc_req *   rqstp,    register SVCXPRT * transp    )    {    MOUNTD_ARGUMENT argument;    char *          result = NULL;    bool_t          (*xdr_argument)(), (*xdr_result)();    char *          (*local)();    nfsstat         authorized;	/* return val of user auth routine */	    switch (rqstp->rq_proc)	{	case MOUNTPROC_NULL:	    xdr_argument = xdr_void;	    xdr_result = xdr_void;	    local = (char *(*)()) mountproc_null_1;	    break;	case MOUNTPROC_MNT:	    xdr_argument = xdr_dirpath;	    xdr_result = xdr_fhstatus;	    local = (char *(*)()) mountproc_mnt_1;	    break;	case MOUNTPROC_DUMP:	    xdr_argument = xdr_void;	    xdr_result = xdr_mountlist;	    local = (char *(*)()) mountproc_dump_1;	    break;	case MOUNTPROC_UMNT:	    xdr_argument = xdr_dirpath;	    xdr_result = xdr_void;	    local = (char *(*)()) mountproc_umnt_1;	    break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲国产一区二区三区 | 欧美性大战久久久久久久蜜臀| 日本在线不卡视频一二三区| 亚洲男帅同性gay1069| 国产精品白丝在线| 亚洲你懂的在线视频| 亚洲激情网站免费观看| 亚洲欧美日韩在线| 亚洲在线视频一区| 日本欧美在线看| 精品一区二区在线播放| 国产精品一区一区| 91在线视频观看| 色天使色偷偷av一区二区| 成人性视频网站| 色综合久久中文字幕| 欧美狂野另类xxxxoooo| 精品久久国产老人久久综合| 久久久综合视频| 亚洲三级在线播放| 男女男精品视频网| 成人小视频免费在线观看| 色综合天天综合| 91精品婷婷国产综合久久性色 | 99麻豆久久久国产精品免费优播| 色婷婷av一区二区三区大白胸| 91麻豆精品久久久久蜜臀| 精品国产一二三区| 亚洲免费观看在线视频| 日韩不卡一区二区三区 | 九九在线精品视频| jizzjizzjizz欧美| 欧美老年两性高潮| 国产精品人成在线观看免费| 亚洲黄一区二区三区| 国内精品自线一区二区三区视频| 成人国产精品免费网站| 在线成人午夜影院| 国产精品你懂的在线欣赏| 亚洲电影一级黄| 国产乱子伦视频一区二区三区| 色婷婷av一区二区三区gif| 欧美一区二区成人| 国产精品乱码一区二区三区软件| 日韩电影在线免费观看| av一区二区三区黑人| 日韩视频国产视频| 中文字幕一区二区三区四区 | 欧美高清精品3d| 国产精品乱人伦中文| 美女www一区二区| 色8久久人人97超碰香蕉987| 久久亚洲一级片| 五月天激情综合网| 欧日韩精品视频| 国产精品天美传媒沈樵| 久久99国产精品久久99果冻传媒| 91社区在线播放| 久久久www成人免费毛片麻豆 | 亚洲国产精品二十页| 日韩电影在线观看网站| 色哟哟精品一区| 国产精品久久久久久久蜜臀| 美女视频黄免费的久久| 91精品视频网| 亚洲成人第一页| 欧美亚洲国产一区二区三区 | 久久精品一区二区三区不卡牛牛| 国产精品人妖ts系列视频| 国产精品综合二区| 欧美精品一区二区高清在线观看| 三级亚洲高清视频| 91精品国产入口| 性欧美疯狂xxxxbbbb| av激情综合网| 国产精品天美传媒沈樵| 不卡电影免费在线播放一区| 国产精品美女久久久久久久网站| 九九精品一区二区| 久久嫩草精品久久久精品| 久久精品99国产精品| 欧美成人午夜电影| 国产综合一区二区| 国产欧美一区二区精品性色超碰 | 久久久久综合网| 黑人巨大精品欧美黑白配亚洲| 精品少妇一区二区三区视频免付费 | 国产精品三级电影| 91网站在线观看视频| 亚洲欧美在线另类| 欧美主播一区二区三区美女| 一区二区三区欧美| 在线成人av影院| 午夜精品爽啪视频| 欧美一二区视频| 韩国女主播一区二区三区| 久久久久久久久岛国免费| 国产成人精品网址| 亚洲精品欧美激情| 欧美色偷偷大香| 免费欧美在线视频| 国产欧美1区2区3区| 99久久国产综合精品麻豆| 丝袜亚洲另类欧美| 久久亚洲免费视频| 91小视频在线免费看| 婷婷久久综合九色综合绿巨人 | 亚洲精选一二三| 欧美一二区视频| 99精品久久只有精品| 视频一区欧美日韩| 国产精品久久久一区麻豆最新章节| 色婷婷精品久久二区二区蜜臀av | 26uuu亚洲综合色| 91久久国产综合久久| 奇米色777欧美一区二区| 国产欧美精品一区二区色综合朱莉| 91丨porny丨蝌蚪视频| 日韩精品五月天| 中文一区二区完整视频在线观看| 欧美日韩五月天| 成人av在线资源网| 免费观看在线色综合| 亚洲黄一区二区三区| 国产日产欧美一区| 欧美一区二区网站| 在线观看亚洲成人| 99精品偷自拍| 国产乱子伦一区二区三区国色天香| 亚洲一区二区综合| 欧美激情资源网| 精品国产乱码久久久久久浪潮| 在线视频亚洲一区| 成人福利视频在线看| 九色综合狠狠综合久久| 三级精品在线观看| 亚洲线精品一区二区三区八戒| 国产精品素人一区二区| 精品粉嫩超白一线天av| 日韩欧美色综合| 欧美精品aⅴ在线视频| 在线观看91视频| 色乱码一区二区三区88| 日本欧美加勒比视频| 视频一区二区欧美| 亚洲一区二区四区蜜桃| 亚洲免费在线看| 亚洲美腿欧美偷拍| 亚洲免费观看高清完整版在线观看| 中文字幕av资源一区| 国产亚洲成av人在线观看导航| 精品日韩在线观看| 精品久久久久久亚洲综合网 | 亚洲精品自拍动漫在线| 国产精品萝li| 亚洲色图欧洲色图| 一区二区激情视频| 亚洲一二三区不卡| 天堂久久一区二区三区| 青青青伊人色综合久久| 丝袜脚交一区二区| 美女被吸乳得到大胸91| 精品亚洲国内自在自线福利| 国产精品香蕉一区二区三区| 粉嫩aⅴ一区二区三区四区| 国产99久久久国产精品| av成人免费在线观看| 色噜噜狠狠色综合中国| 欧美三级在线看| 欧美www视频| 久久久久综合网| 亚洲三级电影网站| 视频一区国产视频| 国产成人在线观看免费网站| 成人av免费网站| 欧美日韩精品一区二区三区| 欧美videos中文字幕| 国产精品天天看| 午夜成人免费电影| 国产一区二区三区免费播放| 波多野结衣91| 欧美精选一区二区| 久久色在线观看| 亚洲美女免费视频| 精品一区二区在线视频| caoporen国产精品视频| 69久久99精品久久久久婷婷| 国产亚洲美州欧州综合国| 一区二区三区免费网站| 久久综合综合久久综合| 972aa.com艺术欧美| 91精品国产91热久久久做人人| 国产午夜一区二区三区| 亚洲最色的网站| 国产福利一区二区三区在线视频| 欧美性淫爽ww久久久久无| 久久久噜噜噜久噜久久综合| 洋洋av久久久久久久一区| 国产成人在线电影| 欧美一区二区三区视频|