1
/* $Id: errno.h 3553 2011-05-05 06:14:19Z nanang $ */
3
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
#ifndef __PJNATH_ERRNO_H__
21
#define __PJNATH_ERRNO_H__
25
* @brief PJNATH specific error codes
31
* @defgroup PJNATH_ERROR NAT Helper Library Error Codes
32
* @brief PJNATH specific error code constants
33
* @ingroup PJNATH_STUN_BASE
38
* Start of error code relative to PJ_ERRNO_START_USER.
39
* This value is 370000.
41
#define PJNATH_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*4)
44
/************************************************************
45
* STUN MESSAGING ERRORS
46
***********************************************************/
49
* Map STUN error code (300-699) into pj_status_t error space.
51
#define PJ_STATUS_FROM_STUN_CODE(code) (PJNATH_ERRNO_START+code)
55
* Invalid STUN message
57
#define PJNATH_EINSTUNMSG (PJNATH_ERRNO_START+1) /* 370001 */
60
* Invalid STUN message length.
62
#define PJNATH_EINSTUNMSGLEN (PJNATH_ERRNO_START+2) /* 370002 */
65
* Invalid or unexpected STUN message type
67
#define PJNATH_EINSTUNMSGTYPE (PJNATH_ERRNO_START+3) /* 370003 */
70
* STUN transaction has timed out
72
#define PJNATH_ESTUNTIMEDOUT (PJNATH_ERRNO_START+4) /* 370004 */
77
* Too many STUN attributes.
79
#define PJNATH_ESTUNTOOMANYATTR (PJNATH_ERRNO_START+21) /* 370021 */
82
* Invalid STUN attribute length.
84
#define PJNATH_ESTUNINATTRLEN (PJNATH_ERRNO_START+22) /* 370022 */
87
* Found duplicate STUN attribute.
89
#define PJNATH_ESTUNDUPATTR (PJNATH_ERRNO_START+23) /* 370023 */
93
* STUN FINGERPRINT verification failed
95
#define PJNATH_ESTUNFINGERPRINT (PJNATH_ERRNO_START+30) /* 370030 */
98
* Invalid STUN attribute after MESSAGE-INTEGRITY.
100
#define PJNATH_ESTUNMSGINTPOS (PJNATH_ERRNO_START+31) /* 370031 */
103
* Invalid STUN attribute after FINGERPRINT.
105
#define PJNATH_ESTUNFINGERPOS (PJNATH_ERRNO_START+33) /* 370033 */
110
* STUN (XOR-)MAPPED-ADDRESS attribute not found
112
#define PJNATH_ESTUNNOMAPPEDADDR (PJNATH_ERRNO_START+40) /* 370040 */
115
* STUN IPv6 attribute not supported
117
#define PJNATH_ESTUNIPV6NOTSUPP (PJNATH_ERRNO_START+41) /* 370041 */
120
* Invalid address family value in STUN message.
122
#define PJNATH_EINVAF (PJNATH_ERRNO_START+42) /* 370042 */
126
* Invalid STUN server or server not configured.
128
#define PJNATH_ESTUNINSERVER (PJNATH_ERRNO_START+50) /* 370050 */
131
/************************************************************
132
* STUN SESSION/TRANSPORT ERROR CODES
133
***********************************************************/
136
* STUN object has been destoyed.
138
#define PJNATH_ESTUNDESTROYED (PJNATH_ERRNO_START+60) /* 370060 */
141
/************************************************************
143
***********************************************************/
147
* ICE session not available
149
#define PJNATH_ENOICE (PJNATH_ERRNO_START+80) /* 370080 */
152
* ICE check is in progress
154
#define PJNATH_EICEINPROGRESS (PJNATH_ERRNO_START+81) /* 370081 */
157
* This error indicates that ICE connectivity check has failed, because
158
* there is at least one ICE component that does not have a valid check.
159
* Normally this happens because the network topology had caused the
160
* connectivity check to fail (e.g. no route between the two agents),
161
* however other reasons may include software incompatibility between
162
* the two agents, or incomplete candidates gathered by the agent(s).
164
#define PJNATH_EICEFAILED (PJNATH_ERRNO_START+82) /* 370082 */
167
* Default destination does not match any ICE candidates
169
#define PJNATH_EICEMISMATCH (PJNATH_ERRNO_START+83) /* 370083 */
172
* Invalid ICE component ID
174
#define PJNATH_EICEINCOMPID (PJNATH_ERRNO_START+86) /* 370086 */
177
* Invalid ICE candidate ID
179
#define PJNATH_EICEINCANDID (PJNATH_ERRNO_START+87) /* 370087 */
182
* Source address mismatch. This error occurs if the source address
183
* of the response for ICE connectivity check is different than
184
* the destination address of the request.
186
#define PJNATH_EICEINSRCADDR (PJNATH_ERRNO_START+88) /* 370088 */
189
* Missing ICE SDP attribute
191
#define PJNATH_EICEMISSINGSDP (PJNATH_ERRNO_START+90) /* 370090 */
194
* Invalid SDP "candidate" attribute
196
#define PJNATH_EICEINCANDSDP (PJNATH_ERRNO_START+91) /* 370091 */
199
* No host candidate associated with srflx. This error occurs when
200
* a server reflexive candidate is added without the matching
203
#define PJNATH_EICENOHOSTCAND (PJNATH_ERRNO_START+92) /* 370092 */
206
* Controlled agent timed-out in waiting for the controlling agent to
207
* send nominated check after all connectivity checks have completed.
209
#define PJNATH_EICENOMTIMEOUT (PJNATH_ERRNO_START+93) /* 370093 */
211
/************************************************************
213
***********************************************************/
216
* Invalid or unsupported TURN transport.
218
#define PJNATH_ETURNINTP (PJNATH_ERRNO_START+120) /* 370120 */
226
#endif /* __PJNATH_ERRNO_H__ */