PRF_$GET_SITES Domain/OS PRF_$GET_SITES
NAME
prf_$get_sites - get a list of print managers
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/prf.h>
void prf_$get_sites(
long *index,
long &max_sites,
long *ret_sites,
prf_$name_t *site_list,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/prf.ins.pas';
procedure prf_$get_sites(
var index: integer32;
in max_sites: integer32;
out ret_sites: integer32;
out site_list: univ prf_$name_array_t;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
integer*2 n_sites, example
parameter (n_sites = 32, example = 3)
integer*4 index, max_sites, ret_sites, status
character site_list(n_sites)*34
integer*2 site_location_length
character site_location*32
equivalence (site_location, site_list(example))
equivalence (site_location_length, site_list(example) (33:34))
call prf_$get_sites(index, max_sites, ret_sites, site_list, status)
DESCRIPTION
This call supplies the locations of up to max_sites print managers on the
network. The index argument passed to prf_$get_sites controls which por-
tion of the network site list is supplied in site_list.
index
An index into the list of managers supplied by prf_$get_sites.
Index specifies the position in the network site list of the first
manager requested when prf_$get_sites is called; it contains the
position in the list of the next manager to request when
prf_$get_sites returns.
When calling prf_$get_sites, an index of 1 will cause prf_$get_sites
to supply the first max_sites manager locations. Then when
prf_$get_sites returns, index will be the position of the next
unread manager location in the list.
If the difference between the call and return values of index is
less than max_sites, then site_list contains the location of the
last manager in the network site list. If the difference is equal
to max_sites, there may be more managers on the network; that is,
site_list may not contain the location of the last print manager in
the site list. If the site list is exhausted when prf_$get_sites
returns, index contains the position of the last manager, or, more
simply, just the number of managers on the network.
max_sites
The maximum number of managers that prf_$get_sites should supply.
The value of max_sites depends on the size of the buffer allocated
to receive the site_list argument.
ret_sites
The number of managers supplied in site_list.
site_list
An array of type prf_$name_t containing a list of print manager
names. Each element of the array is a string containing the
manager's location followed by the number of bytes in the string.
status
The completion status.
SEE ALSO
prf_$get_printers.