aslistashs(3x)

aslistashs, aslistashs_array, aslistashs_local, aslistashs_server - enumerate ASHs

As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.

NAME
     aslistashs, aslistashs_array, aslistashs_local, aslistashs_server -
     enumerate ASHs

SYNOPSIS
     #include <sys/types.h>
     #include <arraysvcs.h>

     asashlist_t *aslistashs(asserver_t Server, const char *ArrayName,
                             int Destination, uint32_t Flags);

     asashlist_t *aslistashs_array(asserver_t Server, const char *ArrayName);
     asashlist_t *aslistashs_local(void);
     asashlist_t *aslistashs_server(asserver_t Server);

DESCRIPTION
     The aslistashs function returns a list of array session handles that are
     currently active on the local machine, some other machine, or some array.
     The target of aslistashs is determined by the Destination argument, which
     may have one of the following values:

     ASDST_ARRAY
          Retrieve the active array session handles on all machines in the
          array specified by ArrayName, or the default array if ArrayName is
          NULL.

     ASDST_LOCAL
          Retrieve the active array session handles on the local machine only.

     ASDST_SERVER
          Retrieve the active array session handles on the machine specified
          by Server only.

     The Server argument specifies an optional array server token, which can
     be used to direct the request to a specific array services daemon.  If
     NULL is specified instead, the request will be processed by the default
     array services daemon if necessary (see array(1) for more information on
     how the default array services daemon is selected).  For more details on
     creating an array server token, see asopenserver(3X).

     If Destination is not ASDST_ARRAY, the ArrayName argument should be set
     to NULL.

     The flags arguments is used to control some of the details about the
     array session handles that are returned.  If consists of zero or more of
     the following values OR'ed together:

     ASLAF_NOLOCAL
          Do not include local array session handles.
     ASLAF_NODUPS
          Ordinarily, an array session handle may appear more than once in the
          returned list.  This flag will cause duplicate array session handles
          to be removed from the list, with some additional cost in execution
          time.

     The list of array session handles is returned in an asashlist_t
     structure, which is defined in <arraysvcs.h>.  The storage for this
     structure is allocated using malloc(3).  It should be released using the
     asfreeashlist(3X) function when it is no longer needed.

     The functions aslistashs_array, aslistashs_local and aslistashs_server
     are "convenience functions" that are equivalent to variations of
     aslistash.  aslistashs_array(Server, ArrayName) is equivalent to:

         aslistashs(Server, ArrayName, ASDST_ARRAY,
                        (ASLAF_NOLOCAL | ASLAF_NODUPS))

     aslistashs_local() is equivalent to:

         aslistashs(NULL, NULL, ASDST_LOCAL, ASLAF_NODUPS)

     aslistashs_server(Server) is equivalent to:

         aslistashs(Server, NULL, ASDST_SERVER,
                        (ASLAF_NOLOCAL | ASLAF_NODUPS))

     Notice that because array sessions can come and go over time, this
     information cannot be 100% accurate; it may omit some new array sessions
     and/or include array sessions that have already terminated.

NOTES
     All of these functions are found in the library "libarray.so", and will
     be loaded if the option "-larray" is used with cc(1) or ld(1).

SEE ALSO
     asashisglobal(3X), aserrorcode(3X), asfreeashlist(3X), asopenserver(3X),
     array_sessions(5).

DIAGNOSTICS
     All functions return a pointer to an asashlist_t structure if successful
     or NULL if not.  If unsuccessful, aserrorcode(3X) will be set
     appropriately.