Return to whitelist_msg.h CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / libcharon / plugins / whitelist |
1.1 misho 1: /* 2: * Copyright (C) 2011 Martin Willi 3: * Copyright (C) 2011 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: /** 17: * @defgroup whitelist_msg whitelist_msg 18: * @{ @ingroup whitelist 19: */ 20: 21: #ifndef WHITELIST_MSG_H_ 22: #define WHITELIST_MSG_H_ 23: 24: #define WHITELIST_SOCKET IPSEC_PIDDIR "/charon.wlst" 25: 26: typedef struct whitelist_msg_t whitelist_msg_t; 27: 28: /** 29: * Message type. 30: */ 31: enum { 32: /* add whitelist entry */ 33: WHITELIST_ADD = 1, 34: /* remove whitelist entry */ 35: WHITELIST_REMOVE = 2, 36: /* list identities matching id, gets responded with LIST messages */ 37: WHITELIST_LIST = 3, 38: /* indicates end of list in a series of LIST messages */ 39: WHITELIST_END = 4, 40: /* flush identities matching id */ 41: WHITELIST_FLUSH = 5, 42: /* enable whitelist checking */ 43: WHITELIST_ENABLE = 6, 44: /* disable whitelist checking */ 45: WHITELIST_DISABLE = 7, 46: }; 47: 48: /** 49: * Message to exchange over whitelist 50: */ 51: struct whitelist_msg_t { 52: /** message type */ 53: int type; 54: /** null terminated identity */ 55: char id[128]; 56: } __attribute__((packed)); 57: 58: #endif /** WHITELIST_MSG_H_ @}*/