Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exports(4)

exportfs(1M)



EXPORTENT(3)        RISC/os Reference Manual         EXPORTENT(3)



NAME
     exportent, getexportent, setexportent, addexportent, remex-
     portent, endexportent, getexportopt - get exported file sys-
     tem information

SYNOPSIS
     For -systype sysv and -systype bsd43:

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

     FILE *setexportent()
     struct exportent *getexportent(filep)
          FILE *filep;
     int addexportent(filep, dirname, options)
          FILE *filep;
          char *dirname;
          char *options;
     int remexportent(filep, dirname)
          FILE *filep;
          char *dirname;
     char *getexportopt(xent, opt)
          struct exportent *xent;
          char *opt;
     void endexportent(filep)
          FILE *filep;

DESCRIPTION
     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 exports(4).

     #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 ANON_OPT   ``anon''   /* uid for anonymous requests */
     #define SECURE_OPT ``secure'' /* require secure NFS for access */
     #define WINDOW_OPT ``window'' /* expiration window for credential */
     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.



                         Printed 1/15/91                   Page 1




EXPORTENT(3)        RISC/os Reference Manual         EXPORTENT(3)



     It also returns 0 on success and -1 on failure.  getexpor-
     topt() 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.

FILES
     /etc/exports
     /etc/xtab

SEE ALSO
     exports(4).
     exportfs(1M) in the System Administrator's Reference Manual.

DIAGNOSTICS
     NULL pointer (0) returned on EOF or error.

BUGS
     The returned exportent() structure points to static informa-
     tion that is overwritten in each call.

ORIGIN
     Sun Microsystems Inc., NFS 4.0

NOTE
     When these routines are used in a program which is compiled
     in -systype sysv, they are not resolved by libc.a.  See
     intro(3-SysV) for more information.


























 Page 2                  Printed 1/15/91



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026