2 * @file retransmit_request_job.c
4 * @brief Interface of retransmit_request_job_t.
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 #ifndef _RESEND_MESSAGE_JOB_H_
24 #define _RESEND_MESSAGE_JOB_H_
27 #include <queues/jobs/job.h>
28 #include <sa/ike_sa_id.h>
31 typedef struct retransmit_request_job_t retransmit_request_job_t
;
34 * Object representing an RETRANSMIT_REQUEST Job.
38 struct retransmit_request_job_t
{
40 * The job_t interface.
45 * @brief Returns the retransmit count for a specific request.
47 * @param this calling retransmit_request_job_t object
48 * @return retransmit count of request
50 u_int32_t (*get_retransmit_count
) (retransmit_request_job_t
*this);
53 * @brief Increases number of retransmitt attemps.
55 * @param this calling retransmit_request_job_t object
57 void (*increase_retransmit_count
) (retransmit_request_job_t
*this);
60 * @brief Returns the message_id of the request to be resent
62 * @param this calling retransmit_request_job_t object
63 * @return message id of the request to resend
65 u_int32_t (*get_message_id
) (retransmit_request_job_t
*this);
68 * @brief Returns the ike_sa_id_t object of the IKE_SA
69 * which the request belongs to
71 * @warning returned ike_sa_id_t object is getting destroyed in
72 * retransmit_request_job_t.destroy.
74 * @param this calling retransmit_request_job_t object
75 * @return ike_sa_id_t object to identify IKE_SA (gets NOT cloned)
77 ike_sa_id_t
*(*get_ike_sa_id
) (retransmit_request_job_t
*this);
80 * @brief Destroys an retransmit_request_job_t object.
82 * @param this retransmit_request_job_t object to destroy
84 void (*destroy
) (retransmit_request_job_t
*this);
88 * @brief Creates a job of type RETRANSMIT_REQUEST.
90 * @param message_id message_id of the request to resend
91 * @param ike_sa_id identification of the ike_sa as ike_sa_id_t object (gets cloned)
92 * @return retransmit_request_job_t object
96 retransmit_request_job_t
*retransmit_request_job_create(u_int32_t message_id
,ike_sa_id_t
*ike_sa_id
);
98 #endif //_RESEND_MESSAGE_JOB_H_