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

Unified Diff: webrtc/p2p/base/stun.h

Issue 1668073002: Add network cost as part of the connection comparison. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« webrtc/p2p/base/port.cc ('K') | « webrtc/p2p/base/port.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stun.h
diff --git a/webrtc/p2p/base/stun.h b/webrtc/p2p/base/stun.h
index 75b89afb8a472b80f7dc6a8d8a2852df8bfb1409..f7225b227d8113858426eac66c5103942a27ce8e 100644
--- a/webrtc/p2p/base/stun.h
+++ b/webrtc/p2p/base/stun.h
@@ -604,6 +604,7 @@ class TurnMessage : public StunMessage {
enum IceAttributeType {
STUN_ATTR_PRIORITY = 0x0024, // UInt32
STUN_ATTR_USE_CANDIDATE = 0x0025, // No content, Length = 0
+ STUN_ATTR_NETWORK_COST = 0x0026, // UInt32
pthatcher1 2016/02/04 23:16:21 According to RFC 5389, section 18.2, we have to ch
STUN_ATTR_ICE_CONTROLLED = 0x8029, // UInt64
STUN_ATTR_ICE_CONTROLLING = 0x802A // UInt64
};
@@ -619,7 +620,9 @@ class IceMessage : public StunMessage {
protected:
virtual StunAttributeValueType GetAttributeValueType(int type) const {
switch (type) {
- case STUN_ATTR_PRIORITY: return STUN_VALUE_UINT32;
+ case STUN_ATTR_PRIORITY:
+ case STUN_ATTR_NETWORK_COST:
pthatcher1 2016/02/04 23:16:21 32-bits is overkill. Let's make it uint8. We'll
juberti2 2016/02/04 23:31:10 attribs are padded to 32 bits, so no point in goin
pthatcher1 2016/02/04 23:51:18 Yes, I forgot about that. It's pretty lame when y
+ return STUN_VALUE_UINT32;
case STUN_ATTR_USE_CANDIDATE: return STUN_VALUE_BYTE_STRING;
case STUN_ATTR_ICE_CONTROLLED: return STUN_VALUE_UINT64;
case STUN_ATTR_ICE_CONTROLLING: return STUN_VALUE_UINT64;
« 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