corosync
2.3.2
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
exec
totemnet.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005 MontaVista Software, Inc.
3
* Copyright (c) 2006-2007, 2009 Red Hat, Inc.
4
*
5
* All rights reserved.
6
*
7
* Author: Steven Dake (sdake@redhat.com)
8
*
9
* This software licensed under BSD license, the text of which follows:
10
*
11
* Redistribution and use in source and binary forms, with or without
12
* modification, are permitted provided that the following conditions are met:
13
*
14
* - Redistributions of source code must retain the above copyright notice,
15
* this list of conditions and the following disclaimer.
16
* - Redistributions in binary form must reproduce the above copyright notice,
17
* this list of conditions and the following disclaimer in the documentation
18
* and/or other materials provided with the distribution.
19
* - Neither the name of the MontaVista Software, Inc. nor the names of its
20
* contributors may be used to endorse or promote products derived from this
21
* software without specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33
* THE POSSIBILITY OF SUCH DAMAGE.
34
*/
35
43
#ifndef TOTEMNET_H_DEFINED
44
#define TOTEMNET_H_DEFINED
45
46
#include <sys/types.h>
47
#include <sys/socket.h>
48
49
#include <
corosync/totem/totem.h
>
50
51
#define TOTEMNET_NOFLUSH 0
52
#define TOTEMNET_FLUSH 1
53
57
extern
int
totemnet_initialize
(
58
qb_loop_t *poll_handle,
59
void
**net_context,
60
struct
totem_config
*
totem_config
,
61
totemsrp_stats_t
*stats,
62
int
interface_no,
63
void
*context,
64
65
void
(*deliver_fn) (
66
void
*context,
67
const
void
*msg,
68
unsigned
int
msg_len),
69
70
void
(*iface_change_fn) (
71
void
*context,
72
const
struct
totem_ip_address
*iface_address),
73
74
void
(*target_set_completed) (
75
void
*context));
76
77
extern
void
*
totemnet_buffer_alloc
(
void
*net_context);
78
79
extern
void
totemnet_buffer_release
(
void
*net_context,
void
*ptr);
80
81
extern
int
totemnet_processor_count_set
(
82
void
*net_context,
83
int
processor_count);
84
85
extern
int
totemnet_token_send
(
86
void
*net_context,
87
const
void
*msg,
88
unsigned
int
msg_len);
89
90
extern
int
totemnet_mcast_flush_send
(
91
void
*net_context,
92
const
void
*msg,
93
unsigned
int
msg_len);
94
95
extern
int
totemnet_mcast_noflush_send
(
96
void
*net_context,
97
const
void
*msg,
98
unsigned
int
msg_len);
99
100
extern
int
totemnet_recv_flush
(
void
*net_context);
101
102
extern
int
totemnet_send_flush
(
void
*net_context);
103
104
extern
int
totemnet_iface_check
(
void
*net_context);
105
106
extern
int
totemnet_finalize
(
void
*net_context);
107
108
extern
int
totemnet_net_mtu_adjust
(
void
*net_context,
struct
totem_config *totem_config);
109
110
extern
const
char
*
totemnet_iface_print
(
void
*net_context);
111
112
extern
int
totemnet_iface_get
(
113
void
*net_context,
114
struct
totem_ip_address
*
addr
);
115
116
extern
int
totemnet_token_target_set
(
117
void
*net_context,
118
const
struct
totem_ip_address
*token_target);
119
120
extern
int
totemnet_crypto_set
(
121
void
*net_context,
122
const
char
*cipher_type,
123
const
char
*hash_type);
124
125
extern
int
totemnet_recv_mcast_empty
(
126
void
*net_context);
127
128
extern
int
totemnet_member_add
(
129
void
*net_context,
130
const
struct
totem_ip_address
*member);
131
132
extern
int
totemnet_member_remove
(
133
void
*net_context,
134
const
struct
totem_ip_address
*member);
135
136
#endif
/* TOTEMNET_H_DEFINED */
Generated on Mon Feb 3 2014 11:07:20 for corosync by
1.8.3.1