1EVS_INITIALIZE(3)         Openais Programmer's Manual        EVS_INITIALIZE(3)
2
3
4

NAME

6       evs_initialize - Create a new connection to the EVS service
7

SYNOPSIS

9       #include <openais/evs.h>
10
11       int evs_initialize(evs_handle_t *handle, evs_callbacks_t *callbacks);
12

DESCRIPTION

14       The  evs_initialize  function is used to initialize a connection to the
15       extended virtual synchrony API.
16
17       Each application may have several connections to  the  EVS  API.   Each
18       application  uses  the handle argument to uniquely identify the connec‐
19       tion.  The handle argument is then used  in  other  function  calls  to
20       identify  the connection to be used for communication with the EVS ser‐
21       vice.
22
23       Every time an EVS event occurs, one of the callbacks specified  by  the
24       argument  callbacks is called.  The callback functions are described by
25       the following type definitions:
26
27              typedef void (*evs_deliver_fn_t) (
28                      struct evs_address source_addr,
29                      void *msg,
30                      int msg_len);
31
32              typedef void (*evs_confchg_fn_t) (
33                      struct evs_address *member_list, int member_list_entries,
34                      struct evs_address *left_list, int left_list_entries,
35                      struct evs_address *joined_list, int joined_list_entries);
36
37       The callbacks argument is of the type:
38
39              typedef struct {
40                      evs_deliver_fn_t evs_deliver_fn;
41                      evs_confchg_fn_t evs_confchg_fn;
42              } evs_callbacks_t;
43
44       When a configuration change occurs or a message is to be delivered  one
45       of the callbacks is called from the evs_dispatch() function.  If a con‐
46       figuration change occurs, evs_confchg_fn is called.  If a delivery of a
47       message occurs, evs_deliver_fn is called.
48
49       The evs_address structure is defined
50
51              struct evs_address {
52                      unsigned int nodeid;
53                      unsigned short family;
54                      unsigned char addr[TOTEMIP_ADDRLEN];
55              };
56
57       where nodeid is a 32 bit unique node identifier, family is of the value
58       AF_INET  for an IPV4 network, or AF_INET6 for an IPV6 network, and addr
59       is a 32 bit address for an IPV4 network, or 128 bit address for an IPV6
60       network.
61
62
63

RETURN VALUE

65       This call returns the EVS_OK value if successful, otherwise an error is
66       returned.
67

ERRORS

69       The errors are undocumented.
70

SEE ALSO

72       evs_overview(8),   evs_finalize(3),   evs_fd_get(3),   evs_dispatch(3),
73       evs_join(3),  evs_leave(3),  evs_mcast_joined(3),  evs_mcast_groups(3),
74       evs_mmembership_get(3)
75
76openais Man Page                  2004-08-31                 EVS_INITIALIZE(3)
Impressum