update_sa_job.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2008 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. * @defgroup update_sa_job update_sa_job
  17. * @{ @ingroup cjobs
  18. */
  19. #ifndef UPDATE_SA_JOB_H_
  20. #define UPDATE_SA_JOB_H_
  21. typedef struct update_sa_job_t update_sa_job_t;
  22. #include <library.h>
  23. #include <networking/host.h>
  24. #include <processing/jobs/job.h>
  25. #include <crypto/proposal/proposal.h>
  26. /**
  27. * Update the addresses of an IKE and its CHILD_SAs.
  28. */
  29. struct update_sa_job_t {
  30. /**
  31. * implements job_t interface
  32. */
  33. job_t job_interface;
  34. };
  35. /**
  36. * Creates a job to update IKE and CHILD_SA addresses.
  37. *
  38. * @param protocol IPsec protocol of SA to update
  39. * @param spi SPI of SA to update
  40. * @param dst old destination host of SA to update
  41. * @param new new address and port
  42. * @return update_sa_job_t object
  43. */
  44. update_sa_job_t *update_sa_job_create(protocol_id_t protocol,
  45. uint32_t spi, host_t *dst, host_t *new);
  46. #endif /** UPDATE_SA_JOB_H_ @}*/