VMS Help
TCPIP Services, Programming Interfaces, RPC Client Routines, clnttcp_create

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Creates an ONC RPC client handle for a TCP/IP connection.
    Format
      #include  <rpc/rpc.h>
      CLIENT  *clnttcp_create(struct sockaddr_in *addr, u_long
              prognum, u_long versnum, int *sockp, u_int sendsize,
              u_int recvsize);

  1 - Arguments

 addr
    A pointer to a buffer containing the internet address where the
    remote program is located.
 prognum
    The program number associated with the remote procedure.
 versnum
    The version number associated with the remote procedure.
 sockp
    A pointer to the socket number to be used for the remote
    procedure call. If sockp is RPC_ANYSOCK, then this routine opens
    a new socket and sets sockp.
 sendsize
    The size of the send buffer. If you specify 0 the routine chooses
    a suitable default.
 recvsize
    The size of the receive buffer. If you specify 0 the routine
    chooses a suitable default.

  2 - Description

    Creates an ONC RPC client handle for the remote program prognum,
    version versnum at address addr. The client uses TCP/IP as a
    transport. The routine is similar to the clnt_create routine,
    except clnttcp_create allows you to specify a socket and the send
    and receive buffer sizes.

    If you specify the port number as zero by using addr->sin_port,
    the Portmapper provides the number of the port on which the
    remote program is listening.

    The clnttcp_create routine uses the global variable rpc_
    createerr. rpc_createerr is a structure that contains the most
    recent service creation error. Use rpc_createerr if you want the
    client program to handle the error. The value of rpc_createerr is
    set by any RPC client creation routine that does not succeed. The
    rpc_createerr variable is defined in the CLNT.H file.

    The socket referenced by sockp is copied into a private area for
    RPC to use. It is the client's responsibility to close the socket
    referenced by sockp.

    The authentication scheme for the client, client->cl_auth, gets
    set to null authentication. The calling program can set this to
    something different if necessary.

                                   NOTE
       If the requested program is available on the host but the
       program does not support the requested version number, this
       routine still succeeds. A subsequent call to the clnt_call
       routine will discover the version mismatch. Use the clnt_
       create_vers routine if you want to avoid this condition.

  3 - Return Values

    CLIENT *           A pointer to the client handle.
    NULL               Indicates failure.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.