Spread 4.0.0 C API

int SP_get_memb_info (const char      *memb_mess, 
                      const service   service_type,
                      membership_info *memb_info);

int SP_scat_get_memb_info (const scatter   *memb_mess_scat, 
                           const service   service_type,
                           membership_info *memb_info);

  memb_mess membership message to extract membership information from
  memb_mess_scat scatter membership message to extract membership information from
  service_type service type of the membership message passes in
  memb_info returned extracted membership information

Return Values
  > 0 Success.
  ILLEGAL_MESSAGE The memb_mess or service type is invalid or not a membership message

  SP_get_memb_info and its scatter variant all parse the contents of a message body that is received as part of a membership message and fill in the membership_info struct that is passed in as a parameter.

The service_type and the memb_mess fields should be the same as the values returned in a previous SP_receive call for a membership message. The caller should allocate a new membership_info structure and pass that into this function. When the function returns the structure will be filled in.

The fields of a membership_info struct include:

  • group_id gid
  • char changed_member[MAX_GROUP_NAME]
  • unsigned int num_vs_set
  • vs_set_info my_vs_set

The changed_member field is filled in with the name of the new or leaving member if the membership is a Join, Leave or Disconnect. If it is a Network membership event then the changed_member field is blank and multiple vs_sets will be available with all of the subsets of daemons coming together into the new membership.

The my_vs_set field stores the number of members of my local vs set, i.e. those processes who came together with me and the location of the list of members. See SP_get_vs_set_members for how to extract the full list of members. The SP_get_vs_sets_info function will return the full list of all VS sets that arrived with this membership message.

  Header: Include sp.h
Library: Use libspread
Version: 4.0

Also See
  spread programmer's reference , SP_get_vs_set_members, SP_get_vs_sets_info, SP_receive