⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nfsdlib.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/nfsdLib.html - generated by refgen from nfsdLib.c --> <title> nfsdLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>nfsdLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>nfsdLib</strong> - Network File System (NFS) server library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./nfsdLib.html#nfsdInit">nfsdInit</a></i>(&nbsp;)</b>  -  initialize the NFS server<br><b><i><a href="./nfsdLib.html#nfsdStatusGet">nfsdStatusGet</a></i>(&nbsp;)</b>  -  get the status of the NFS server<br><b><i><a href="./nfsdLib.html#nfsdStatusShow">nfsdStatusShow</a></i>(&nbsp;)</b>  -  show the status of the NFS server<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library is an implementation of version 2 of the Network FileSystem Protocol Specification as defined in RFC 1094.  It isclosely connected with version 1 of the mount protocol, also definedin RFC 1094 and implemented in turn by mountLib.<p>The NFS server is initialized by calling <b><i><a href="./nfsdLib.html#nfsdInit">nfsdInit</a></i>(&nbsp;)</b>.  This is done automatically at boot time if the configuration macro<b>INCLUDE_NFS_SERVER</b> is defined.<p>Currently, only <b><a href="./dosFsLib.html#top">dosFsLib</a></b> file systems are supported; RT11 file systemscannot be exported.  File systems are exported with the <b><i><a href="./mountLib.html#nfsExport">nfsExport</a></i>(&nbsp;)</b>call.<p>To create and export a file system, define the configuration macro<b>INCLUDE_NFS_SERVER</b> and rebuild VxWorks.<p>To export VxWorks file systems via NFS, you need facilities from boththis library and from mountLib.  To include both, define<b>INCLUDE_NFS_SERVER</b> and rebuild VxWorks.<p>Use the <b><a href="./mountLib.html#top">mountLib</a></b> routine <b><i><a href="./mountLib.html#nfsExport">nfsExport</a></i>(&nbsp;)</b> to export file systems.  For anexample, see the manual page for mountLib.<p>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 <b><i><a href="./nfsdLib.html#nfsdInit">nfsdInit</a></i>(&nbsp;)</b> and <b><i><a href="./mountLib.html#mountdInit">mountdInit</a></i>(&nbsp;)</b> for information about authorizationhooks.<p>The following requests are accepted from clients.  For details oftheir use, see RFC 1094, "NFS: Network File System ProtocolSpecification."<p><table><tr valign=top><th align=left>Procedure Name        </th><th align=left>  Procedure Number</tr><tr><td colspan="2"><hr></tr><tr valign=top><td align=left> <b>NFSPROC_NULL</b>         </td><td align=left>  0</tr><tr valign=top><td align=left> <b>NFSPROC_GETATTR</b>      </td><td align=left>  1</tr><tr valign=top><td align=left> <b>NFSPROC_SETATTR</b>      </td><td align=left>  2</tr><tr valign=top><td align=left> <b>NFSPROC_ROOT</b>         </td><td align=left>  3</tr><tr valign=top><td align=left> <b>NFSPROC_LOOKUP</b>       </td><td align=left>  4</tr><tr valign=top><td align=left> <b>NFSPROC_READLINK</b>     </td><td align=left>  5</tr><tr valign=top><td align=left> <b>NFSPROC_READ</b>         </td><td align=left>  6</tr><tr valign=top><td align=left> <b>NFSPROC_WRITE</b>        </td><td align=left>  8</tr><tr valign=top><td align=left> <b>NFSPROC_CREATE</b>       </td><td align=left>  9</tr><tr valign=top><td align=left> <b>NFSPROC_REMOVE</b>       </td><td align=left>  10</tr><tr valign=top><td align=left> <b>NFSPROC_RENAME</b>       </td><td align=left>  11</tr><tr valign=top><td align=left> <b>NFSPROC_LINK</b>         </td><td align=left>  12</tr><tr valign=top><td align=left> <b>NFSPROC_SYMLINK</b>      </td><td align=left>  13</tr><tr valign=top><td align=left> <b>NFSPROC_MKDIR</b>        </td><td align=left>  14</tr><tr valign=top><td align=left> <b>NFSPROC_RMDIR</b>        </td><td align=left>  15</tr><tr valign=top><td align=left> <b>NFSPROC_READDIR</b>      </td><td align=left>  16</tr><tr valign=top><td align=left> <b>NFSPROC_STATFS</b>       </td><td align=left>  17</tr><tr valign=top><td align=left></tr></tr></table></blockquote><h4>AUTHENTICATION AND PERMISSIONS</h4><blockquote><p>Currently, no authentication is done on NFS requests.  <b><i><a href="./nfsdLib.html#nfsdInit">nfsdInit</a></i>(&nbsp;)</b>describes the authentication hooks that can be added shouldauthentication be necessary.<p>Note that the DOS file system does not provide information about ownershipor permissions on individual files.  Before initializing a dosFs filesystem, three global variables--<b>dosFsUserId</b>, <b>dosFsGroupId</b>, and<b>dosFsFileMode</b>--can be set to define the user ID, group ID, and permissionsbyte for all files in all dosFs volumes initialized after setting thesevariables.  To arrange for different dosFs volumes to use different userand group ID numbers, reset these variables before each volume isinitialized.  See the manual entry for <b><a href="./dosFsLib.html#top">dosFsLib</a></b> for more information.<p></blockquote><h4>TASKS</h4><blockquote><p>Several NFS tasks are created by <b><i><a href="./nfsdLib.html#nfsdInit">nfsdInit</a></i>(&nbsp;)</b>.  They are:<dl><dt><b>tMountd</b><dd>The mount daemon, which handles all incoming mount requests.This daemon is created by <b><i><a href="./mountLib.html#mountdInit">mountdInit</a></i>(&nbsp;)</b>, which is automaticallycalled from <b><i><a href="./nfsdLib.html#nfsdInit">nfsdInit</a></i>(&nbsp;)</b>.<p><dt><b>tNfsd</b><dd>The NFS daemon, which queues all incoming NFS requests.<p><dt><b>tNfsdX</b><dd>The NFS request handlers, which dequeues and processes all incomingNFS requests. </dl><p>Performance of the NFS file system can be improved by increasing thenumber of servers specified in the <b><i><a href="./nfsdLib.html#nfsdInit">nfsdInit</a></i>(&nbsp;)</b> call, if there areseveral different dosFs volumes exported from the same target system.The <b><i><a href="./usrLib.html#spy">spy</a></i>(&nbsp;)</b> utility can be called to determine whether this is useful fora particular configuration.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsdLib.html#top">nfsdLib</a></b><hr><a name="nfsdInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>nfsdInit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>nfsdInit</i>(&nbsp;)</strong> - initialize the NFS server</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS nfsdInit    (    int     nServers,      /* the number of NFS servers to create */    int     nExportedFs,   /* maximum number of exported file systems */    int     priority,      /* the priority for the NFS servers */    FUNCPTR authHook,      /* authentication hook */    FUNCPTR mountAuthHook, /* authentication hook for mount daemon */    int     options        /* currently unused */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the NFS server.  <i>nServers</i>  specifies the number oftasks to be spawned to handle NFS requests.  <i>priority</i> is the priority thatthose tasks will run at.  <i>authHook</i> is a pointer to an authorizationroutine.  <i>mountAuthHook</i> is a pointer to a similar routine, passed to<b><i><a href="./mountLib.html#mountdInit">mountdInit</a></i>(&nbsp;)</b>.  <i>options</i> is provided for future expansion.<p>Normally, no authorization is performed by either mountd or nfsd.If you want to add authorization, set <i>authHook</i> to afunction pointer to a routine declared as follows:<pre>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 */    NFSD_ARGUMENT *    nfsdArg        /* argument of the call */    )</pre>The <i>authHook</i> routine should return <b>NFS_OK</b> if the request is authorized,and <b>NFSERR_ACCES</b> if not.  (<b>NFSERR_ACCES</b> is not required; any legitimateNFS error code can be returned.)<p>See <b><i><a href="./mountLib.html#mountdInit">mountdInit</a></i>(&nbsp;)</b> for documentation on <i>mountAuthHook</i>.  Note that<i>mountAuthHook</i> and <i>authHook</i> can point to the same routine.Simply use the <i>progNum</i>, <i>versNum</i>, and <i>procNum</i> fields to decidewhether the request is an NFS request or a mountd request.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the NFS server cannot be started.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsdLib.html#top">nfsdLib</a></b>, <b><i><a href="./mountLib.html#nfsExport">nfsExport</a></i>(&nbsp;)</b>, <b><i><a href="./mountLib.html#mountdInit">mountdInit</a></i>(&nbsp;)</b><hr><a name="nfsdStatusGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>nfsdStatusGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>nfsdStatusGet</i>(&nbsp;)</strong> - get the status of the NFS server</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS nfsdStatusGet    (    NFS_SERVER_STATUS * serverStats /* pointer to status structure */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets status information about the NFS server.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the information cannot be obtained.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsdLib.html#top">nfsdLib</a></b><hr><a name="nfsdStatusShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>nfsdStatusShow</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>nfsdStatusShow</i>(&nbsp;)</strong> - show the status of the NFS server</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS nfsdStatusShow    (    int options /* unused */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine shows status information about the NFS server.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the information cannot be obtained.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsdLib.html#top">nfsdLib</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -