Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rpcinfo(1)

rpc(4)



  getrpcent(3)                        CLIX                        getrpcent(3)



  NAME

    getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent - Gets an
    RPC entry

  LIBRARY

    Berkeley Software Distribution (libbsd.a)

  SYNOPSIS

    #include <netdb.h>

    struct rpcent *getrpcent(
      void );

    struct rpcent *getrpcbyname(
      char *name );

    struct rpcent *getrpcbynumber(
      int number );

    void setrpcent(
      int stayopen );

    void endrpcent(
      void );

  DESCRIPTION

    The getrpcent(), getrpcbyname(), and getrpcbynumber() functions return a
    pointer to an object with the following structure containing the broken-
    out fields of a line in the Remote Procedure Call (RPC) program number
    database, /etc/rpc.

    struct rpcent {
         char *r_name;      /* name of server for this rpc program */
         char **r_aliases;  /* alias list */
         long r_number;     /* rpc program number */
    };

    The members of this structure are as follows:

    r_name      The name of the server for this RPC program.

    r_aliases   A zero-terminated list of alternate names for the RPC program.

    r_number    The RPC program number for this service.

    The getrpcent() function reads the next line of the file, opening the file
    if necessary.



  2/94 - Intergraph Corporation                                              1






  getrpcent(3)                        CLIX                        getrpcent(3)



    The setrpcent() function opens and rewinds the file.  If the stayopen flag
    is nonzero, the net database is not closed after each call to getrpcent()
    (either directly or indirectly).

    The endrpcent() function closes the file by either getrpcbyname() or
    getrpcbynumber().

    The getrpcbyname() and getrpcbynumber() functions sequentially search from
    the beginning of the file until a matching RPC program name or program
    number is found, or until EOF is encountered.

    All information is contained in a static area, so it must be copied to be
    saved.

  FILES

    /etc/rpc

    /etc/yp/domainname/rpc.bynumber

  RETURN VALUES

    A null pointer is returned on EOF or error.

  RELATED INFORMATION

    Commands:  rpcinfo(1)

    Files: rpc(4)

























  2                                              Intergraph Corporation - 2/94




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