*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> exportent (3)              



NAME    [Toc]    [Back]

     exportent,	getexportent, setexportent, addexportent, remexportent,
     endexportent, getexportopt	- get exported file system information

SYNOPSIS    [Toc]    [Back]

     #include <stdio.h>
     #include <exportent.h>

     FILE *setexportent(void);

     struct exportent *getexportent(FILE *filep);

     int addexportent(FILE *filep, char	*dirname, char *options);

     int remexportent(FILE *filep, char	*dirname);

     char *getexportopt(struct exportent *xent,	char *opt);

     void endexportent(FILE *filep);

DESCRIPTION    [Toc]    [Back]

     These routines access the exported	filesystem information in /etc/xtab.

     setexportent opens	the export information file and	returns	a file pointer
     to	use with getexportent, addexportent, remexportent, and endexportent.
     getexportent reads	the next line from filep and returns a pointer to an
     object with the following structure containing the	broken-out fields of a
     line in the file, /etc/xtab.  The fields have meanings described in

  #define ACCESS_OPT  ``access''  /* machines that can mount fs	*/
  #define ROOT_OPT    ``root''	  /* machines with root	access of fs */
  #define RO_OPT      ``ro''	  /* export read-only */
  #define RW_OPT      ``rw''	  /* export read-mostly	*/
  #define ANON_OPT    ``anon''	  /* uid for anonymous requests	*/
  #define NOHIDE_OPT  ``nohide''  /* visible from upper-exported fs */
  struct exportent {
       char *xent_dirname;	  /* directory (or file) to export */
       char *xent_options;	  /* options, as above */

     addexportent adds the exportent to	the end	of the open file filep.	 It
     returns 0 if successful and  -1 on	failure.  remexportent removes the
     indicated entry from the list.  It	also returns 0 on success and -1 on
     failure.  getexportopt scans the xent_options field of the	exportent
     structure for a substring that matches opt.  It returns the string	value
     of	opt, or	NULL if	the option is not found.

     endexportent closes the file.

									Page 1


NOTE    [Toc]    [Back]

     The NOHIDE_OPT  option is specific	to IRIX.

     To	compile	and link a program that	calls these routines, follow the
     procedures	for section (3Y) routines as described in intro(3).

FILES    [Toc]    [Back]


SEE ALSO    [Toc]    [Back]

     exportfs(1M), exports(4).

DIAGNOSTICS    [Toc]    [Back]

     NULL pointer (0) returned on EOF or error.

BUGS    [Toc]    [Back]

     The returned exportent structure points to	static information that	is
     overwritten in each call.

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
VFS_CHECKEXP FreeBSD check if a file system is exported to a client
getExportList IRIX get list of nfs exported directories from a remote system
sizer Tru64 Displays information about the system or kernel, or creates a system configuration file
dxsysinfo Tru64 Monitors system information such as CPU activity, memory, swap space, and file system usage
statfs IRIX get file system information
getfsspec Tru64 Get information about a file system
getfsfile Tru64 Get information about a file system
getvfsbyname FreeBSD get information about a file system
getfsent Tru64 Get information about a file system
setfsent_r Tru64 Get information about a file system
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service