JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  User Commands (Man Pages Section 1)

2.  Maintenance Commands (Man Pages Section 1M)

3.  Library Functions (Man Pages Section 3)

4.  Library Functions (Man Pages Section 3X)

intro_libsam(3X)

intro_libsamrpc(3X)

sam_archive(3X)

sam_closerpc(3X)

sam_initrpc(3X)

sam_lstat(3X)

sam_release(3X)

sam_segment(3X)

sam_setfa(3X

sam_stage(3X)

sam_stat(3X)

5.  File Formats (Man Pages Section 4)

6.  Standards, Environment, and Macros (Man Pages Section 5)

7.  Device and Network Interfaces (Man Pages Section 7)

sam_initrpc(3X)

NAME
     sam_initrpc - Performs RPC initialization for  Sun  QFS  and
     SAM-QFS RPC API library

SYNOPSIS
     cc [ flag  ... ] file  ... -L/opt/SUNWsamfs/lib -lsamrpc  -lnsl [ library ... ]

     #include "/opt/SUNWsamfs/include/samrpc.h"

     int sam_initrpc(char *rpchost);

DESCRIPTION
     sam_initrpc() is the initialization  routine  for  the  lib-
     samrpc  library.   It finds the RPC entry for the Sun QFS or
     SAM-QFS  server  and  creates  an  RPC  client  handle.   In
     essence,  this routine sets up the connection to the Sun QFS
     or SAM-QFS host machine, required for other API calls in the
     libsamrpc library.

     rpchost is the hostname of the Sun QFS or SAM-QFS host.   If
     NULL,  sam_initrpc()  will check for an environment variable
     named SAMHOST.  If such an environment variable exists,  its
     setting  will  be  taken  for the hostname of the Sun QFS or
     SAM-QFS host, otherwise the built-in  default,  samhost,  is
     used.

     sam_initrpc() gets the RPC entry (program number) using  the
     program  name samfs.  This information (the RPC program name
     and number), and the hostname, is used to set up  communica-
     tion  with  the  Sun  QFS or SAM-QFS RPC API server process,
     sam-rpcd, which runs on the Sun QFS or SAM-QFS host machine.

RETURN VALUES
     Upon successful completion a value of 0 is returned.  Other-
     wise, a value of -1 is returned and errno is set to indicate
     the error.

ERRORS
     sam_initrpc() fails if one or  more  of  the  following  are
     true:

     EADDRNOTAVAIL       No RPC entry for the program name  samfs
                         could be found.

SEE ALSO
     sam_closerpc(3X),     sam_archive(3X),      sam_release(3X),
     sam_stage(3X), sam_stat(3X).