| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/quic/core/crypto/crypto_handshake_message.h" | 5 #include "net/quic/core/crypto/crypto_handshake_message.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "net/quic/core/crypto/crypto_framer.h" | 9 #include "net/quic/core/crypto/crypto_framer.h" |
| 10 #include "net/quic/core/crypto/crypto_protocol.h" | 10 #include "net/quic/core/crypto/crypto_protocol.h" |
| 11 #include "net/quic/core/crypto/crypto_utils.h" | 11 #include "net/quic/core/crypto/crypto_utils.h" |
| 12 #include "net/quic/core/quic_socket_address_coder.h" | 12 #include "net/quic/core/quic_socket_address_coder.h" |
| 13 #include "net/quic/core/quic_utils.h" | 13 #include "net/quic/core/quic_utils.h" |
| 14 #include "net/quic/platform/api/quic_endian.h" |
| 14 #include "net/quic/platform/api/quic_map_util.h" | 15 #include "net/quic/platform/api/quic_map_util.h" |
| 15 #include "net/quic/platform/api/quic_str_cat.h" | 16 #include "net/quic/platform/api/quic_str_cat.h" |
| 16 #include "net/quic/platform/api/quic_text_utils.h" | 17 #include "net/quic/platform/api/quic_text_utils.h" |
| 17 | 18 |
| 18 using std::string; | 19 using std::string; |
| 19 | 20 |
| 20 namespace net { | 21 namespace net { |
| 21 | 22 |
| 22 CryptoHandshakeMessage::CryptoHandshakeMessage() : tag_(0), minimum_size_(0) {} | 23 CryptoHandshakeMessage::CryptoHandshakeMessage() : tag_(0), minimum_size_(0) {} |
| 23 | 24 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 memcpy(&value, it->second.data(), sizeof(value)); | 240 memcpy(&value, it->second.data(), sizeof(value)); |
| 240 ret += QuicTextUtils::Uint64ToString(value); | 241 ret += QuicTextUtils::Uint64ToString(value); |
| 241 done = true; | 242 done = true; |
| 242 } | 243 } |
| 243 break; | 244 break; |
| 244 case kRCID: | 245 case kRCID: |
| 245 // uint64_t value | 246 // uint64_t value |
| 246 if (it->second.size() == 8) { | 247 if (it->second.size() == 8) { |
| 247 uint64_t value; | 248 uint64_t value; |
| 248 memcpy(&value, it->second.data(), sizeof(value)); | 249 memcpy(&value, it->second.data(), sizeof(value)); |
| 250 if (QuicUtils::IsConnectionIdWireFormatBigEndian(perspective)) { |
| 251 value = QuicEndian::NetToHost64(value); |
| 252 } |
| 249 ret += QuicTextUtils::Uint64ToString(value); | 253 ret += QuicTextUtils::Uint64ToString(value); |
| 250 done = true; | 254 done = true; |
| 251 } | 255 } |
| 252 break; | 256 break; |
| 253 case kTBKP: | 257 case kTBKP: |
| 254 case kKEXS: | 258 case kKEXS: |
| 255 case kAEAD: | 259 case kAEAD: |
| 256 case kCOPT: | 260 case kCOPT: |
| 257 case kPDMD: | 261 case kPDMD: |
| 258 case kVER: | 262 case kVER: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 ret += "0x" + QuicTextUtils::HexEncode(it->second); | 329 ret += "0x" + QuicTextUtils::HexEncode(it->second); |
| 326 } | 330 } |
| 327 ret += "\n"; | 331 ret += "\n"; |
| 328 } | 332 } |
| 329 --indent; | 333 --indent; |
| 330 ret += string(2 * indent, ' ') + ">"; | 334 ret += string(2 * indent, ' ') + ">"; |
| 331 return ret; | 335 return ret; |
| 332 } | 336 } |
| 333 | 337 |
| 334 } // namespace net | 338 } // namespace net |
| OLD | NEW |