| // Copyright 2022 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "quiche/common/quiche_ip_address_family.h" |
| #include "quiche/common/platform/api/quiche_bug_tracker.h" |
| #endif // defined(_WIN32) |
| int ToPlatformAddressFamily(IpAddressFamily family) { |
| case IpAddressFamily::IP_V4: |
| case IpAddressFamily::IP_V6: |
| case IpAddressFamily::IP_UNSPEC: |
| QUICHE_BUG(quic_bug_10126_1) |
| << "Invalid IpAddressFamily " << static_cast<int32_t>(family); |
| IpAddressFamily FromPlatformAddressFamily(int family) { |
| return IpAddressFamily::IP_V4; |
| return IpAddressFamily::IP_V6; |
| return IpAddressFamily::IP_UNSPEC; |
| QUICHE_BUG(quic_FromPlatformAddressFamily_unrecognized_family) |
| << "Invalid platform address family int " << family; |
| return IpAddressFamily::IP_UNSPEC; |