OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/quic_utils.h" | 5 #include "net/quic/core/quic_utils.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 const int kSubnetMaskLength = 24; | 201 const int kSubnetMaskLength = 24; |
202 if (old_address.host().InSameSubnet(new_address.host(), kSubnetMaskLength)) { | 202 if (old_address.host().InSameSubnet(new_address.host(), kSubnetMaskLength)) { |
203 // Subnet part does not change (here, we use /24), which is considered to be | 203 // Subnet part does not change (here, we use /24), which is considered to be |
204 // caused by NATs. | 204 // caused by NATs. |
205 return IPV4_SUBNET_CHANGE; | 205 return IPV4_SUBNET_CHANGE; |
206 } | 206 } |
207 | 207 |
208 return IPV4_TO_IPV4_CHANGE; | 208 return IPV4_TO_IPV4_CHANGE; |
209 } | 209 } |
210 | 210 |
| 211 // static |
| 212 bool QuicUtils::IsConnectionIdWireFormatBigEndian(Perspective perspective) { |
| 213 return (perspective == Perspective::IS_CLIENT && |
| 214 FLAGS_quic_restart_flag_quic_big_endian_connection_id_client) || |
| 215 (perspective == Perspective::IS_SERVER && |
| 216 FLAGS_quic_restart_flag_quic_big_endian_connection_id_server); |
| 217 } |
| 218 |
211 } // namespace net | 219 } // namespace net |
OLD | NEW |