clnt_broadcast(3) CLIX clnt_broadcast(3)
NAME
clnt_broadcast - Library function for remote procedure calls
LIBRARY
Berkeley Software Distribution Library (libbsd.a)
SYNOPSIS
enum clnt_stat clnt_broadcast(
ulong prognum ,
ulong versnum ,
ulong procnum ,
xdrproc_t inproc ,
char *in ,
xdrproc_t outproc ,
char *out ,
resultproc_t eachresult );
PARAMETERS
prognum Specifies the program that is the target of the broadcast
RPC.
versnum Specifies the version number.
procnum Specifies the procedure within the program.
inproc Specifies the XDR filter used to encode the procedure's
arguments.
in Points to the buffer holding the procedure's arguments.
outproc Specifies the XDR filter to decode the procedure's results.
out Points to the buffer in which the procedure's results are
stored.
eachresult Specifies the function called for each received response.
DESCRIPTION
The clnt_broadcast() function allows C programs to make procedure calls on
other machines across the network. First, the client calls a procedure to
send a data packet to the server. Upon receipt of the packet, the server
calls a dispatch routine to perform the requested service, and then sends
back a reply. Finally, the procedure call returns to the client.
The clnt_broadcast() function is like callrpc(), except the call message
is broadcast to all locally connected broadcast nets. Each time it
2/94 - Intergraph Corporation 1
clnt_broadcast(3) CLIX clnt_broadcast(3)
receives a response, this function calls eachresult(), which has the
following form:
eachresult(
char *out ,
struct sockaddr_in *addr );
where out is the same as out passed to clnt_broadcast(), except that the
remote procedure's output is decoded there; addr points to the address of
the machine that sent the results. If eachresult() returns 0,
clnt_broadcast() waits for more replies. Otherwise, it returns with an
appropriate status. The total wait time is 54 seconds, plus the time
required to process responses received.
CAUTIONS
Broadcast sockets are limited in size to the maximum transfer unit of the
data link. For Ethernet, this value is 1500 bytes.
RETURN VALUES
This function returns clnt_stat enumerated status, suitable for
interpretation using clnt_perrno().
RELATED INFORMATION
Functions: xdr_int(3), xdr_bytes(3), xdr_getpos(3), xdr_pointer(3),
xdrrec_create(3), xdr_array(3), xdr_destroy(3), xdr_free(3),
xdr_inline(3), xdrmem_create(3), xdr_opaque(3), xdr_union(3),
xdr_vector(3), xdr_void(3)
CLIX Programming Guide
2 Intergraph Corporation - 2/94