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

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

?? nfsdlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
    nfsstat       authorized;	/* request is authorized if == NFS_OK*/        /* Initialize task for VxWorks RPC work */        rpcTaskInit ();    transp = svcudp_create(-1);    /* Work loop is repeated until catastrophic error encountered */        FOREVER	{	/* Get the next message */		if (msgQReceive (nfsRequestQ, (char *) &request, sizeof(request),			 WAIT_FOREVER) == ERROR)	    {	    perror ("NFS server aborted abnormally");	    return;	    }	/* Break down the incoming message */		local        = request.routine;	argument     = request.argument;	xdr_argument = request.xdrArg;  	xdr_result   = request.xdrResult;	addr         = &request.sockAddr;	xid          = request.xid;	sock         = request.socket;	/* Create a new RPC transport to reply.  Need to do this as	 * next incoming client request will alter xid field of old	 * transport, and replies won't match the correct request.	 */	transp->xp_sock = sock;	((struct svcudp_data *) transp->xp_p2)->su_xid = xid;	transp->xp_raddr = *addr;	memset (&transp->xp_verf, 0, sizeof(transp->xp_verf));	transp->xp_addrlen = sizeof (transp->xp_raddr);	/* Authenticate the request, then call the correct NFS routine */	if (nfsdAuthHook)	    {	    authorized = (*nfsdAuthHook) (NFS_PROGRAM, NFS_VERSION,					  request.procNum, request.sockAddr,					  argument);	    }	else	    authorized = NFS_OK;	if (authorized  != NFS_OK)	    {	    result = KHEAP_ALLOC(sizeof (nfsstat));	    if (NULL != result)		{		bzero ((char *)result, sizeof (nfsstat));		}	    *((nfsstat *) result) = authorized;	    }	else	    result = (char *) (*local)(argument);	/* Send the result */		if (result != NULL && !svc_sendreply(transp, xdr_result, result))	    {	    svcerr_systemerr(transp);	    }	/* Free any space used by RPC/XDR */		if (!svc_freeargs(transp, xdr_argument, argument))	    {	    perror ("unable to free arguments for NFS server");	    return;	    }	/* Free space allocated when request was queued up */		KHEAP_FREE((char *)result);	KHEAP_FREE((char *)argument);	/* Unfortunately, there's no way to tell svc_destroy() to not close	 * the socket.  So, set the socket to -1. svc_destroy() doesn't	 * check the value of the close() anyway.  If errno is set to	 * S_iosLib_INVALID_FILE_DESCRIPTOR due to the close (-1), reset it	 * to OK.  (svc_destroy() returns NULL, so there's no way to check	 * its return value.)	 */		}    transp->xp_sock = -1;    svc_destroy (transp);    if (errno == S_iosLib_INVALID_FILE_DESCRIPTOR)        errno = OK;    }/******************************************************************************** nfsd - NFS daemon process** Used as the entrypoint to a task spawned from nfsdInit().  This task* sets up the NFS RPC service, and calls svc_run(), which should never return.* nfsdRequestEnqueue() is called from the svc_run() call.** This routine is not declared LOCAL only because the symbol for its entry* point should be displayed by i().* * NOTE:  Some of this routine was generated by rpcgen.* * RETURNS:  Never returns unless an error is encountered.* * SEE ALSO: nfsdRequestEnqueue().* * NOMANUAL*/void nfsd    (    void    )    {    register SVCXPRT * transp;	/* RPC transport */    int                sock;	/* NFS socket */    struct sockaddr_in addr;	/* Address of NFS (port 2049 */    int                optVal = NFS_MAXDATA * 2 + sizeof (struct rpc_msg) * 2;                                /* XXX - too much space is wasted here */        /* Initialize the task to use VxWorks RPC code */        rpcTaskInit();    /* Create NFS socket and bind it to correct address */        sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);    /* Set up the socket address */        addr.sin_family             = AF_INET;    addr.sin_addr.s_addr        = INADDR_ANY;    addr.sin_port               = htons (NFS_PORT);    bzero (addr.sin_zero, sizeof (addr.sin_zero));    if (bind (sock, (struct sockaddr *) &addr, sizeof (addr)) == ERROR)	{	perror ("Could not bind to NFS port address");	return;	}    /* Unset any previous NFS services */    pmap_unset(NFS_PROGRAM, NFS_VERSION);    /* Set socket buffer large enough to accommodate max NFS message */    if ((setsockopt (sock, SOL_SOCKET, SO_SNDBUF, (char *)&optVal,		     sizeof (optVal)) == ERROR)	|| (setsockopt (sock, SOL_SOCKET, SO_RCVBUF, (char *)&optVal,			sizeof (optVal)) == ERROR))        return;    /* Create RPC transport */    transp = svcudp_create(sock);    if (transp == NULL)	{	fprintf(stderr, "cannot create udp service.");	exit(1);	}    /* Register NFS */    if (!svc_register(transp, NFS_PROGRAM, NFS_VERSION, nfsdRequestEnqueue,		      IPPROTO_UDP))	{	perror ("unable to register (NFS_PROGRAM, NFS_VERSION, udp).\n");	return;	}    /* Start the RPC service, and never come back */    svc_run();    /* Should never get to this point */        perror ("NFS svc_run returned");    }/******************************************************************************** nfsproc_null_2 - do nothing** RETURNS: A pointer to malloced spaced that contains no information.** NOMANUAL*/void * nfsproc_null_2    (    void    )    {    nfsdServerStatus.nullCalls++;        return ((void *) KHEAP_ALLOC(0));    }/******************************************************************************** nfsproc_getattr_2 - get file attributes** If the reply status is NFS_OK, then the reply attributes contains the* attributes for the file given by the input fhandle.* * RETURNS: A pointer to an attrstat struct.** NOMANUAL*/attrstat * nfsproc_getattr_2    (    nfs_fh *   fh /* File handle to get attributes of */    )    {    attrstat * retVal = KHEAP_ALLOC(sizeof (attrstat)); /* Struct to fill in */    nfsdServerStatus.getattrCalls++;    nfsdFhNtoh ((NFS_FILE_HANDLE *) fh);        if (retVal == NULL)        return (NULL);    /* Get the attributes for the file */        if (nfsdFattrGet ((NFS_FILE_HANDLE *) fh,			 &retVal->attrstat_u.attributes) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    else        retVal->status = NFS_OK;        return (retVal);    }/******************************************************************************** nfsproc_setattr_2 - set the attributes for a file* * The "attr" argument contains fields which are either -1 or are* the new value for the attributes of "file".  If the reply status is* NFS_OK, then the reply attributes have the attributes of the file* after the "SETATTR" operation has completed.* * Notes:  The use of -1 to indicate an unused field in "attributes" is* changed in the next version of the protocol.** NOMANUAL*/attrstat * nfsproc_setattr_2    (    sattrargs *    attr		/* Attributes to change */    )    {    attrstat *     retVal = KHEAP_ALLOC(sizeof (attrstat));/* Return info */    char *         fileName;    /* Name of the file being changed */    int 	   fd;		/* File descriptor for file being changed */    struct utimbuf timeBuf;	/* New time settings for file */    if (retVal == NULL)        return (NULL);         if ((fileName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    nfsdServerStatus.setattrCalls++;    nfsdFhNtoh ((NFS_FILE_HANDLE *) &attr->file);    /* Make sure the file system is writeable */    if (nfsdFsReadOnly((NFS_FILE_HANDLE *) &attr->file))	{	retVal->status = NFSERR_ACCES;	return (retVal);	}    if (nfsdFhToName ((NFS_FILE_HANDLE *) &attr->file, fileName) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    if (attr->attributes.mode != -1)        /* Currently don't have any way to set the mode */        ;            if (attr->attributes.uid != -1)        /* Currently don't have any way to set the uid */        ;            if (attr->attributes.gid != -1)        /* Currently don't have any way to set the gid */        ;            if (attr->attributes.size != -1)	{	/* Set the size of the file using FIOTRUNC ioctl, as VxWorks	 * doesn't have ftruncate() */	        fd = open (fileName, O_RDWR, 0666);	if (fd != ERROR)	    {	    if (ioctl (fd, FIOTRUNC, attr->attributes.size) == ERROR)		{		retVal->status = nfsdErrToNfs (errno);		close (fd);		return (retVal);		}	    else	        close (fd);	    }	else	    {	    retVal->status = nfsdErrToNfs (errno);	    close (fd);	    return (retVal);	    }	}    /* Set file time.     *     * As there's no way to set only one of these fields, if only one     * is set, set the other one to the same value.     */        if (attr->attributes.atime.seconds != -1)	timeBuf.modtime = timeBuf.actime = attr->attributes.atime.seconds;        if (attr->attributes.mtime.seconds != -1)	{	timeBuf.modtime = attr->attributes.mtime.seconds;	if (attr->attributes.atime.seconds == -1)	    timeBuf.actime = timeBuf.modtime;	}    if ((attr->attributes.atime.seconds != -1) ||	(attr->attributes.mtime.seconds != -1))        if (utime (fileName, &timeBuf) == ERROR)	    {	    retVal->status = nfsdErrToNfs (errno);	    return (retVal);	    }        /* Get the status information for the file to return */        if (nfsdFattrGet ((NFS_FILE_HANDLE *) &attr->file,			 &retVal->attrstat_u.attributes) != OK)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    retVal->status = NFS_OK;    return (retVal);    }/******************************************************************************** nfsproc_root_2 - obsolete* * Obsolete.  This procedure is no longer used because finding the root* file handle of a filesystem requires moving pathnames between client* and server.  To do this right, we would have to define a network* standard representation of pathnames.  Instead, the function of* looking up the root file handle is done by the MNTPROC_MNT procedure.* * RETURNS:  A pointer to no information.** NOMANUAL*/void * nfsproc_root_2    (    void    )    {    nfsdServerStatus.setattrCalls++;    return ((void *) KHEAP_ALLOC(0));    }/******************************************************************************** nfsproc_lookup_2 -* * If the reply "status" is NFS_OK, then the reply "file" and reply* "attributes" are the file handle and attributes for the file "name"* in the directory given by "dir" in the argument.* * RETURNS:  A pointer to a diropres struct, or NULL.** NOMANUAL*/diropres * nfsproc_lookup_2    (    diropargs * dir		/* The direcory and file to look up */    )    {    diropres *  retVal = KHEAP_ALLOC(sizeof (diropres)); /* return status */    if (retVal == NULL)        return (NULL);        nfsdServerStatus.lookupCalls++;    nfsdFhNtoh ((NFS_FILE_HANDLE *) &dir->dir);        /* Build file handle for new file */    if (nfsdFhCreate ((NFS_FILE_HANDLE *) &dir->dir, dir->name,			 (NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file)	== ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    /* Get the attributes for the newly created file handle */    if (nfsdFattrGet ((NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file,			 &retVal->diropres_u.diropres.attributes) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    retVal->status = NFS_OK;    nfsdFhHton ((NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file);        return (retVal);    }/******************************************************************************** nfsproc_readlink_2 - read from a symbolic link* * VxWorks does not support symbolic links.* * RETURNS:  A pointer to an EOPNOTSUPP error.** NOMANUAL*/readlinkres * nfsproc_readlink_2    (    nfs_fh * fh			/* File handle to read */    )    {    readlinkres * retVal = KHEAP_ALLOC(sizeof (retVal->status));    if (retVal == NULL)        return (NULL);    /* Increment statistics */    nfsdServerStatus.readlinkCalls++;    /* symbolic links not supported */    retVal->status = EOPNOTSUPP;    return (retVal);    }/******************************************************************************** nfsproc_read_2 - read data from a file* * Returns up to "count" bytes of "data" from the file given by "file",* starting at "offset" bytes from the beginning of the file.  The first* byte of the file is at offset zero.  The file attributes after the* read takes place are returned in "attributes".* * Notes:  The argument "totalcount" is unused, and is removed in the* next protocol revision.** NOMANUAL*/readres * nfsproc_read_2    (    readargs * readFile		/* File, offset, and count information */    )    {    char *     fileName;        /* Name of the file being read */    readres *  retVal = KHEAP_ALLOC(sizeof (readres) + readFile->count);				/* Return information, including read data */    char *     readData;	/* Address of read data in retVal */    int        fd;		/* File descriptor for file being read */    int	       nBytes;		/* Number of bytes actually read */    if (retVal == NULL)        return (NULL);    if ((fileName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    /* Increment statistics */    nfsdServerStatus.readCalls++;    /* set readData to point to the correct position in the return value */    readData = (char *) retVal + sizeof (readres);        nfsdFhNtoh ((NFS_FILE_HANDLE *) &readFile->file);        if (nfsdFhToName ((NFS_FILE_HANDLE *) &readFile->file, fileName)	== ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    if ((fd = open (fileName, O_RDONLY, 0)) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    if (lseek (fd, readFile->offset, SEEK_SET) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	close (fd);	return (retVal);	}    if ((nBytes = read (fd, readData, readFile->count)) == ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	close (fd);	return (retVal);	}    else	{        retVal->readres_u.reply.data.data_val = readData;	retVal->readres_u.reply.data.data_len = nBytes;	}    if (close (fd) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    if (nfsdFattrGet ((NFS_FILE_HANDLE *) &readFile->file,			 &retVal->readres_u.reply.attributes) == ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    retVal->status = NFS_OK;    return (retVal);    }/******************************************************************************** nfsproc_writecache_2 - unused*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产岛国毛片在线| 色综合一区二区| 国产精品免费人成网站| 欧美做爰猛烈大尺度电影无法无天| 日韩经典一区二区| 调教+趴+乳夹+国产+精品| 狠狠色丁香久久婷婷综合_中| 1000精品久久久久久久久| 美女被吸乳得到大胸91| 亚洲欧美精品午睡沙发| xvideos.蜜桃一区二区| 欧美日韩国产综合视频在线观看 | 国产喂奶挤奶一区二区三区| 日韩电影网1区2区| 中文字幕综合网| 久久亚洲私人国产精品va媚药| 欧美在线你懂的| 成人免费精品视频| 国产尤物一区二区| 午夜亚洲国产au精品一区二区| 成人欧美一区二区三区黑人麻豆| 久久综合久久久久88| 7777精品伊人久久久大香线蕉| 99久久久无码国产精品| 国产精品资源在线看| 日本va欧美va瓶| 亚洲电影视频在线| 一区二区三区在线观看动漫| 色吊一区二区三区| 亚洲第一综合色| 一区二区三区欧美在线观看| 一区免费观看视频| 国产精品国产三级国产| 久久精品视频免费| 亚洲女爱视频在线| 久久久激情视频| 久久影院视频免费| 精品国产成人在线影院| 精品少妇一区二区三区| 日韩一级黄色片| 欧美一区永久视频免费观看| 欧美日韩综合在线| 欧美综合一区二区| 在线观看视频一区二区| 色先锋久久av资源部| 91美女在线看| 色噜噜狠狠色综合中国| 在线亚洲人成电影网站色www| 色婷婷综合久色| 在线欧美小视频| 日产欧产美韩系列久久99| 天天综合天天做天天综合| 日本午夜精品一区二区三区电影| 五月天丁香久久| 美女高潮久久久| 国产成人在线网站| 成人app网站| 色婷婷综合久久| 欧美一级高清片| 日韩一二三四区| 精品国产凹凸成av人导航| 精品国产1区二区| 中文字幕国产一区二区| 亚洲天堂精品视频| 亚洲成在人线在线播放| 青青草视频一区| 国产馆精品极品| 日本道在线观看一区二区| 欧美一区日韩一区| 制服丝袜亚洲色图| 久久精品一区二区三区av| 日本一区二区在线不卡| 亚洲欧美日韩国产中文在线| 亚洲成av人片| 日本一区二区成人| 一区二区三区在线免费播放| 日韩av电影一区| 国产经典欧美精品| 色婷婷国产精品| 日韩一区二区三区三四区视频在线观看| www久久久久| 一区二区在线看| 国产精品夜夜嗨| 色哟哟国产精品| 精品嫩草影院久久| 亚洲精品视频在线观看免费| 亚洲成av人片一区二区三区| 国产成人综合网| 欧美日韩国产中文| 欧美国产一区二区| 亚洲大片免费看| 国产suv精品一区二区三区| 91黄色免费版| 久久久99免费| 日韩精品一区第一页| heyzo一本久久综合| 欧美精品日韩综合在线| 中文字幕乱码久久午夜不卡 | 欧美日韩久久久一区| 精品国产一区久久| 一区二区三区在线看| 成人中文字幕合集| 亚洲精品福利视频网站| 久久久欧美精品sm网站| 亚洲不卡av一区二区三区| 亚洲国产精品成人综合色在线婷婷| 欧美xxxx老人做受| 亚洲一级二级在线| 99国产精品一区| 久久久欧美精品sm网站| 美女在线一区二区| 男女性色大片免费观看一区二区| av电影一区二区| 久久久综合网站| 男人操女人的视频在线观看欧美| 在线观看欧美黄色| 国产精品高清亚洲| 国产精品主播直播| 日韩欧美国产三级| 日本最新不卡在线| 欧美日韩国产天堂| 亚洲精品ww久久久久久p站 | 成人av资源网站| 国产91精品露脸国语对白| 精品免费日韩av| 美腿丝袜在线亚洲一区| 欧美日韩国产影片| 亚洲成人av福利| 丝袜国产日韩另类美女| 欧美性大战久久久久久久 | 国产精品国产三级国产| 国产精一区二区三区| 日韩精品一区二区三区中文不卡 | 精品精品国产高清一毛片一天堂| 亚洲视频综合在线| 不卡一区二区在线| 中文字幕在线不卡| 成人avav影音| 亚洲六月丁香色婷婷综合久久| 成人av电影在线网| 最新高清无码专区| 色综合久久久久综合体桃花网| 亚洲欧美怡红院| 亚洲最新在线观看| 欧美日韩高清影院| 久久久综合网站| 成人性生交大片免费看在线播放| 欧美国产成人在线| 97久久超碰精品国产| 亚洲人xxxx| 欧美在线制服丝袜| 91麻豆精品国产综合久久久久久| 精品久久免费看| 国产乱码一区二区三区| 国产精品区一区二区三| 99久久久国产精品| 亚洲一区二区三区四区的| 欧美日韩视频一区二区| 精品理论电影在线观看| 国产a精品视频| 亚洲另类色综合网站| 欧美日韩精品免费观看视频| 日韩国产欧美在线观看| 欧美变态tickle挠乳网站| 国产成人免费9x9x人网站视频| 亚洲欧洲日产国码二区| 欧美日韩一本到| 激情伊人五月天久久综合| 国产日韩欧美电影| 在线免费观看不卡av| 免费成人结看片| 视频一区欧美日韩| 久久品道一品道久久精品| www.激情成人| 国产精品久久久久久福利一牛影视| 色香色香欲天天天影视综合网| 日本欧美肥老太交大片| 国产天堂亚洲国产碰碰| 91久久精品网| 国内精品嫩模私拍在线| 九九视频精品免费| 欧美大片免费久久精品三p| 成人国产精品免费观看| 天天综合日日夜夜精品| 欧美激情一二三区| 欧美精品在线一区二区三区| 国产成人av电影在线| 亚洲国产精品久久久久婷婷884 | 亚洲乱码国产乱码精品精的特点| 欧美老女人在线| 风流少妇一区二区| 日韩vs国产vs欧美| 自拍偷在线精品自拍偷无码专区| 久久99最新地址| 亚洲另类在线一区| 久久色视频免费观看| 欧美日韩视频专区在线播放| av中文字幕亚洲| 国产片一区二区| 91精品国产麻豆|