#include <threadcontroller.h>
Static Public Member Functions | |
| static void | setImplementation (auto_ptr< ThreadControllerImpl > implementation, uint16_t num_command_executers) |
| Sets the desired Thread Controller implementation. | |
| static void | startThread (Runnable &runnable) |
| Starts the execution of a Runnable object. | |
| static auto_ptr< Condition > | getCondition () |
| Gets a new Condition object. | |
| static auto_ptr< Mutex > | getMutex () |
| Gets a new Mutex object. | |
| static auto_ptr< Semaphore > | getSemaphore (uint32_t initial_value) |
| Creates a new implementation dependent Semaphore object. | |
| static void | incHalfOpenCounter () |
| Increments the half-opened IKE SAs counter. | |
| static void | decHalfOpenCounter () |
| Decrements the half-opened IKE SAs counter. | |
| static bool | useCookies () |
| Indicates the the cookie mechanism must be used with the current number of half-opened IKE_SA. | |
| static IkeSaController & | getWaitingIkeSaController () |
| Gets the next IkeSaController from the waiting queue. | |
| static void | addWaitingIkeSaController (IkeSaController &ike_sa_controller) |
| Adds an IkeSaController to the waiting queue. | |
| static uint64_t | nextSpi () |
| Gets the next SPI value. | |
| static void | addIkeSaController (auto_ptr< IkeSaController > ike_sa_controller) |
| Adds an IkeSaController to the collection. | |
| static void | requestChildSa (IpAddress &src_addr, IpAddress &dst_addr, auto_ptr< ChildSa > child_sa) |
| Request the creation of an CHILD_SA. | |
| static void | requestChildSa (IpAddress &src_addr, IpAddress &dst_addr, Enums::PROTOCOL_ID ipsec_protocol, Enums::IPSEC_MODE mode, auto_ptr< Payload_TSi > payload_ts_i, auto_ptr< Payload_TSr > payload_ts_r, uint32_t request_id) |
| static void | deleteIkeSaController (IkeSaController &ike_sa_controller) |
| Removes the IkeSaController from the collection and deletes it. | |
| static bool | pushCommandBySpi (uint64_t spi, auto_ptr< Command > command, bool priority) |
| Push a Command into an IkeSaController by SPI value. | |
| static bool | pushCommandByAddress (const IpAddress &addr, const IpAddress &peer_addr, auto_ptr< Command > command, bool priority) |
| Push a Command into an IkeSaController by address. | |
| static void | closeAllSas () |
| Deletes all the IKE_SAs and CHILD_SAs sending deletion INFORMATIONAL exchanges. | |
| static void | exit () |
| Sets the exit flag. | |
| static bool | isExiting () |
| Gets the exit flag value. | |
Static Protected Attributes | |
| static auto_ptr< ThreadControllerImpl > | implementation |
| Thread Controller implementation to be used. | |
| void openikev2::ThreadController::setImplementation | ( | auto_ptr< ThreadControllerImpl > | implementation, | |
| uint16_t | num_command_executers | |||
| ) | [static] |
Sets the desired Thread Controller implementation.
| implementation | Desired Thread Controller implementation . |
| void openikev2::ThreadController::startThread | ( | Runnable & | runnable | ) | [static] |
| auto_ptr< Condition > openikev2::ThreadController::getCondition | ( | ) | [static] |
| auto_ptr< Mutex > openikev2::ThreadController::getMutex | ( | ) | [static] |
| auto_ptr< Semaphore > openikev2::ThreadController::getSemaphore | ( | uint32_t | initial_value | ) | [static] |
| bool openikev2::ThreadController::useCookies | ( | ) | [static] |
Indicates the the cookie mechanism must be used with the current number of half-opened IKE_SA.
| IkeSaController & openikev2::ThreadController::getWaitingIkeSaController | ( | ) | [static] |
Gets the next IkeSaController from the waiting queue.
| void openikev2::ThreadController::addWaitingIkeSaController | ( | IkeSaController & | ike_sa_controller | ) | [static] |
Adds an IkeSaController to the waiting queue.
| ike_sa_controller | An IkeSaController waiting for a free IkeSaExecuter |
| uint64_t openikev2::ThreadController::nextSpi | ( | ) | [static] |
Gets the next SPI value.
| void openikev2::ThreadController::addIkeSaController | ( | auto_ptr< IkeSaController > | ike_sa_controller | ) | [static] |
| void openikev2::ThreadController::requestChildSa | ( | IpAddress & | src_addr, | |
| IpAddress & | dst_addr, | |||
| auto_ptr< ChildSa > | child_sa | |||
| ) | [static] |
Request the creation of an CHILD_SA.
If exists a suittable IKE_SA, then uses it. Otherwise, a new IKE_SA will be created.
| src_addr | Source address for the IKE_SA | |
| dst_addr | Destination address for the IKE_SA | |
| child_sa | CHILD_SA to be created |
| void openikev2::ThreadController::deleteIkeSaController | ( | IkeSaController & | ike_sa_controller | ) | [static] |
Removes the IkeSaController from the collection and deletes it.
| controller | IkeSaController to be deleted |
| bool openikev2::ThreadController::pushCommandBySpi | ( | uint64_t | spi, | |
| auto_ptr< Command > | command, | |||
| bool | priority | |||
| ) | [static] |
Push a Command into an IkeSaController by SPI value.
| spi | IkeSaController SPI value | |
| command | The Command to be pushed | |
| priority | The priority. TRUE if it must be inserted in the front and FALSE if it must be inserted in the back |
| bool openikev2::ThreadController::pushCommandByAddress | ( | const IpAddress & | addr, | |
| const IpAddress & | peer_addr, | |||
| auto_ptr< Command > | command, | |||
| bool | priority | |||
| ) | [static] |
Push a Command into an IkeSaController by address.
| addr | Source address of the IKE_SA | |
| peer_addr | Destination address of the IKE_SA | |
| command | The Command to be pushed | |
| priority | The priority. TRUE if it must be inserted in the front and FALSE if it must be inserted in the back |
| void openikev2::ThreadController::exit | ( | ) | [static] |
Sets the exit flag.
When this flag is set, if all the SAs become closed, a new CLOSE_ALL_SAS event is sent
| bool openikev2::ThreadController::isExiting | ( | ) | [static] |
Gets the exit flag value.
1.5.1