OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_P2P_BASE_STUN_H_ | 11 #ifndef WEBRTC_P2P_BASE_STUN_H_ |
12 #define WEBRTC_P2P_BASE_STUN_H_ | 12 #define WEBRTC_P2P_BASE_STUN_H_ |
13 | 13 |
14 // This file contains classes for dealing with the STUN protocol, as specified | 14 // This file contains classes for dealing with the STUN protocol, as specified |
15 // in RFC 5389, and its descendants. | 15 // in RFC 5389, and its descendants. |
16 | 16 |
17 #include <string> | 17 #include <string> |
18 #include <vector> | 18 #include <vector> |
19 | 19 |
20 #include "webrtc/rtc_base/basictypes.h" | 20 #include "webrtc/base/basictypes.h" |
21 #include "webrtc/rtc_base/bytebuffer.h" | 21 #include "webrtc/base/bytebuffer.h" |
22 #include "webrtc/rtc_base/socketaddress.h" | 22 #include "webrtc/base/socketaddress.h" |
23 | 23 |
24 namespace cricket { | 24 namespace cricket { |
25 | 25 |
26 // These are the types of STUN messages defined in RFC 5389. | 26 // These are the types of STUN messages defined in RFC 5389. |
27 enum StunMessageType { | 27 enum StunMessageType { |
28 STUN_BINDING_REQUEST = 0x0001, | 28 STUN_BINDING_REQUEST = 0x0001, |
29 STUN_BINDING_INDICATION = 0x0011, | 29 STUN_BINDING_INDICATION = 0x0011, |
30 STUN_BINDING_RESPONSE = 0x0101, | 30 STUN_BINDING_RESPONSE = 0x0101, |
31 STUN_BINDING_ERROR_RESPONSE = 0x0111, | 31 STUN_BINDING_ERROR_RESPONSE = 0x0111, |
32 }; | 32 }; |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 case STUN_ATTR_ICE_CONTROLLING: return STUN_VALUE_UINT64; | 635 case STUN_ATTR_ICE_CONTROLLING: return STUN_VALUE_UINT64; |
636 default: return StunMessage::GetAttributeValueType(type); | 636 default: return StunMessage::GetAttributeValueType(type); |
637 } | 637 } |
638 } | 638 } |
639 virtual StunMessage* CreateNew() const { return new IceMessage(); } | 639 virtual StunMessage* CreateNew() const { return new IceMessage(); } |
640 }; | 640 }; |
641 | 641 |
642 } // namespace cricket | 642 } // namespace cricket |
643 | 643 |
644 #endif // WEBRTC_P2P_BASE_STUN_H_ | 644 #endif // WEBRTC_P2P_BASE_STUN_H_ |
OLD | NEW |