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

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

?? 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;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲自拍偷拍av| 欧美性猛片aaaaaaa做受| 免费在线观看不卡| 亚洲福中文字幕伊人影院| 一区二区高清免费观看影视大全| 国产精品高潮呻吟| 亚洲欧洲日本在线| 亚洲欧美日韩在线播放| 亚洲美女电影在线| 亚洲狠狠爱一区二区三区| 亚洲国产视频一区| 日韩中文字幕区一区有砖一区| 欧美精品久久99久久在免费线| 在线观看一区二区视频| 欧美日韩视频在线第一区| 欧美男生操女生| 日韩欧美久久一区| 色妞www精品视频| 精品视频1区2区| 91精品在线一区二区| 精品捆绑美女sm三区| 久久久久久久久久久久久久久99| 久久久精品天堂| 亚洲视频一区在线观看| 亚洲国产精品一区二区久久| 日韩av一区二区三区| 国产精品欧美精品| 一区二区三区高清在线| 偷拍一区二区三区四区| 黄色日韩三级电影| www.av亚洲| 欧美三级中文字幕| 久久综合狠狠综合久久激情 | 欧美精品久久99| 夫妻av一区二区| 欧美在线观看18| 日韩视频一区二区三区| 国产精品理伦片| 日韩国产欧美在线播放| 国产激情一区二区三区| 日本韩国精品一区二区在线观看| 欧美一区二区三区喷汁尤物| 国产欧美精品一区二区三区四区| 亚洲精品菠萝久久久久久久| 美腿丝袜亚洲综合| 99精品视频一区二区| 717成人午夜免费福利电影| 国产农村妇女精品| 亚洲国产一区二区在线播放| 国产一区二区精品在线观看| 欧美性猛片xxxx免费看久爱| 国产午夜精品福利| 亚洲va韩国va欧美va| 成人综合婷婷国产精品久久| 欧美情侣在线播放| 亚洲欧美视频在线观看视频| 激情深爱一区二区| 欧美三级电影在线观看| 国产欧美一区二区精品性色| 午夜日韩在线观看| 成人app下载| 精品国产一区二区三区久久影院| 亚洲欧美一区二区三区极速播放| 玖玖九九国产精品| 在线观看网站黄不卡| 久久精品人人做| 日本不卡高清视频| 91激情在线视频| 中文字幕不卡在线播放| 麻豆精品视频在线观看免费 | 久久久精品中文字幕麻豆发布| 一区二区三区**美女毛片| 国产精品一区二区在线观看网站 | 国产网红主播福利一区二区| 午夜av一区二区| 91麻豆精品一区二区三区| 国产日韩欧美一区二区三区乱码| 亚洲h在线观看| 亚洲成人tv网| 色综合久久天天综合网| 国产精品美女久久久久久2018 | 日本成人中文字幕| 色伊人久久综合中文字幕| 国产精品视频九色porn| 国产伦精品一区二区三区视频青涩 | 2017欧美狠狠色| 日韩精品免费视频人成| 欧美无乱码久久久免费午夜一区| 最新高清无码专区| 粉嫩久久99精品久久久久久夜| 日韩一区二区电影在线| 亚洲国产精品人人做人人爽| 日本道精品一区二区三区| 国产精品污网站| 懂色中文一区二区在线播放| 久久视频一区二区| 狠狠色丁香婷婷综合久久片| 日韩欧美一二三四区| 视频一区欧美日韩| 6080yy午夜一二三区久久| 性久久久久久久| 欧美日韩视频一区二区| 亚洲超碰97人人做人人爱| 欧美色电影在线| 日日夜夜免费精品视频| 日韩午夜av一区| 轻轻草成人在线| 26uuu亚洲综合色欧美| 国产麻豆精品theporn| 国产视频不卡一区| 国产91丝袜在线播放0| 中文字幕一区二区视频| 99国产欧美另类久久久精品| 亚洲免费毛片网站| 在线观看亚洲精品| 日本在线不卡视频| 精品精品欲导航| 国产成人在线看| 美女尤物国产一区| 久久久噜噜噜久久人人看 | 国产一区二区三区在线观看免费视频| 欧美成人video| 高清视频一区二区| 一区二区视频在线| 在线成人av影院| 国产成人午夜精品5599| 自拍偷拍欧美激情| 欧美日韩国产大片| 国产一区日韩二区欧美三区| 国产欧美精品在线观看| 日本精品一级二级| 久久精品国产网站| 国产精品国产三级国产普通话三级 | 日韩一区二区三区视频在线| 国产精品自在欧美一区| 自拍偷在线精品自拍偷无码专区| 欧美日韩一区二区三区四区五区| 麻豆成人在线观看| 国产精品黄色在线观看| 欧美日韩久久久久久| 国产一区 二区 三区一级| 亚洲视频在线观看一区| 欧美一卡2卡3卡4卡| 成人性生交大片免费看中文网站| 夜夜嗨av一区二区三区四季av | 亚洲h动漫在线| 久久久久久免费| 91久久精品一区二区| 看电视剧不卡顿的网站| 亚洲美女偷拍久久| 亚洲精品在线观| 麻豆精品一区二区综合av| 国产精品国产三级国产aⅴ入口| 在线播放中文字幕一区| 成人免费视频caoporn| 婷婷夜色潮精品综合在线| 国产色一区二区| 久久国产精品免费| 夜夜爽夜夜爽精品视频| 久久在线免费观看| 欧美日韩国产成人在线免费| eeuss鲁片一区二区三区| 日韩国产一区二| 一区二区三区四区国产精品| 久久综合狠狠综合久久综合88| 久久久欧美精品sm网站| 欧美日韩国产另类不卡| 97久久精品人人做人人爽50路 | 色婷婷亚洲婷婷| 国产精品一区二区视频| 丝袜a∨在线一区二区三区不卡| 中文字幕高清一区| 欧美大片国产精品| 欧美亚洲高清一区二区三区不卡| 国产suv精品一区二区三区| 日本系列欧美系列| 日韩视频国产视频| 欧美三级视频在线播放| 成人开心网精品视频| 国产精品影视在线| 久久精品国产精品亚洲精品| 亚洲第一综合色| 一区二区三区高清在线| 亚洲天堂中文字幕| 国产精品免费丝袜| 久久久久久久久久久久电影 | 在线观看91视频| 99久精品国产| voyeur盗摄精品| 国产成人精品影院| 国产一区二区三区黄视频| 另类综合日韩欧美亚洲| 首页国产欧美日韩丝袜| 午夜精品成人在线视频| 一区二区三区影院| 亚洲精品伦理在线| 亚洲视频精选在线| 中文字幕日本乱码精品影院| 欧美嫩在线观看| 国产麻豆欧美日韩一区|