]> git.ipfire.org Git - thirdparty/strongswan.git/blame - src/libcharon/sa/ikev2/tasks/ike_natd.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libcharon / sa / ikev2 / tasks / ike_natd.h
CommitLineData
c60c7694
MW
1/*
2 * Copyright (C) 2007 Martin Willi
19ef2aec
TB
3 *
4 * Copyright (C) secunet Security Networks AG
c60c7694
MW
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
552cc11b
MW
15 */
16
17/**
18 * @defgroup ike_natd ike_natd
22bf44c8 19 * @{ @ingroup tasks_v2
c60c7694
MW
20 */
21
22#ifndef IKE_NATD_H_
23#define IKE_NATD_H_
24
25typedef struct ike_natd_t ike_natd_t;
26
27#include <library.h>
28#include <sa/ike_sa.h>
15a682f4 29#include <sa/task.h>
c60c7694
MW
30
31/**
552cc11b 32 * Task of type ike_natd, detects NAT situation in IKE_SA_INIT exchange.
c60c7694
MW
33 */
34struct ike_natd_t {
35
36 /**
37 * Implements the task_t interface
38 */
39 task_t task;
7daf5226 40
9d9a772e
MW
41 /**
42 * Check if the NAT mapping has changed for our address.
43 *
44 * MOBIKE uses NAT payloads in DPD to detect changes in the NAT mappings.
45 *
22bf44c8 46 * @return TRUE if mappings have changed
9d9a772e
MW
47 */
48 bool (*has_mapping_changed)(ike_natd_t *this);
c60c7694
MW
49};
50
51/**
552cc11b 52 * Create a new ike_natd task.
c60c7694
MW
53 *
54 * @param ike_sa IKE_SA this task works for
65d5f6bc 55 * @param initiator TRUE if task is the original initiator
c60c7694
MW
56 * @return ike_natd task to handle by the task_manager
57 */
58ike_natd_t *ike_natd_create(ike_sa_t *ike_sa, bool initiator);
59
1490ff4d 60#endif /** IKE_NATD_H_ @}*/