~ubuntu-branches/ubuntu/precise/corosync/precise-proposed

« back to all changes in this revision

Viewing changes to exec/totemsrp.h

  • Committer: Bazaar Package Importer
  • Author(s): Ante Karamatic
  • Date: 2009-08-21 09:29:56 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090821092956-w9qxxxx3zeoh8dem
Tags: 1.0.0-4ubuntu2
* debian/control:
  - 'Ubuntu Developers' instead of 'Ubuntu Core Developers'
    as maintainer
  - Bump debhelper dependecy to 7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
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.
4
4
 *
5
5
 * All rights reserved.
6
6
 *
7
7
 * Author: Steven Dake (sdake@redhat.com)
8
8
 *
9
9
 * This software licensed under BSD license, the text of which follows:
10
 
 * 
 
10
 *
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:
13
13
 *
38
38
#include <corosync/totem/totem.h>
39
39
#include <corosync/totem/coropoll.h>
40
40
 
41
 
typedef unsigned int totemsrp_handle;
42
 
 
43
41
/*
44
42
 * Totem Single Ring Protocol
45
43
 * depends on poll abstraction, POSIX, IPV4
49
47
 * Create a protocol instance
50
48
 */
51
49
int totemsrp_initialize (
52
 
        poll_handle poll_handle,
53
 
        totemsrp_handle *handle,
 
50
        hdb_handle_t poll_handle,
 
51
        hdb_handle_t *handle,
54
52
        struct totem_config *totem_config,
55
53
 
56
54
        void (*deliver_fn) (
57
55
                unsigned int nodeid,
58
 
                struct iovec *iovec,
59
 
                int iov_len,
 
56
                const void *msg,
 
57
                unsigned int msg_len,
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));
67
65
 
68
 
void totemsrp_finalize (totemsrp_handle handle);
 
66
void totemsrp_finalize (hdb_handle_t handle);
69
67
 
70
68
/*
71
69
 * Multicast a message
72
70
 */
73
71
int totemsrp_mcast (
74
 
        totemsrp_handle handle,
 
72
        hdb_handle_t handle,
75
73
        struct iovec *iovec,
76
 
        int iov_len,
 
74
        unsigned int iov_len,
77
75
        int priority);
78
76
 
79
77
/*
80
78
 * Return number of available messages that can be queued
81
79
 */
82
 
int totemsrp_avail (totemsrp_handle handle);
 
80
int totemsrp_avail (hdb_handle_t handle);
83
81
 
84
82
int totemsrp_callback_token_create (
85
 
        totemsrp_handle handle,
 
83
        hdb_handle_t handle,
86
84
        void **handle_out,
87
85
        enum totem_callback_token_type type,
88
86
        int delete,
89
 
        int (*callback_fn) (enum totem_callback_token_type type, void *),
90
 
        void *data);
 
87
        int (*callback_fn) (enum totem_callback_token_type type, const void *),
 
88
        const void *data);
91
89
 
92
90
void totemsrp_callback_token_destroy (
93
 
        totemsrp_handle handle,
 
91
        hdb_handle_t handle,
94
92
        void **handle_out);
95
93
 
96
 
int totemsrp_new_msg_signal (totemsrp_handle handle);
 
94
int totemsrp_new_msg_signal (hdb_handle_t handle);
97
95
 
98
96
extern void totemsrp_net_mtu_adjust (struct totem_config *totem_config);
99
97
 
100
98
extern int totemsrp_ifaces_get (
101
 
        totemsrp_handle handle,
 
99
        hdb_handle_t handle,
102
100
        unsigned int nodeid,
103
101
        struct totem_ip_address *interfaces,
104
102
        char ***status,
105
103
        unsigned int *iface_count);
106
104
 
107
 
extern int totemsrp_my_nodeid_get (
108
 
        totemsrp_handle handle);
 
105
extern unsigned int totemsrp_my_nodeid_get (
 
106
        hdb_handle_t handle);
109
107
 
110
108
extern int totemsrp_my_family_get (
111
 
        totemsrp_handle handle);
 
109
        hdb_handle_t handle);
 
110
 
 
111
extern int totemsrp_crypto_set (
 
112
        hdb_handle_t handle,
 
113
        unsigned int type);
112
114
 
113
115
extern int totemsrp_ring_reenable (
114
 
        totemsrp_handle handle);
 
116
        hdb_handle_t handle);
115
117
 
116
118
#endif /* TOTEMSRP_H_DEFINED */