2e9e18b01b9e8ae43aba02d037242af3f3435f5d
2 * Copyright (C) 2009 Martin Willi
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup ha_kernel ha_kernel
24 typedef struct ha_kernel_t ha_kernel_t
;
26 #include "ha_segments.h"
29 * HA segment kernel configuration interface.
34 * Check if a host is in a segment.
36 * @param host host to check
37 * @param segment segment
38 * @return TRUE if host belongs to segment
40 bool (*in_segment
)(ha_kernel_t
*this, host_t
*host
, u_int segment
);
43 * Activate a segment at kernel level for all cluster addresses.
45 * @param segment segment to activate
47 void (*activate
)(ha_kernel_t
*this, u_int segment
);
50 * Deactivate a segment at kernel level for all cluster addresses.
52 * @param segment segment to deactivate
54 void (*deactivate
)(ha_kernel_t
*this, u_int segment
);
57 * Destroy a ha_kernel_t.
59 void (*destroy
)(ha_kernel_t
*this);
63 * Create a ha_kernel instance.
65 * @param count total number of segments to use
66 * @param active bitmask of initially active segments
67 * @param virtuals comma separated list of virtual cluster addresses
69 ha_kernel_t
*ha_kernel_create(u_int count
, char *virtuals
);
71 #endif /* HA_KERNEL_ @}*/