Move functions and prototypes from one file to another to avoid having to install...
[sipe-libnice.git] / stun / constants.h
blob13ffa05410fda08c00784b5bd52199733bee5e49
1 /*
2 * This file is part of the Nice GLib ICE library.
4 * (C) 2008 Collabora Ltd.
5 * (C) 2008 Nokia Corporation. All rights reserved.
6 * Contact: Youness Alaoui
8 * The contents of this file are subject to the Mozilla Public License Version
9 * 1.1 (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 * http://www.mozilla.org/MPL/
13 * Software distributed under the License is distributed on an "AS IS" basis,
14 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
15 * for the specific language governing rights and limitations under the
16 * License.
18 * The Original Code is the Nice GLib ICE library.
20 * The Initial Developers of the Original Code are Collabora Ltd and Nokia
21 * Corporation. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of the
25 * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
26 * case the provisions of LGPL are applicable instead of those above. If you
27 * wish to allow use of your version of this file only under the terms of the
28 * LGPL and not to allow others to use your version of this file under the
29 * MPL, indicate your decision by deleting the provisions above and replace
30 * them with the notice and other provisions required by the LGPL. If you do
31 * not delete the provisions above, a recipient may use your version of this
32 * file under either the MPL or the LGPL.
35 #ifndef _STUN_CONSTANTS_H
36 #define _STUN_CONSTANTS_H
39 #define STUN_MESSAGE_TYPE_POS 0
40 #define STUN_MESSAGE_TYPE_LEN 2
41 #define STUN_MESSAGE_LENGTH_POS \
42 (STUN_MESSAGE_TYPE_POS + STUN_MESSAGE_TYPE_LEN)
43 #define STUN_MESSAGE_LENGTH_LEN 2
44 #define STUN_MESSAGE_TRANS_ID_POS \
45 (STUN_MESSAGE_LENGTH_POS + STUN_MESSAGE_LENGTH_LEN)
46 #define STUN_MESSAGE_TRANS_ID_LEN 16
47 #define STUN_MESSAGE_ATTRIBUTES_POS \
48 (STUN_MESSAGE_TRANS_ID_POS + STUN_MESSAGE_TRANS_ID_LEN)
50 #define STUN_MESSAGE_HEADER_LENGTH STUN_MESSAGE_ATTRIBUTES_POS
52 #define STUN_ATTRIBUTE_TYPE_POS 0
53 #define STUN_ATTRIBUTE_TYPE_LEN 2
54 #define STUN_ATTRIBUTE_LENGTH_POS \
55 (STUN_ATTRIBUTE_TYPE_POS + STUN_ATTRIBUTE_TYPE_LEN)
56 #define STUN_ATTRIBUTE_LENGTH_LEN 2
57 #define STUN_ATTRIBUTE_VALUE_POS \
58 (STUN_ATTRIBUTE_LENGTH_POS + STUN_ATTRIBUTE_LENGTH_LEN)
60 #define STUN_ATTRIBUTE_HEADER_LENGTH STUN_ATTRIBUTE_VALUE_POS
63 #define STUN_MAX_MESSAGE_SIZE_IPV4 576
64 #define STUN_MAX_MESSAGE_SIZE_IPV6 1280
65 /* #define STUN_MAX_MESSAGE_SIZE STUN_MAX_MESSAGE_SIZE_IPV4 */
67 #define STUN_ID_LEN 16
69 #define STUN_AGENT_MAX_SAVED_IDS 20
70 #define STUN_AGENT_MAX_UNKNOWN_ATTRIBUTES 256
72 #define STUN_MAGIC_COOKIE 0x2112A442
73 #define TURN_MAGIC_COOKIE 0x72c64bc6
75 #ifndef TRUE
76 #define TRUE (1 == 1)
77 #endif
79 #ifndef FALSE
80 #define FALSE (0 == 1)
81 #endif
83 #endif /* _STUN_CONSTANTS_H */