VMS Help
TCPIP Services, Programming Interfaces, RPC Client Routines, clnt_broadcast
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
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);
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.
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.
RPC_SUCCESS Indicates success.
clnt_stat Returns the buffer of type enum clnt_stat
containing the status of the clnt_broadcast
operation.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.