libzrtp  1.2.0
ZRTP VoIP security
zrtp_error.h
Go to the documentation of this file.
1 /*
2  * libZRTP SDK library, implements the ZRTP secure VoIP protocol.
3  * Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
4  * Contact: http://philzimmermann.com
5  * For licensing and other legal details, see the file zrtp_legal.c.
6  *
7  * Viktor Krykun <v.krikun at zfoneproject.com>
8  */
9 
10 
16 #ifndef __ZRTP_ERROR_H__
17 #define __ZRTP_ERROR_H__
18 
19 #include "zrtp_config.h"
20 
35 {
36  zrtp_error_unknown = 0,
37  zrtp_error_timeout = 1,
38 
39  zrtp_error_invalid_packet = 0x10,
65 
72 typedef enum zrtp_status_t
73 {
74  zrtp_status_ok = 0,
97 
102 #define ZRTP_MIM2_WARNING_STR \
103  "Possible Man-In-The-Middle-Attack! Switching to state Error\n"\
104  "because a packet arrived that was ZRTP_DHPART2, but contained\n"\
105  "a g^y that didn't match the previous ZRTP_COMMIT.\n"
106 
107 #define ZRTP_MITM1_WARNING_STR "DH validating failed. (pvi is 1 or p-1), aborted\n"
108 
109 #define ZRTP_VERIFIED_INIT_WARNING_STR \
110  "Falling back to cleartext because a packet arrived that was\n"\
111  "ZRTP_CONFIRM1, but which couldn't be verified - the sender must have a different\n"\
112  "shared secret than we have.\n"
113 
114 #define ZRTP_VERIFIED_RESP_WARNING_STR \
115  "Falling back to cleartext because a packet arrived that was ZRTP_CONFIRM2,\n"\
116  " but which couldn't be verified - the sender must have a different shared secret than we have.\n"
117 
118 #define ZRTP_EQUAL_ZID_WARNING_STR \
119  "Received a ZRTP_HELLO packet with the same ZRTP ID that we have.\n"\
120  " This is likely due to a bug in the software. Ignoring the ZRTP_HELLO\n"\
121  " packet, therefore this call cannot be encrypted.\n"
122 
123 #define ZRTP_UNSUPPORTED_COMP_WARNING_STR \
124  " Received ZRTP_HELLO packet with an algorithms field which had a\n"\
125  " list of hashes that didn't include any of our supported hashes. Ignoring\n"\
126  " the ZRTP_HELLO packet, therefore this call cannot be encrypted.\n"
127 
128 #define ZRTP_NOT_UNIQUE_NONCE_WARNING_STR \
129  " Received COMMIT with hash value already used in another stream within this ZRTP session\n"
130 
131 #define ZRTP_RELAYED_SAS_FROM_NONMITM_STR \
132 " Received SAS Relaying message from endpoint which haven't introduced as MiTM.\n"
133 
136 #endif /* __ZRTP_ERROR_H__ */
Definition: zrtp_error.h:90
Definition: zrtp_error.h:78
zrtp_status_t
libzrtp functions statuses.
Definition: zrtp_error.h:72
Definition: zrtp_error.h:56
Definition: zrtp_error.h:41
Definition: zrtp_error.h:84
Definition: zrtp_error.h:40
Definition: zrtp_error.h:49
Definition: zrtp_error.h:44
Definition: zrtp_error.h:58
Definition: zrtp_error.h:93
Definition: zrtp_error.h:57
Definition: zrtp_error.h:59
Definition: zrtp_error.h:55
Definition: zrtp_error.h:76
Definition: zrtp_error.h:81
Definition: zrtp_error.h:48
Definition: zrtp_error.h:61
Definition: zrtp_error.h:53
Definition: zrtp_error.h:94
Definition: zrtp_error.h:87
Definition: zrtp_error.h:80
Definition: zrtp_error.h:47
Definition: zrtp_error.h:83
Definition: zrtp_error.h:77
Definition: zrtp_error.h:91
Definition: zrtp_error.h:92
Definition: zrtp_error.h:45
Definition: zrtp_error.h:52
Definition: zrtp_error.h:86
Definition: zrtp_error.h:95
Definition: zrtp_error.h:88
Definition: zrtp_error.h:51
Definition: zrtp_error.h:63
Definition: zrtp_error.h:79
Definition: zrtp_error.h:62
Definition: zrtp_error.h:75
zrtp_protocol_error_t
Define protocol error codes according to ZRTP RFC sec. 5.9.
Definition: zrtp_error.h:34
Definition: zrtp_error.h:89
Definition: zrtp_error.h:46
Definition: zrtp_error.h:82
Definition: zrtp_error.h:85
Definition: zrtp_error.h:42