Annotation of embedaddon/strongswan/src/libcharon/plugins/error_notify/error_notify_msg.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2012 Martin Willi
                      3:  * Copyright (C) 2012 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 error_notify_msg error_notify_msg
                     18:  * @{ @ingroup error_notify
                     19:  */
                     20: 
                     21: #ifndef ERROR_NOTIFY_MSG_H_
                     22: #define ERROR_NOTIFY_MSG_H_
                     23: 
                     24: #define ERROR_NOTIFY_SOCKET IPSEC_PIDDIR "/charon.enfy"
                     25: 
                     26: typedef struct error_notify_msg_t error_notify_msg_t;
                     27: 
                     28: /**
                     29:  * Message type, these are mapped to ALERT_* types.
                     30:  */
                     31: enum {
                     32:        ERROR_NOTIFY_RADIUS_NOT_RESPONDING = 1,
                     33:        ERROR_NOTIFY_LOCAL_AUTH_FAILED = 2,
                     34:        ERROR_NOTIFY_PEER_AUTH_FAILED = 3,
                     35:        ERROR_NOTIFY_PARSE_ERROR_HEADER = 4,
                     36:        ERROR_NOTIFY_PARSE_ERROR_BODY = 5,
                     37:        ERROR_NOTIFY_RETRANSMIT_SEND_TIMEOUT = 6,
                     38:        ERROR_NOTIFY_HALF_OPEN_TIMEOUT = 7,
                     39:        ERROR_NOTIFY_PROPOSAL_MISMATCH_IKE = 8,
                     40:        ERROR_NOTIFY_PROPOSAL_MISMATCH_CHILD = 9,
                     41:        ERROR_NOTIFY_TS_MISMATCH = 10,
                     42:        ERROR_NOTIFY_INSTALL_CHILD_SA_FAILED = 11,
                     43:        ERROR_NOTIFY_INSTALL_CHILD_POLICY_FAILED = 12,
                     44:        ERROR_NOTIFY_UNIQUE_REPLACE = 13,
                     45:        ERROR_NOTIFY_UNIQUE_KEEP = 14,
                     46:        ERROR_NOTIFY_VIP_FAILURE = 15,
                     47:        ERROR_NOTIFY_AUTHORIZATION_FAILED = 16,
                     48:        ERROR_NOTIFY_CERT_EXPIRED = 17,
                     49:        ERROR_NOTIFY_CERT_REVOKED = 18,
                     50:        ERROR_NOTIFY_NO_ISSUER_CERT = 19,
                     51:        ERROR_NOTIFY_RETRANSMIT_SEND = 20,
                     52: };
                     53: 
                     54: /**
                     55:  * Message to exchange over notify socket, strings are null-terminated.
                     56:  */
                     57: struct error_notify_msg_t {
                     58:        /** message type */
                     59:        int type;
                     60:        /** string with an error description */
                     61:        char str[384];
                     62:        /** connection name, if known */
                     63:        char name[64];
                     64:        /** peer identity, if known */
                     65:        char id[256];
                     66:        /** peer address and port, if known */
                     67:        char ip[60];
                     68: } __attribute__((packed));
                     69: 
                     70: #endif /** ERROR_NOTIFY_MSG_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>