VMS Help  —  TCPIP Services, Programming Interfaces, RPC Client Routines, clnt_broadcast
    Executes a remote procedure call that is sent to all locally
    connected networks using the broadcast address.
    Format
      #include  <rpc/rpc.h>
      enum clnt_stat  clnt_broadcast(u_long prognum, u_long versnum,
                      u_long procnum, xdrproc_t inproc, char * in,
                      xdrproc_t outproc, char * out, resultproc_t
                      eachresult);

1  –  Arguments

 prognum
    The program number associated with the remote procedure.
 versnum
    The version number associated with the remote procedure.
 procnum
    The procedure number associated with the remote procedure.
 inproc
    The XDR routine used to encode the remote procedure's arguments.
 in
    A pointer to the remote procedure's arguments.
 outproc
    The XDR routine used to decode the remote procedure's results.
 out
    A pointer to the remote procedure's results.
 eachresult
    Called each time the routine receives a response. Specify the
    routine as follows:
    int eachresult(char *resultsp, struct sockaddr_in *addr)
    resultsp is the same as the parameter passed to clnt_broadcast(),
    except that the remote procedure's output is decoded there. addr
    is a pointer to a sockaddr_in structure containing the address of
    the host that sent the results.
    If eachresult is NULL, the clnt_broadcast routine returns without
    waiting for any replies.

2  –  Description

    Performs the same function as the callrpc routine, except that
    the call message is sent to all locally connected networks using
    the broadcast address. Each time it receives a response, this
    routine calls the eachresult routine. If eachresult returns
    zero, clnt_broadcast waits for more replies; otherwise it assumes
    success and returns RPC_SUCCESS.

                                   NOTE
       This routine uses the UDP protocol. Broadcast sockets are
       limited in size to the maximum transfer unit of the data
       link. For Ethernet, this value is 1400 bytes. For FDDI, this
       value is 4500 bytes.

3  –  Return Values

    RPC_SUCCESS        Indicates success.
    clnt_stat          Returns the buffer of type enum clnt_stat
                       containing the status of the clnt_broadcast
                       operation.
Close Help