Annotation of embedaddon/strongswan/src/libimcv/seg/seg_contract_manager.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2014 Andreas Steffen
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: /**
17: * @defgroup seg_contract_manager seg_contract_manager
18: * @{ @ingroup libimcv_seg
19: */
20:
21: #ifndef SEG_CONTRACT_MANAGER_H_
22: #define SEG_CONTRACT_MANAGER_H_
23:
24: typedef struct seg_contract_manager_t seg_contract_manager_t;
25:
26: #include "seg_contract.h"
27:
28: /**
29: * Interface for a PA-TNC attribute segmentation contract manager
30: *
31: */
32: struct seg_contract_manager_t {
33:
34: /**
35: * Add segmentation contract
36: *
37: * @param contract Segmentation contract to be added
38: */
39: void (*add_contract)(seg_contract_manager_t *this, seg_contract_t *contract);
40:
41: /**
42: * Get segmentation contract
43: *
44: * @param msg_type PA-TNC message type governed by contract
45: * @param is_issuer If TRUE get only issuer contracts
46: * @param id Match either issuer or responder ID
47: */
48: seg_contract_t* (*get_contract)(seg_contract_manager_t *this,
49: pen_type_t msg_type, bool is_issuer,
50: TNC_UInt32 id);
51:
52: /**
53: * Destroys a seg_contract_manager_t object.
54: */
55: void (*destroy)(seg_contract_manager_t *this);
56: };
57:
58: /**
59: * Create a PA-TNC attribute segmentation contract manager
60: */
61: seg_contract_manager_t* seg_contract_manager_create();
62:
63: #endif /** SEG_CONTRACT_MANAGER_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>