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

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

?? mountlib.c

?? vxworks的完整的源代碼
?? 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一区二区三区免费野_久草精品视频
日韩电影在线观看电影| 欧美精品aⅴ在线视频| 欧美国产97人人爽人人喊| 国产乱子轮精品视频| 亚洲国产精品二十页| av网站免费线看精品| 亚洲伦理在线精品| 欧美性大战久久久| 日本色综合中文字幕| 精品国产污污免费网站入口| 国产精品一区一区| 亚洲国产精品v| 欧美亚洲精品一区| 欧美aaaaaa午夜精品| 国产三级欧美三级| 色94色欧美sute亚洲线路二| 午夜成人免费视频| 久久久综合视频| 91在线观看高清| 蜜桃一区二区三区四区| 久久久不卡网国产精品二区| 色综合色综合色综合| 五月婷婷综合激情| 国产夜色精品一区二区av| 色综合色狠狠综合色| 久久疯狂做爰流白浆xx| 最新高清无码专区| 日韩一区二区三区视频| av一区二区三区| 成人精品电影在线观看| 亚洲综合免费观看高清在线观看| 日韩欧美亚洲一区二区| 91麻豆精东视频| 美国十次综合导航| 亚洲欧美欧美一区二区三区| 欧美一区2区视频在线观看| www.色综合.com| 美日韩一级片在线观看| 一区二区三国产精华液| 久久久久亚洲蜜桃| 欧美日韩激情一区| av午夜一区麻豆| 国产麻豆精品在线| 青青草一区二区三区| 一区二区三区在线观看动漫| 久久精品欧美一区二区三区麻豆 | 一区二区三区在线看| 精品日韩一区二区三区| 欧洲日韩一区二区三区| 成人高清免费观看| 韩国av一区二区三区| 日韩欧美一区二区三区在线| 久久99精品国产麻豆婷婷| 亚洲国产日韩a在线播放性色| 国产女主播视频一区二区| 91精品黄色片免费大全| 欧美日韩一级二级| 色av一区二区| 91色在线porny| 成人免费视频视频在线观看免费 | 欧美国产一区二区在线观看| 欧美v日韩v国产v| 欧美日韩极品在线观看一区| 欧美性生活大片视频| 91日韩精品一区| 成人免费观看视频| 大尺度一区二区| 国产丶欧美丶日本不卡视频| 国产一区二区h| 久久不见久久见免费视频1| 麻豆精品精品国产自在97香蕉| 性做久久久久久久久| 亚洲一区二区三区视频在线| 一区二区三区四区精品在线视频| 国产精品视频第一区| 国产精品久久久久久亚洲毛片| 国产色产综合色产在线视频 | 日韩丝袜美女视频| 正在播放亚洲一区| 欧美男人的天堂一二区| 777午夜精品免费视频| 欧美一区二区三区视频在线| 91精品国产美女浴室洗澡无遮挡| 777a∨成人精品桃花网| 欧美成人女星排行榜| 精品99一区二区| 国产欧美日韩卡一| 日韩理论片一区二区| 夜夜揉揉日日人人青青一国产精品| 亚洲一区二区美女| 日本伊人精品一区二区三区观看方式| 日本不卡视频一二三区| 激情文学综合网| av电影天堂一区二区在线观看| 一本大道久久a久久综合| 欧美性欧美巨大黑白大战| 3d动漫精品啪啪一区二区竹菊| 日韩一区二区影院| 中文字幕第一页久久| 亚洲青青青在线视频| 午夜影视日本亚洲欧洲精品| 日本欧美久久久久免费播放网| 狠狠久久亚洲欧美| 91免费版pro下载短视频| 欧美系列日韩一区| 欧美精品一区二区三区高清aⅴ| 久久久久高清精品| 亚洲精品欧美综合四区| 美女一区二区视频| av成人动漫在线观看| 91精品在线一区二区| 久久精品亚洲麻豆av一区二区 | 国产毛片精品视频| av成人动漫在线观看| 这里只有精品电影| 国产精品欧美一区二区三区| 午夜精品久久久久久久久| 国产一区在线不卡| 欧美日韩免费观看一区三区| www国产精品av| 亚洲成a人在线观看| 国产成人在线色| 欧美精品在欧美一区二区少妇| 久久久精品国产免费观看同学| 一区二区三区 在线观看视频| 国内成人免费视频| 欧美日韩国产高清一区二区三区 | 色噜噜狠狠一区二区三区果冻| 欧美一级视频精品观看| 亚洲美女一区二区三区| 久久99精品久久久久久| 91福利在线导航| 国产欧美一区二区精品性色| 日韩成人一级片| 91国产视频在线观看| 蜜桃av一区二区在线观看| 99国产精品久久久| 精品国产乱码久久| 视频一区欧美日韩| 日本韩国欧美一区| 国产精品午夜春色av| 国产在线看一区| 91精品婷婷国产综合久久性色 | 亚洲激情男女视频| 国产不卡视频在线播放| 日韩精品综合一本久道在线视频| 亚洲综合图片区| 91亚洲精华国产精华精华液| 国产亚洲一区二区三区四区| 精品一区免费av| 7777精品伊人久久久大香线蕉完整版 | 欧美专区亚洲专区| 日韩一区欧美小说| 成人午夜免费视频| 中文字幕乱码久久午夜不卡| 国产黄色精品视频| 久久美女高清视频| 国产精品99久久不卡二区| 精品人伦一区二区色婷婷| 日本少妇一区二区| 制服丝袜亚洲网站| 秋霞成人午夜伦在线观看| 91精品国产高清一区二区三区 | 日韩av高清在线观看| 欧美群妇大交群中文字幕| 一区二区三区.www| 欧美日韩精品一二三区| 亚洲国产精品久久艾草纯爱| 欧美性生活影院| 日韩精品成人一区二区三区| 欧美一区二区三区免费大片| 日韩电影在线一区| 日韩一区二区电影| 精品一区二区免费| 久久精品夜夜夜夜久久| 成人av在线网| 亚洲久草在线视频| 欧美午夜精品一区二区三区| 天堂av在线一区| 欧美精品一区二区三区蜜臀| 国产综合久久久久久久久久久久| 久久综合资源网| 成人福利视频在线| 一区二区三区中文在线| 欧美性生交片4| 久久精品国产**网站演员| 精品久久久久香蕉网| 高清成人免费视频| 一区二区日韩av| 欧美电影精品一区二区| 国产91在线|亚洲| 亚洲国产视频在线| 欧美不卡视频一区| 91在线视频播放地址| 日韩和欧美的一区| 中文在线一区二区| 欧美日韩国产经典色站一区二区三区 | 欧美性videosxxxxx| 欧美色图激情小说| 国内欧美视频一区二区|