Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: webrtc/base/ifaddrs_converter.h

Issue 1531763006: Enable IPv6 temporary address filtering on iOS (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/base/ifaddrs_converter.h
diff --git a/webrtc/base/ifaddrs_converter.h b/webrtc/base/ifaddrs_converter.h
new file mode 100644
index 0000000000000000000000000000000000000000..b0e02916dfb4f59542e9ce9dda477a8543f8b230
--- /dev/null
+++ b/webrtc/base/ifaddrs_converter.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_BASE_IFADDRS_CONVERTER_H_
+#define WEBRTC_BASE_IFADDRS_CONVERTER_H_
+
+#if defined(WEBRTC_ANDROID)
+#include "webrtc/base/ifaddrs-android.h"
+#else
+#include <ifaddrs.h>
+#endif // WEBRTC_ANDROID
+
+#include "webrtc/base/ipaddress.h"
+
+namespace rtc {
+
+class IfAddrsConverter {
pthatcher1 2015/12/18 19:51:20 Can you please leave a comment explaining the purp
guoweis_webrtc 2015/12/21 20:26:33 Done.
+ public:
+ IfAddrsConverter();
+ virtual ~IfAddrsConverter();
+ virtual bool Convert(const struct ifaddrs* interface,
+ InterfaceAddress* ipaddress,
+ IPAddress* mask);
pthatcher1 2015/12/18 19:51:20 I like the name pattern ConvertXToY. Can you use
guoweis_webrtc 2015/12/21 20:26:33 Done.
+
+ protected:
+ virtual bool ConvertNativeToIPAttributes(const struct ifaddrs* interface,
+ int* ip_attributes);
+};
+
+IfAddrsConverter* CreateIfAddrsConverter();
+
+} // namespace rtc
+
+#endif // WEBRTC_BASE_IFADDRS_CONVERTER_H_

Powered by Google App Engine
This is Rietveld 408576698