Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: webrtc/p2p/base/stun.h

Issue 2163403002: Prepare for ICE-renomination (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« webrtc/p2p/base/port.cc ('K') | « webrtc/p2p/base/port.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 }; 601 };
602 602
603 // RFC 5245 ICE STUN attributes. 603 // RFC 5245 ICE STUN attributes.
604 enum IceAttributeType { 604 enum IceAttributeType {
605 STUN_ATTR_PRIORITY = 0x0024, // UInt32 605 STUN_ATTR_PRIORITY = 0x0024, // UInt32
606 STUN_ATTR_USE_CANDIDATE = 0x0025, // No content, Length = 0 606 STUN_ATTR_USE_CANDIDATE = 0x0025, // No content, Length = 0
607 STUN_ATTR_ICE_CONTROLLED = 0x8029, // UInt64 607 STUN_ATTR_ICE_CONTROLLED = 0x8029, // UInt64
608 STUN_ATTR_ICE_CONTROLLING = 0x802A, // UInt64 608 STUN_ATTR_ICE_CONTROLLING = 0x802A, // UInt64
609 // UInt32. The higher 16 bits are the network ID. The lower 16 bits are the 609 // UInt32. The higher 16 bits are the network ID. The lower 16 bits are the
610 // network cost. 610 // network cost.
611 STUN_ATTR_NETWORK_INFO = 0xC057 611 STUN_ATTR_NETWORK_INFO = 0xC057,
612 STUN_ATTR_NOMINATION_VALUE = 0xC058
612 }; 613 };
613 614
614 // RFC 5245-defined errors. 615 // RFC 5245-defined errors.
615 enum IceErrorCode { 616 enum IceErrorCode {
616 STUN_ERROR_ROLE_CONFLICT = 487, 617 STUN_ERROR_ROLE_CONFLICT = 487,
617 }; 618 };
618 extern const char STUN_ERROR_REASON_ROLE_CONFLICT[]; 619 extern const char STUN_ERROR_REASON_ROLE_CONFLICT[];
619 620
620 // A RFC 5245 ICE STUN message. 621 // A RFC 5245 ICE STUN message.
621 class IceMessage : public StunMessage { 622 class IceMessage : public StunMessage {
622 protected: 623 protected:
623 virtual StunAttributeValueType GetAttributeValueType(int type) const { 624 virtual StunAttributeValueType GetAttributeValueType(int type) const {
624 switch (type) { 625 switch (type) {
625 case STUN_ATTR_PRIORITY: 626 case STUN_ATTR_PRIORITY:
626 case STUN_ATTR_NETWORK_INFO: 627 case STUN_ATTR_NETWORK_INFO:
628 case STUN_ATTR_NOMINATION_VALUE:
627 return STUN_VALUE_UINT32; 629 return STUN_VALUE_UINT32;
628 case STUN_ATTR_USE_CANDIDATE: return STUN_VALUE_BYTE_STRING; 630 case STUN_ATTR_USE_CANDIDATE: return STUN_VALUE_BYTE_STRING;
629 case STUN_ATTR_ICE_CONTROLLED: return STUN_VALUE_UINT64; 631 case STUN_ATTR_ICE_CONTROLLED: return STUN_VALUE_UINT64;
630 case STUN_ATTR_ICE_CONTROLLING: return STUN_VALUE_UINT64; 632 case STUN_ATTR_ICE_CONTROLLING: return STUN_VALUE_UINT64;
631 default: return StunMessage::GetAttributeValueType(type); 633 default: return StunMessage::GetAttributeValueType(type);
632 } 634 }
633 } 635 }
634 virtual StunMessage* CreateNew() const { return new IceMessage(); } 636 virtual StunMessage* CreateNew() const { return new IceMessage(); }
635 }; 637 };
636 638
637 } // namespace cricket 639 } // namespace cricket
638 640
639 #endif // WEBRTC_P2P_BASE_STUN_H_ 641 #endif // WEBRTC_P2P_BASE_STUN_H_
OLDNEW
« webrtc/p2p/base/port.cc ('K') | « webrtc/p2p/base/port.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698