📄 nfslib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/nfsLib.html - generated by refgen from nfsLib.c --> <title> nfsLib </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>nfsLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>nfsLib</strong> - Network File System (NFS) library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./nfsLib.html#nfsHelp">nfsHelp</a></i>( )</b> - display the NFS help menu<br><b><i><a href="./nfsLib.html#nfsExportShow">nfsExportShow</a></i>( )</b> - display the exported file systems of a remote host<br><b><i><a href="./nfsLib.html#nfsAuthUnixPrompt">nfsAuthUnixPrompt</a></i>( )</b> - modify the NFS UNIX authentication parameters<br><b><i><a href="./nfsLib.html#nfsAuthUnixShow">nfsAuthUnixShow</a></i>( )</b> - display the NFS UNIX authentication parameters<br><b><i><a href="./nfsLib.html#nfsAuthUnixSet">nfsAuthUnixSet</a></i>( )</b> - set the NFS UNIX authentication parameters<br><b><i><a href="./nfsLib.html#nfsAuthUnixGet">nfsAuthUnixGet</a></i>( )</b> - get the NFS UNIX authentication parameters<br><b><i><a href="./nfsLib.html#nfsIdSet">nfsIdSet</a></i>( )</b> - set the ID number of the NFS UNIX authentication parameters<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides the client side of services for NFS (Network FileSystem) devices. Most routines in this library should not be called byusers, but rather by device drivers. The driver is responsible forkeeping track of file pointers, mounted disks, and cached buffers. Thislibrary uses Remote Procedure Calls (RPC) to make the NFS calls.<p>VxWorks is delivered with NFS disabled.The configuration macro for NFS is <b>INCLUDE_NFS</b>.<p>In the same file, <b>NFS_USER_ID</b> and <b>NFS_GROUP_ID</b> should bedefined to set the default user ID and group ID at system start-up.For information about creating NFS devices, see the <i>VxWorks Programmer's Guide: Network. </i><p>Normal use of NFS requires no more than 2000 bytes of stack.<p></blockquote><h4>NFS USER IDENTIFICATION</h4><blockquote><p>NFS is built on top of RPC and uses a type of RPC authentication known as<b>AUTH_UNIX</b>, which is passed onto the NFS server with every NFS request.<b>AUTH_UNIX</b> is a structure that contains necessary information for NFS,including the user ID number and a list of group IDs to which the user belongs. On UNIX systems, a user ID is specified in the file <b>/etc/passwd</b>. The list of groups to which a user belongs is specified in the file <b>/etc/group</b>.<p>To change the default authentication parameters, use <b><i><a href="./nfsLib.html#nfsAuthUnixPrompt">nfsAuthUnixPrompt</a></i>( )</b>.To change just the <b>AUTH_UNIX</b> ID, use <b><i><a href="./nfsLib.html#nfsIdSet">nfsIdSet</a></i>( )</b>. Usually, only the userID needs to be changed to indicate a new NFS user.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>nfsLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rpcLib.html#top">rpcLib</a></b>, <b><a href="./ioLib.html#top">ioLib</a></b>, <b><a href="./nfsDrv.html#top">nfsDrv</a></b>, <i>VxWorks Programmer's Guide: Network</i><p><hr><a name="nfsHelp"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>nfsHelp</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>nfsHelp</i>( )</strong> - display the NFS help menu</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void nfsHelp (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays a summary of NFS facilities typically called fromthe shell:<pre> nfsHelp Print this list netHelp Print general network help list nfsMount "host","filesystem"[,"devname"] Create device with file system/directory from host nfsUnmount "devname" Remove an NFS device nfsAuthUnixShow Print current UNIX authentication nfsAuthUnixPrompt Prompt for UNIX authentication nfsIdSet id Set user ID for UNIX authentication nfsDevShow Print list of NFS devices nfsExportShow "host" Print a list of NFS file systems which are exported on the specified host mkdir "dirname" Create directory rm "file" Remove file EXAMPLE: -> hostAdd "wrs", "90.0.0.2" -> nfsMount "wrs","/disk0/path/mydir","/mydir/" -> cd "/mydir/" -> nfsAuthUnixPrompt /* fill in user ID, etc. */ -> ls /* list /disk0/path/mydir */ -> copy < foo /* copy foo to standard out */ -> ld < foo.o /* load object module foo.o */ -> nfsUnmount "/mydir/" /* remove NFS device /mydir/ */</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsLib.html#top">nfsLib</a></b><hr><a name="nfsExportShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>nfsExportShow</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>nfsExportShow</i>( )</strong> - display the exported file systems of a remote host</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS nfsExportShow ( char * hostName /* host machine to show exports for */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the file systems of a specified host and the groupsthat are allowed to mount them.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre> -> nfsExportShow "wrs" /d0 staff /d1 staff eng /d2 eng /d3 value = 0 = 0x0</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsLib.html#top">nfsLib</a></b><hr><a name="nfsAuthUnixPrompt"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>nfsAuthUnixPrompt</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>nfsAuthUnixPrompt</i>( )</strong> - modify the NFS UNIX authentication parameters</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void nfsAuthUnixPrompt (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allowsUNIX authentication parameters to be changed from the shell.The user is prompted for each parameter, which can be changedby entering the new value next to the current one.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre> -> nfsAuthUnixPrompt machine name: yuba user ID: 2001 128 group ID: 100 num of groups: 1 3 group #1: 100 100 group #2: 0 120 group #3: 0 200 value = 3 = 0x3</pre></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsLib.html#top">nfsLib</a></b>, <b><i><a href="./nfsLib.html#nfsAuthUnixShow">nfsAuthUnixShow</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixSet">nfsAuthUnixSet</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixGet">nfsAuthUnixGet</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsIdSet">nfsIdSet</a></i>( )</b><hr><a name="nfsAuthUnixShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>nfsAuthUnixShow</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>nfsAuthUnixShow</i>( )</strong> - display the NFS UNIX authentication parameters</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void nfsAuthUnixShow (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the parameters set by <b><i><a href="./nfsLib.html#nfsAuthUnixSet">nfsAuthUnixSet</a></i>( )</b> or<b><i><a href="./nfsLib.html#nfsAuthUnixPrompt">nfsAuthUnixPrompt</a></i>( )</b>.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><p><pre> -> nfsAuthUnixShow machine name = yuba user ID = 2001 group ID = 100 group [0] = 100 value = 1 = 0x1</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsLib.html#top">nfsLib</a></b>, <b><i><a href="./nfsLib.html#nfsAuthUnixPrompt">nfsAuthUnixPrompt</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixSet">nfsAuthUnixSet</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixGet">nfsAuthUnixGet</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsIdSet">nfsIdSet</a></i>( )</b><hr><a name="nfsAuthUnixSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>nfsAuthUnixSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>nfsAuthUnixSet</i>( )</strong> - set the NFS UNIX authentication parameters</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void nfsAuthUnixSet ( char * machname, /* host machine */ int uid, /* user ID */ int gid, /* group ID */ int ngids, /* number of group IDs */ int * aup_gids /* array of group IDs */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets UNIX authentication parameters.It is initially called by <b><i>usrNetInit</i>( )</b> in <b>usrConfig.c</b>.<b>machname</b> should be set with the name of the mounted system (i.e. the targetname itself) to distinguish hosts from hosts on a NFS network.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsLib.html#top">nfsLib</a></b>, <b><i><a href="./nfsLib.html#nfsAuthUnixPrompt">nfsAuthUnixPrompt</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixShow">nfsAuthUnixShow</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixGet">nfsAuthUnixGet</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsIdSet">nfsIdSet</a></i>( )</b>, usrConfig<hr><a name="nfsAuthUnixGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>nfsAuthUnixGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>nfsAuthUnixGet</i>( )</strong> - get the NFS UNIX authentication parameters</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void nfsAuthUnixGet ( char * machname, /* where to store host machine */ int * pUid, /* where to store user ID */ int * pGid, /* where to store group ID */ int * pNgids, /* where to store number of group IDs */ int * gids /* where to store array of group IDs */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the previously set UNIX authentication values.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsLib.html#top">nfsLib</a></b>, <b><i><a href="./nfsLib.html#nfsAuthUnixPrompt">nfsAuthUnixPrompt</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixShow">nfsAuthUnixShow</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixSet">nfsAuthUnixSet</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsIdSet">nfsIdSet</a></i>( )</b><hr><a name="nfsIdSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>nfsIdSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>nfsIdSet</i>( )</strong> - set the ID number of the NFS UNIX authentication parameters</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void nfsIdSet ( int uid /* user ID on host machine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets only the UNIX authentication user ID number.For most NFS permission needs, only the user ID needs to be changed.Set <i>uid</i> to the user ID on the NFS server.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nfsLib.html#top">nfsLib</a></b>, <b><i><a href="./nfsLib.html#nfsAuthUnixPrompt">nfsAuthUnixPrompt</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixShow">nfsAuthUnixShow</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixSet">nfsAuthUnixSet</a></i>( )</b>, <b><i><a href="./nfsLib.html#nfsAuthUnixGet">nfsAuthUnixGet</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -