On Tue, Aug 18, 2009 at 06:09:38PM +0200, Jan Friesse wrote: > This feature should allow app to get cpg groups and members. It's > modeled like ckpt section iteration, so:
Thanks! I've been waiting a long time for this (the same is needed for various other things in corosync+openais). I hope you'll also add a command line tool that uses this API to report all cpgs and their members. You may also want to add an API to query state/status/info about a particular cpg (querying the members is the most important, but eventually we'll probably want more info about each cpg.) I'm not fond of the iteration-style API, although it may have some advantages in theory. When writing these API's I generally do something like this (see libdlmcontrol for a specific example): get_groups(int max, int *count, struct group *groups); get_group_members(char *name, int max, int *count, struct member *members); get_group_info(char *name, struct group_info &info); "max" is the number of slots the user is providing in *groups or *members. If that's not enough, then -E2BIG is returned in *count so the caller can call again with more space. Otherwise, the number of slots filled in is returned in *count. Dave _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
