diff options
author | Martin Willi <martin@strongswan.org> | 2009-11-17 14:51:50 +0100 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-11-17 14:51:50 +0100 |
commit | b5a2055fb1b88ea4abb97334d89e311c9ceaa7d4 (patch) | |
tree | eb71f0e63c8859e6fd7d7d59559984feda61a441 /src/libstrongswan/attributes/attribute_manager.h | |
parent | e6cf06027572382cc8d326ee3ccd265ff7e522e0 (diff) | |
download | strongswan-b5a2055fb1b88ea4abb97334d89e311c9ceaa7d4.tar.bz2 strongswan-b5a2055fb1b88ea4abb97334d89e311c9ceaa7d4.tar.xz |
Give plugins more control of which configuration attributes to request, and pass received attributes back to the requesting handler
Diffstat (limited to 'src/libstrongswan/attributes/attribute_manager.h')
-rw-r--r-- | src/libstrongswan/attributes/attribute_manager.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/libstrongswan/attributes/attribute_manager.h b/src/libstrongswan/attributes/attribute_manager.h index ba194b563..642662366 100644 --- a/src/libstrongswan/attributes/attribute_manager.h +++ b/src/libstrongswan/attributes/attribute_manager.h @@ -62,10 +62,11 @@ struct attribute_manager_t { * Create an enumerator over attributes to hand out to a peer. * * @param id peer identity to hand out attributes to + * @param vip virtual IP to assign to peer, if any * @return enumerator (configuration_attribute_type_t, chunk_t) */ - enumerator_t* (*create_attribute_enumerator)(attribute_manager_t *this, - identification_t *id); + enumerator_t* (*create_responder_enumerator)(attribute_manager_t *this, + identification_t *id, host_t *vip); /** * Register an attribute provider to the manager. @@ -86,13 +87,14 @@ struct attribute_manager_t { * Handle a configuration attribute by passing them to the handlers. * * @param server server from which the attribute was received + * @param handler handler we requested the attribute for, if any * @param type type of configuration attribute * @param data associated attribute data * @return handler which handled this attribute, NULL if none */ attribute_handler_t* (*handle)(attribute_manager_t *this, - identification_t *server, - configuration_attribute_type_t type, chunk_t data); + identification_t *server, attribute_handler_t *handler, + configuration_attribute_type_t type, chunk_t data); /** * Release an attribute previously handle()d by a handler. @@ -108,6 +110,16 @@ struct attribute_manager_t { chunk_t data); /** + * Create an enumerator over attributes to request from server. + * + * @param id server identity to hand out attributes to + * @param vip virtual IP going to request, if any + * @return enumerator (attribute_handler_t, ca_type_t, chunk_t) + */ + enumerator_t* (*create_initiator_enumerator)(attribute_manager_t *this, + identification_t *id, host_t *vip); + + /** * Register an attribute handler to the manager. * * @param handler attribute handler to register |