2
2
* Copyright (c) 2003-2005 MontaVista Software, Inc.
3
* Copyright (c) 2006-2007 Red Hat, Inc.
3
* Copyright (c) 2006-2007, 2009 Red Hat, Inc.
5
5
* All rights reserved.
7
7
* Author: Steven Dake (sdake@redhat.com)
9
9
* This software licensed under BSD license, the text of which follows:
11
11
* Redistribution and use in source and binary forms, with or without
12
12
* modification, are permitted provided that the following conditions are met:
49
47
* Create a protocol instance
51
49
int totemsrp_initialize (
52
poll_handle poll_handle,
53
totemsrp_handle *handle,
50
hdb_handle_t poll_handle,
54
52
struct totem_config *totem_config,
56
54
void (*deliver_fn) (
57
55
unsigned int nodeid,
60
58
int endian_conversion_required),
61
59
void (*confchg_fn) (
62
60
enum totem_configuration_type configuration_type,
63
unsigned int *member_list, int member_list_entries,
64
unsigned int *left_list, int left_list_entries,
65
unsigned int *joined_list, int joined_list_entries,
66
struct memb_ring_id *ring_id));
61
const unsigned int *member_list, size_t member_list_entries,
62
const unsigned int *left_list, size_t left_list_entries,
63
const unsigned int *joined_list, size_t joined_list_entries,
64
const struct memb_ring_id *ring_id));
68
void totemsrp_finalize (totemsrp_handle handle);
66
void totemsrp_finalize (hdb_handle_t handle);
71
69
* Multicast a message
73
71
int totemsrp_mcast (
74
totemsrp_handle handle,
75
73
struct iovec *iovec,
80
78
* Return number of available messages that can be queued
82
int totemsrp_avail (totemsrp_handle handle);
80
int totemsrp_avail (hdb_handle_t handle);
84
82
int totemsrp_callback_token_create (
85
totemsrp_handle handle,
87
85
enum totem_callback_token_type type,
89
int (*callback_fn) (enum totem_callback_token_type type, void *),
87
int (*callback_fn) (enum totem_callback_token_type type, const void *),
92
90
void totemsrp_callback_token_destroy (
93
totemsrp_handle handle,
94
92
void **handle_out);
96
int totemsrp_new_msg_signal (totemsrp_handle handle);
94
int totemsrp_new_msg_signal (hdb_handle_t handle);
98
96
extern void totemsrp_net_mtu_adjust (struct totem_config *totem_config);
100
98
extern int totemsrp_ifaces_get (
101
totemsrp_handle handle,
102
100
unsigned int nodeid,
103
101
struct totem_ip_address *interfaces,
105
103
unsigned int *iface_count);
107
extern int totemsrp_my_nodeid_get (
108
totemsrp_handle handle);
105
extern unsigned int totemsrp_my_nodeid_get (
106
hdb_handle_t handle);
110
108
extern int totemsrp_my_family_get (
111
totemsrp_handle handle);
109
hdb_handle_t handle);
111
extern int totemsrp_crypto_set (
113
115
extern int totemsrp_ring_reenable (
114
totemsrp_handle handle);
116
hdb_handle_t handle);
116
118
#endif /* TOTEMSRP_H_DEFINED */