| 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 #ifndef NET_BASE_NET_UTIL_H_ | 5 #ifndef NET_BASE_NET_UTIL_H_ |
| 6 #define NET_BASE_NET_UTIL_H_ | 6 #define NET_BASE_NET_UTIL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 // Currently only available on OS_WIN. | 554 // Currently only available on OS_WIN. |
| 555 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol(); | 555 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol(); |
| 556 | 556 |
| 557 // Returns number of matching initial bits between the addresses |a1| and |a2|. | 557 // Returns number of matching initial bits between the addresses |a1| and |a2|. |
| 558 unsigned CommonPrefixLength(const IPAddressNumber& a1, | 558 unsigned CommonPrefixLength(const IPAddressNumber& a1, |
| 559 const IPAddressNumber& a2); | 559 const IPAddressNumber& a2); |
| 560 | 560 |
| 561 // Computes the number of leading 1-bits in |mask|. | 561 // Computes the number of leading 1-bits in |mask|. |
| 562 unsigned MaskPrefixLength(const IPAddressNumber& mask); | 562 unsigned MaskPrefixLength(const IPAddressNumber& mask); |
| 563 | 563 |
| 564 // Differentiated Services Code Point. |
| 565 // See http://tools.ietf.org/html/rfc2474 for details. |
| 566 enum DiffServCodePoint { |
| 567 DSCP_NO_CHANGE = -1, |
| 568 DSCP_DEFAULT = 0, // Same as DSCP_CS0 |
| 569 DSCP_CS0 = 0, // The default |
| 570 DSCP_CS1 = 8, // Bulk/background traffic |
| 571 DSCP_AF11 = 10, |
| 572 DSCP_AF12 = 12, |
| 573 DSCP_AF13 = 14, |
| 574 DSCP_CS2 = 16, |
| 575 DSCP_AF21 = 18, |
| 576 DSCP_AF22 = 20, |
| 577 DSCP_AF23 = 22, |
| 578 DSCP_CS3 = 24, |
| 579 DSCP_AF31 = 26, |
| 580 DSCP_AF32 = 28, |
| 581 DSCP_AF33 = 30, |
| 582 DSCP_CS4 = 32, |
| 583 DSCP_AF41 = 34, // Video |
| 584 DSCP_AF42 = 36, // Video |
| 585 DSCP_AF43 = 38, // Video |
| 586 DSCP_CS5 = 40, // Video |
| 587 DSCP_EF = 46, // Voice |
| 588 DSCP_CS6 = 48, // Voice |
| 589 DSCP_CS7 = 56, // Control messages |
| 590 }; |
| 591 |
| 564 } // namespace net | 592 } // namespace net |
| 565 | 593 |
| 566 #endif // NET_BASE_NET_UTIL_H_ | 594 #endif // NET_BASE_NET_UTIL_H_ |
| OLD | NEW |