2 * Copyright (C) 2010 Martin Willi
3 * Copyright (C) 2010 revosec AG
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_attribute ha_attribute
21 #ifndef HA_ATTRIBUTE_H_
22 #define HA_ATTRIBUTE_H_
24 #include "ha_kernel.h"
25 #include "ha_segments.h"
27 #include <attributes/attribute_provider.h>
29 typedef struct ha_attribute_t ha_attribute_t
;
32 * A HA enabled in memory address pool attribute provider.
34 struct ha_attribute_t
{
37 * Implements attribute provider interface.
39 attribute_provider_t provider
;
42 * Reserve an address for a passive IKE_SA.
44 * @param name pool name to reserve address in
45 * @param address address to reserve
47 void (*reserve
)(ha_attribute_t
*this, char *name
, host_t
*address
);
50 * Destroy a ha_attribute_t.
52 void (*destroy
)(ha_attribute_t
*this);
56 * Create a ha_attribute instance.
58 ha_attribute_t
*ha_attribute_create(ha_kernel_t
*kernel
, ha_segments_t
*segments
);
60 #endif /** HA_ATTRIBUTE_H_ @}*/