summaryrefslogtreecommitdiff
path: root/pjnath/include/pjnath/errno.h
blob: 9f45bc86c57028e6af9228c2479ef465b660e75f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/* $Id$ */
/* 
 * Copyright (C)2003-2007 Benny Prijono <benny@prijono.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */
#ifndef __PJNATH_ERRNO_H__
#define __PJNATH_ERRNO_H__


#include <pj/errno.h>

/**
 * @defgroup PJNATH_ERROR NAT Helper Error Codes
 * @ingroup PJNATH
 * @{
 */

/**
 * Start of error code relative to PJ_ERRNO_START_USER.
 * This value is 370000.
 */
#define PJNATH_ERRNO_START    (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*4)



/************************************************************
 * NEW STUN ERROR
 ***********************************************************/
/* Messaging errors */
#define PJNATH_ESTUNINATTRLEN	    -1
#define PJNATH_ESTUNINMSGLEN	    -1
#define	PJNATH_ESTUNINMSGTYPE	    -1
#define PJNATH_ESTUNFINGERPRINT	    -1
#define PJNATH_ESTUNNOTRESPOND	    -1
#define PJNATH_ESTUNNOXORMAP	    -1

/**
 * @hideinitializer
 * Too many STUN attributes.
 */
#define PJNATH_ESTUNTOOMANYATTR	    (PJNATH_ERRNO_START+110)/* 370110 */
/**
 * @hideinitializer
 * Unknown STUN attribute. This error happens when the decoder encounters
 * mandatory attribute type which it doesn't understand.
 */
#define PJNATH_ESTUNUNKNOWNATTR	    (PJNATH_ERRNO_START+111)/* 370111 */
/**
 * @hideinitializer
 * Invalid STUN socket address length.
 */
#define PJNATH_ESTUNINADDRLEN	    (PJNATH_ERRNO_START+112)/* 370112 */
/**
 * @hideinitializer
 * STUN IPv6 attribute not supported
 */
#define PJNATH_ESTUNIPV6NOTSUPP	    (PJNATH_ERRNO_START+113)/* 370113 */
/**
 * @hideinitializer
 * Expecting STUN response message.
 */
#define PJNATH_ESTUNNOTRESPONSE	    (PJNATH_ERRNO_START+114)/* 370114 */
/**
 * @hideinitializer
 * STUN transaction ID mismatch.
 */
#define PJNATH_ESTUNINVALIDID	    (PJNATH_ERRNO_START+115)/* 370115 */
/**
 * @hideinitializer
 * Unable to find handler for the request.
 */
#define PJNATH_ESTUNNOHANDLER	    (PJNATH_ERRNO_START+116)/* 370116 */
/**
 * @hideinitializer
 * Found non-FINGERPRINT attribute after MESSAGE-INTEGRITY. This is not
 * valid since MESSAGE-INTEGRITY MUST be the last attribute or the
 * attribute right before FINGERPRINT before the message.
 */
#define PJNATH_ESTUNMSGINTPOS	    (PJNATH_ERRNO_START+118)/* 370118 */
/**
 * @hideinitializer
 * Found attribute after FINGERPRINT. This is not valid since FINGERPRINT
 * MUST be the last attribute in the message.
 */
#define PJNATH_ESTUNFINGERPOS	    (PJNATH_ERRNO_START+119)/* 370119 */
/**
 * @hideinitializer
 * Missing STUN USERNAME attribute.
 * When credential is included in the STUN message (MESSAGE-INTEGRITY is
 * present), the USERNAME attribute must be present in the message.
 */
#define PJNATH_ESTUNNOUSERNAME	    (PJNATH_ERRNO_START+120)/* 370120 */
/**
 * @hideinitializer
 * Unknown STUN username/credential.
 */
#define PJNATH_ESTUNUSERNAME	    (PJNATH_ERRNO_START+121)/* 370121 */
/**
 * @hideinitializer
 * Missing/invalidSTUN MESSAGE-INTEGRITY attribute.
 */
#define PJNATH_ESTUNMSGINT	    (PJNATH_ERRNO_START+122)/* 370122 */
/**
 * @hideinitializer
 * Found duplicate STUN attribute.
 */
#define PJNATH_ESTUNDUPATTR	    (PJNATH_ERRNO_START+123)/* 370123 */
/**
 * @hideinitializer
 * Missing STUN REALM attribute.
 */
#define PJNATH_ESTUNNOREALM	    (PJNATH_ERRNO_START+124)/* 370124 */
/**
 * @hideinitializer
 * Missing/stale STUN NONCE attribute value.
 */
#define PJNATH_ESTUNNONCE	    (PJNATH_ERRNO_START+125)/* 370125 */
/**
 * @hideinitializer
 * STUN transaction terminates with failure.
 */
#define PJNATH_ESTUNTSXFAILED	    (PJNATH_ERRNO_START+126)/* 370126 */


//#define PJ_STATUS_FROM_STUN_CODE(code)	(PJNATH_ERRNO_START+code)


/**
 * @hideinitializer
 * No ICE checklist is formed.
 */
#define PJ_EICENOCHECKLIST	    -1
/**
 * @hideinitializer
 * No suitable default ICE candidate for the component.
 */
#define PJ_EICENOCAND		    -1
/**
 * @hideinitializer
 * Invalid ICE component ID
 */
#define PJ_EICEINCOMPID		    -1
/**
 * @hideinitializer
 * Invalid ICE candidate ID
 */
#define PJ_EICEINCANDID		    -1
/**
 * @hideinitializer
 * ICE session not available
 */
#define PJ_ENOICE		    -1
/**
 * @hideinitializer
 * ICE check is in progress
 */
#define PJ_EICEINPROGRESS	    -1
/**
 * @hideinitializer
 * Missing ICE SDP attribute
 */
#define PJ_EICEMISSINGSDP	    -1
/**
 * @hideinitializer
 * Invalid SDP "candidate" attribute
 */
#define PJ_EICEINCANDSDP	    -1



/**
 * @}
 */

#endif	/* __PJNATH_ERRNO_H__ */