adopt_children_job.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2012 Martin Willi
  3. * Copyright (C) 2012 revosec AG
  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 adopt_children_job adopt_children_job
  17. * @{ @ingroup cjobs
  18. */
  19. #ifndef ADOPT_CHILDREN_JOB_H_
  20. #define ADOPT_CHILDREN_JOB_H_
  21. #include <library.h>
  22. #include <processing/jobs/job.h>
  23. #include <sa/ike_sa_id.h>
  24. #include <sa/task.h>
  25. typedef struct adopt_children_job_t adopt_children_job_t;
  26. /**
  27. * Job adopting children after IKEv1 reauthentication from old SA.
  28. */
  29. struct adopt_children_job_t {
  30. /**
  31. * Implements job_t.
  32. */
  33. job_t job_interface;
  34. /**
  35. * Queue a job for execution after completing migration.
  36. *
  37. * @param task task to queue for execution
  38. */
  39. void (*queue_task)(adopt_children_job_t *this, task_t *task);
  40. };
  41. /**
  42. * Create a adopt_children_job instance.
  43. *
  44. * @param id ike_sa_id_t of old ISAKMP SA to adopt children from
  45. * @return job
  46. */
  47. adopt_children_job_t *adopt_children_job_create(ike_sa_id_t *id);
  48. #endif /** ADOPT_CHILDREN_JOB_H_ @}*/