Return to ha_tunnel.h CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / libcharon / plugins / ha |
1.1 misho 1: /* 2: * Copyright (C) 2009 Martin Willi 3: * HSR Hochschule fuer Technik Rapperswil 4: * 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>. 9: * 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 13: * for more details. 14: */ 15: 16: /** 17: * @defgroup ha_ ha_tunnel 18: * @{ @ingroup ha 19: */ 20: 21: #ifndef HA_TUNNEL_H_ 22: #define HA_TUNNEL_H_ 23: 24: #include <sa/ike_sa.h> 25: 26: typedef struct ha_tunnel_t ha_tunnel_t; 27: 28: /** 29: * Socket to send/received SA synchronization data 30: */ 31: struct ha_tunnel_t { 32: 33: /** 34: * Check if an IKE_SA is used for exchanging HA messages. 35: * 36: * @param ike_Sa ike_sa to check 37: * @return TRUE if IKE_SA is used to secure HA messages 38: */ 39: bool (*is_sa)(ha_tunnel_t *this, ike_sa_t *ike_sa); 40: 41: /** 42: * Destroy a ha_tunnel_t. 43: */ 44: void (*destroy)(ha_tunnel_t *this); 45: }; 46: 47: /** 48: * Create a ha_tunnel instance. 49: * 50: * @param local local address of HA tunnel 51: * @param remote remote address of HA tunnel 52: * @param secret PSK tunnel authentication secret 53: * @return HA tunnel instance 54: */ 55: ha_tunnel_t *ha_tunnel_create(char *local, char *remote, char *secret); 56: 57: #endif /** HA_TUNNEL_H_ @}*/