Introduced payload types sa_payload and proposal_substructure
[strongswan.git] / Source / charon / payloads / proposal_substructure.h
1 /**
2 * @file proposal_substructure.h
3 *
4 * @brief Declaration of the class proposal_substructure_t.
5 *
6 * An object of this type represents an IKEv2 PROPOSAL Substructure and contains transforms.
7 *
8 */
9
10 /*
11 * Copyright (C) 2005 Jan Hutter, Martin Willi
12 * Hochschule fuer Technik Rapperswil
13 *
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2 of the License, or (at your
17 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
23 */
24
25 #ifndef PROPOSAL_SUBSTRUCTURE_H_
26 #define PROPOSAL_SUBSTRUCTURE_H_
27
28
29 #include "../types.h"
30 #include "payload.h"
31
32 /**
33 * Object representing an IKEv2- PROPOSAL SUBSTRUCTURE
34 *
35 * The PROPOSAL SUBSTRUCTURE format is described in RFC section 3.3.1.
36 *
37 */
38 typedef struct proposal_substructure_s proposal_substructure_t;
39
40 struct proposal_substructure_s {
41 /**
42 * implements payload_t interface
43 */
44 payload_t payload_interface;
45
46 /**
47 * @brief Destroys an proposal_substructure_t object.
48 *
49 * @param this proposal_substructure_t object to destroy
50 * @return
51 * SUCCESS in any case
52 */
53 status_t (*destroy) (proposal_substructure_t *this);
54 };
55
56 /**
57 * @brief Creates an empty proposal_substructure_t object
58 *
59 * @return
60 * - created proposal_substructure_t object, or
61 * - NULL if failed
62 */
63
64 proposal_substructure_t *proposal_substructure_create();
65
66
67
68 #endif /*PROPOSAL_SUBSTRUCTURE_H_*/