blob: 2cb5233ad66151a8244df6be4ad9d289cd5ff081 [file] [log] [blame]
Jonas Oreland71fda362020-03-20 16:11:56 +01001/*
2 * Copyright 2020 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "rtc_base/network_constants.h"
12
13#include "rtc_base/checks.h"
14
15namespace rtc {
16
17std::string AdapterTypeToString(AdapterType type) {
18 switch (type) {
19 case ADAPTER_TYPE_ANY:
20 return "Wildcard";
21 case ADAPTER_TYPE_UNKNOWN:
22 return "Unknown";
23 case ADAPTER_TYPE_ETHERNET:
24 return "Ethernet";
25 case ADAPTER_TYPE_WIFI:
26 return "Wifi";
27 case ADAPTER_TYPE_CELLULAR:
28 return "Cellular";
29 case ADAPTER_TYPE_VPN:
30 return "VPN";
31 case ADAPTER_TYPE_LOOPBACK:
32 return "Loopback";
33 default:
34 RTC_NOTREACHED() << "Invalid type " << type;
35 return std::string();
36 }
37}
38
39} // namespace rtc