SP_get_vs_sets_info
|
int SP_get_vs_sets_info (const char *memb_mess,
vs_set_info *vs_sets,
int num_vs_sets,
unsigned int *my_vs_set_index);
int SP_scat_get_vs_sets_info (const scatter *memb_mess_scat,
vs_set_info *vs_sets,
int num_vs_sets,
unsigned int *my_vs_set_index);
|
|
Parameters
|
memb_mess |
the membership message to extract
vs set information from |
|
memb_mess_scat |
the scatter membership message
to extract vs set information from |
|
vs_sets |
array of vs_sets to receive
extracted vs_sets from membership message |
|
num_vs_sets |
size of vs_sets array (number
of vs_sets it can hold) |
|
my_vs_set_index |
returned index into vs_sets,
corresponding to the vs_set containing private group name of
the receiver |
|
Return Values
|
> 0 |
Success (returns the number of vs_sets filled
in) |
|
BUFFER_TOO_SHORT |
The passes in vs_sets array was too small to handle
all the vs_sets contained in memb_mess. No data is parsed. Reallocate
a larger array of vs_set_info structs (the required number is
available in the membership_info struct) and call this function
again. |
|
Description
|
SP_get_vs_sets_info and its scatter
variant extract the list of VS sets provided in a Network membership
message and store them into the vs_sets array of vs_set_info
structs. The number of elements in the array should be provided
in the num_vs_sets parameter.
This function also returns an index of which VS set in the
array corresponds to the current processâs VS set. That
index value is returned in the my_vs_set_index parameter.
The memb_mess field or scatter field should be
the body of a message that was returned in a previous SP_receive
call for a membership message.
The fields of a vs_set_info struct include:
- unsigned int num_members
- unsigned int members_offset
For each of the vs_set_info records in the array, the function
SP_get_vs_set_members
will grab the actual array of member names for the specified
VS set.
|
|
Requirements
|
Header: Include sp.h
Library: Use libspread
Version: 4.0 |
|
Also See |