2008-10-24 12:42:06 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2008 Martin Willi
|
2018-05-23 14:04:50 +00:00
|
|
|
* HSR Hochschule fuer Technik Rapperswil
|
2008-10-24 12:42:06 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2009-09-29 10:56:10 +00:00
|
|
|
* @defgroup ha_child ha_child
|
|
|
|
* @{ @ingroup ha
|
2008-10-24 12:42:06 +00:00
|
|
|
*/
|
|
|
|
|
2009-09-29 10:56:10 +00:00
|
|
|
#ifndef HA_CHILD_H_
|
|
|
|
#define HA_CHILD_H_
|
2008-10-24 12:42:06 +00:00
|
|
|
|
2010-07-22 16:54:35 +00:00
|
|
|
typedef struct ha_child_t ha_child_t;
|
|
|
|
|
2009-09-29 10:56:10 +00:00
|
|
|
#include "ha_socket.h"
|
|
|
|
#include "ha_tunnel.h"
|
|
|
|
#include "ha_segments.h"
|
2010-07-26 11:49:35 +00:00
|
|
|
#include "ha_kernel.h"
|
2008-11-12 13:28:18 +00:00
|
|
|
|
2008-10-24 12:42:06 +00:00
|
|
|
#include <daemon.h>
|
|
|
|
|
|
|
|
/**
|
2008-11-20 08:51:54 +00:00
|
|
|
* Listener to synchronize CHILD_SAs.
|
2008-10-24 12:42:06 +00:00
|
|
|
*/
|
2009-09-29 10:56:10 +00:00
|
|
|
struct ha_child_t {
|
2008-10-24 12:42:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements bus listener interface.
|
|
|
|
*/
|
|
|
|
listener_t listener;
|
|
|
|
|
|
|
|
/**
|
2009-09-29 10:56:10 +00:00
|
|
|
* Destroy a ha_child_t.
|
2008-10-24 12:42:06 +00:00
|
|
|
*/
|
2009-09-29 10:56:10 +00:00
|
|
|
void (*destroy)(ha_child_t *this);
|
2008-10-24 12:42:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2009-09-29 10:56:10 +00:00
|
|
|
* Create a ha_child instance.
|
2008-11-12 13:28:18 +00:00
|
|
|
*
|
|
|
|
* @param socket socket to use for sending synchronization messages
|
2009-09-15 12:52:56 +00:00
|
|
|
* @param tunnel tunnel securing sync messages, if any
|
2010-07-26 11:49:35 +00:00
|
|
|
* @param segments segment handling
|
|
|
|
* @param kernel kernel helper
|
2008-11-20 08:51:54 +00:00
|
|
|
* @return CHILD listener
|
2008-10-24 12:42:06 +00:00
|
|
|
*/
|
2010-07-22 16:54:35 +00:00
|
|
|
ha_child_t *ha_child_create(ha_socket_t *socket, ha_tunnel_t *tunnel,
|
2010-07-26 11:49:35 +00:00
|
|
|
ha_segments_t *segments, ha_kernel_t *kernel);
|
2008-10-24 12:42:06 +00:00
|
|
|
|
2010-07-05 13:04:30 +00:00
|
|
|
#endif /** HA_CHILD_ @}*/
|