redesigned IKE_SA using a transaction mechanism:

removed old state machine
  reimplemented IKE_SA setup and delete
  implemented dead peer detection
  implemented keep-alives
  a lot of fixes
  no rekeying yet
This commit is contained in:
Martin Willi
2006-07-05 10:53:20 +00:00
parent b12af2ead6
commit 3dd3c5f39e
71 changed files with 4873 additions and 8187 deletions
+4 -4
View File
@@ -50,11 +50,11 @@ struct private_interfaces_t {
};
/**
* Implements interfaces_t.get_addresses
* Implements interfaces_t.create_address_iterator
*/
static linked_list_t* get_addresses(private_interfaces_t *this)
static iterator_t* create_address_iterator(private_interfaces_t *this)
{
return this->addresses;
return this->addresses->create_iterator(this->addresses, TRUE);
}
/**
@@ -138,7 +138,7 @@ interfaces_t *interfaces_create(u_int16_t port)
this->port = port;
this->public.get_addresses = (linked_list_t* (*) (interfaces_t*)) get_addresses;
this->public.create_address_iterator = (iterator_t* (*) (interfaces_t*)) create_address_iterator;
this->public.is_local_address = (bool (*) (interfaces_t*, host_t*)) is_local_address;
this->public.destroy = (void (*) (interfaces_t*)) destroy;
+5 -5
View File
@@ -41,12 +41,12 @@ typedef struct interfaces_t interfaces_t;
struct interfaces_t {
/**
* @brief Get addresses of local interfaces
* @brief Get an iterator over addresses of local interfaces
*
* @param this calling object
* @return linked_list_t of host_t objects
* @return iterator over host_t objects
*/
linked_list_t* (*get_addresses) (interfaces_t *ifaces);
iterator_t* (*create_address_iterator) (interfaces_t *this);
/**
* @brief Check if address is associated with a local interface
@@ -55,7 +55,7 @@ struct interfaces_t {
* @param host address to set as destination
* @return TRUE if address is associated with a local interface, FALSE otherwise
*/
bool (*is_local_address) (interfaces_t *ifaces, host_t *host);
bool (*is_local_address) (interfaces_t *this, host_t *host);
/**
* @brief Destroy the object, freeing contained data.
@@ -77,4 +77,4 @@ struct interfaces_t {
interfaces_t *interfaces_create(u_int16_t port);
#endif /*INTERFACES_H_*/
#endif /* INTERFACES_H_ */
+2 -2
View File
@@ -164,7 +164,7 @@ static status_t receiver(private_socket_t *this, packet_t **packet)
pkt->set_source(pkt, source);
pkt->set_destination(pkt, dest);
this->logger->log(this->logger, CONTROL, "received packet: from %s:%d to %s:%d",
this->logger->log(this->logger, CONTROL|LEVEL1, "received packet: from %s:%d to %s:%d",
source->get_address(source), source->get_port(source),
dest->get_address(dest), dest->get_port(dest));
@@ -202,7 +202,7 @@ status_t sender(private_socket_t *this, packet_t *packet)
dst = packet->get_destination(packet);
data = packet->get_data(packet);
this->logger->log(this->logger, CONTROL, "sending packet: from %s:%d to %s:%d",
this->logger->log(this->logger, CONTROL|LEVEL1, "sending packet: from %s:%d to %s:%d",
src->get_address(src), src->get_port(src),
dst->get_address(dst), dst->get_port(dst));