@dittolive/ditto 4.5.0 → 4.5.1-experimental.aarch64-linux.1.aarch64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/README.md +2 -2
  2. package/node/ditto.cjs.js +2 -9620
  3. package/node/{ditto.linux-x64.node → ditto.linux-arm64.node} +0 -0
  4. package/package.json +38 -34
  5. package/types/ditto.d.ts +0 -2
  6. package/web/ditto.es6.js +1 -1
  7. package/web/ditto.umd.js +1 -1
  8. package/web/ditto.wasm +0 -0
  9. package/DittoReactNative.podspec +0 -27
  10. package/node/ditto.darwin-arm64.node +0 -0
  11. package/node/ditto.darwin-x64.node +0 -0
  12. package/node/ditto.linux-arm.node +0 -0
  13. package/node/ditto.win32-x64.node +0 -0
  14. package/node/transports.darwin-arm64.node +0 -0
  15. package/node/transports.darwin-x64.node +0 -0
  16. package/react-native/android/CMakeLists.txt +0 -37
  17. package/react-native/android/build.gradle +0 -203
  18. package/react-native/android/cpp-adapter.cpp +0 -254
  19. package/react-native/android/gradle.properties +0 -5
  20. package/react-native/android/src/main/AndroidManifest.xml +0 -4
  21. package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKModule.java +0 -85
  22. package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKPackage.java +0 -28
  23. package/react-native/boost/boost/assert.hpp +0 -85
  24. package/react-native/boost/boost/config/abi/borland_prefix.hpp +0 -27
  25. package/react-native/boost/boost/config/abi/borland_suffix.hpp +0 -12
  26. package/react-native/boost/boost/config/abi/msvc_prefix.hpp +0 -22
  27. package/react-native/boost/boost/config/abi/msvc_suffix.hpp +0 -8
  28. package/react-native/boost/boost/config/abi_prefix.hpp +0 -25
  29. package/react-native/boost/boost/config/abi_suffix.hpp +0 -25
  30. package/react-native/boost/boost/config/assert_cxx03.hpp +0 -211
  31. package/react-native/boost/boost/config/assert_cxx11.hpp +0 -209
  32. package/react-native/boost/boost/config/assert_cxx14.hpp +0 -47
  33. package/react-native/boost/boost/config/assert_cxx17.hpp +0 -62
  34. package/react-native/boost/boost/config/assert_cxx20.hpp +0 -59
  35. package/react-native/boost/boost/config/assert_cxx98.hpp +0 -23
  36. package/react-native/boost/boost/config/auto_link.hpp +0 -525
  37. package/react-native/boost/boost/config/compiler/borland.hpp +0 -339
  38. package/react-native/boost/boost/config/compiler/clang.hpp +0 -366
  39. package/react-native/boost/boost/config/compiler/clang_version.hpp +0 -83
  40. package/react-native/boost/boost/config/compiler/codegear.hpp +0 -385
  41. package/react-native/boost/boost/config/compiler/comeau.hpp +0 -59
  42. package/react-native/boost/boost/config/compiler/common_edg.hpp +0 -183
  43. package/react-native/boost/boost/config/compiler/compaq_cxx.hpp +0 -19
  44. package/react-native/boost/boost/config/compiler/cray.hpp +0 -446
  45. package/react-native/boost/boost/config/compiler/diab.hpp +0 -26
  46. package/react-native/boost/boost/config/compiler/digitalmars.hpp +0 -143
  47. package/react-native/boost/boost/config/compiler/gcc.hpp +0 -383
  48. package/react-native/boost/boost/config/compiler/gcc_xml.hpp +0 -114
  49. package/react-native/boost/boost/config/compiler/greenhills.hpp +0 -28
  50. package/react-native/boost/boost/config/compiler/hp_acc.hpp +0 -149
  51. package/react-native/boost/boost/config/compiler/intel.hpp +0 -577
  52. package/react-native/boost/boost/config/compiler/kai.hpp +0 -33
  53. package/react-native/boost/boost/config/compiler/metrowerks.hpp +0 -198
  54. package/react-native/boost/boost/config/compiler/mpw.hpp +0 -140
  55. package/react-native/boost/boost/config/compiler/nvcc.hpp +0 -61
  56. package/react-native/boost/boost/config/compiler/pathscale.hpp +0 -138
  57. package/react-native/boost/boost/config/compiler/pgi.hpp +0 -23
  58. package/react-native/boost/boost/config/compiler/sgi_mipspro.hpp +0 -29
  59. package/react-native/boost/boost/config/compiler/sunpro_cc.hpp +0 -222
  60. package/react-native/boost/boost/config/compiler/vacpp.hpp +0 -186
  61. package/react-native/boost/boost/config/compiler/visualc.hpp +0 -391
  62. package/react-native/boost/boost/config/compiler/xlcpp.hpp +0 -299
  63. package/react-native/boost/boost/config/compiler/xlcpp_zos.hpp +0 -173
  64. package/react-native/boost/boost/config/detail/cxx_composite.hpp +0 -203
  65. package/react-native/boost/boost/config/detail/posix_features.hpp +0 -95
  66. package/react-native/boost/boost/config/detail/select_compiler_config.hpp +0 -157
  67. package/react-native/boost/boost/config/detail/select_platform_config.hpp +0 -147
  68. package/react-native/boost/boost/config/detail/select_stdlib_config.hpp +0 -121
  69. package/react-native/boost/boost/config/detail/suffix.hpp +0 -1294
  70. package/react-native/boost/boost/config/header_deprecated.hpp +0 -26
  71. package/react-native/boost/boost/config/helper_macros.hpp +0 -37
  72. package/react-native/boost/boost/config/no_tr1/cmath.hpp +0 -28
  73. package/react-native/boost/boost/config/no_tr1/complex.hpp +0 -28
  74. package/react-native/boost/boost/config/no_tr1/functional.hpp +0 -28
  75. package/react-native/boost/boost/config/no_tr1/memory.hpp +0 -28
  76. package/react-native/boost/boost/config/no_tr1/utility.hpp +0 -28
  77. package/react-native/boost/boost/config/platform/aix.hpp +0 -33
  78. package/react-native/boost/boost/config/platform/amigaos.hpp +0 -15
  79. package/react-native/boost/boost/config/platform/beos.hpp +0 -26
  80. package/react-native/boost/boost/config/platform/bsd.hpp +0 -83
  81. package/react-native/boost/boost/config/platform/cloudabi.hpp +0 -18
  82. package/react-native/boost/boost/config/platform/cray.hpp +0 -18
  83. package/react-native/boost/boost/config/platform/cygwin.hpp +0 -71
  84. package/react-native/boost/boost/config/platform/haiku.hpp +0 -31
  85. package/react-native/boost/boost/config/platform/hpux.hpp +0 -87
  86. package/react-native/boost/boost/config/platform/irix.hpp +0 -31
  87. package/react-native/boost/boost/config/platform/linux.hpp +0 -106
  88. package/react-native/boost/boost/config/platform/macos.hpp +0 -87
  89. package/react-native/boost/boost/config/platform/qnxnto.hpp +0 -31
  90. package/react-native/boost/boost/config/platform/solaris.hpp +0 -31
  91. package/react-native/boost/boost/config/platform/symbian.hpp +0 -97
  92. package/react-native/boost/boost/config/platform/vms.hpp +0 -25
  93. package/react-native/boost/boost/config/platform/vxworks.hpp +0 -422
  94. package/react-native/boost/boost/config/platform/wasm.hpp +0 -23
  95. package/react-native/boost/boost/config/platform/win32.hpp +0 -90
  96. package/react-native/boost/boost/config/platform/zos.hpp +0 -32
  97. package/react-native/boost/boost/config/pragma_message.hpp +0 -31
  98. package/react-native/boost/boost/config/requires_threads.hpp +0 -92
  99. package/react-native/boost/boost/config/stdlib/dinkumware.hpp +0 -324
  100. package/react-native/boost/boost/config/stdlib/libcomo.hpp +0 -93
  101. package/react-native/boost/boost/config/stdlib/libcpp.hpp +0 -180
  102. package/react-native/boost/boost/config/stdlib/libstdcpp3.hpp +0 -482
  103. package/react-native/boost/boost/config/stdlib/modena.hpp +0 -79
  104. package/react-native/boost/boost/config/stdlib/msl.hpp +0 -98
  105. package/react-native/boost/boost/config/stdlib/roguewave.hpp +0 -208
  106. package/react-native/boost/boost/config/stdlib/sgi.hpp +0 -168
  107. package/react-native/boost/boost/config/stdlib/stlport.hpp +0 -258
  108. package/react-native/boost/boost/config/stdlib/vacpp.hpp +0 -74
  109. package/react-native/boost/boost/config/stdlib/xlcpp_zos.hpp +0 -61
  110. package/react-native/boost/boost/config/user.hpp +0 -133
  111. package/react-native/boost/boost/config/warning_disable.hpp +0 -47
  112. package/react-native/boost/boost/config/workaround.hpp +0 -305
  113. package/react-native/boost/boost/config.hpp +0 -67
  114. package/react-native/boost/boost/cstdint.hpp +0 -556
  115. package/react-native/boost/boost/intrusive_ptr.hpp +0 -18
  116. package/react-native/boost/boost/smart_ptr/detail/atomic_count.hpp +0 -103
  117. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp +0 -79
  118. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +0 -63
  119. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +0 -88
  120. package/react-native/boost/boost/smart_ptr/detail/atomic_count_nt.hpp +0 -66
  121. package/react-native/boost/boost/smart_ptr/detail/atomic_count_pt.hpp +0 -104
  122. package/react-native/boost/boost/smart_ptr/detail/atomic_count_spin.hpp +0 -69
  123. package/react-native/boost/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +0 -67
  124. package/react-native/boost/boost/smart_ptr/detail/atomic_count_sync.hpp +0 -72
  125. package/react-native/boost/boost/smart_ptr/detail/atomic_count_win32.hpp +0 -70
  126. package/react-native/boost/boost/smart_ptr/detail/local_counted_base.hpp +0 -148
  127. package/react-native/boost/boost/smart_ptr/detail/local_sp_deleter.hpp +0 -91
  128. package/react-native/boost/boost/smart_ptr/detail/operator_bool.hpp +0 -64
  129. package/react-native/boost/boost/smart_ptr/detail/requires_cxx11.hpp +0 -23
  130. package/react-native/boost/boost/smart_ptr/detail/shared_count.hpp +0 -707
  131. package/react-native/boost/boost/smart_ptr/detail/sp_convertible.hpp +0 -92
  132. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base.hpp +0 -92
  133. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +0 -163
  134. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_aix.hpp +0 -152
  135. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +0 -185
  136. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +0 -148
  137. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +0 -170
  138. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +0 -200
  139. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +0 -194
  140. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +0 -179
  141. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +0 -186
  142. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_nt.hpp +0 -119
  143. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp +0 -147
  144. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +0 -174
  145. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_spin.hpp +0 -141
  146. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +0 -147
  147. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_sync.hpp +0 -165
  148. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +0 -163
  149. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp +0 -140
  150. package/react-native/boost/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -309
  151. package/react-native/boost/boost/smart_ptr/detail/sp_disable_deprecated.hpp +0 -40
  152. package/react-native/boost/boost/smart_ptr/detail/sp_forward.hpp +0 -52
  153. package/react-native/boost/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +0 -27
  154. package/react-native/boost/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +0 -69
  155. package/react-native/boost/boost/smart_ptr/detail/sp_interlocked.hpp +0 -173
  156. package/react-native/boost/boost/smart_ptr/detail/sp_noexcept.hpp +0 -48
  157. package/react-native/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp +0 -45
  158. package/react-native/boost/boost/smart_ptr/detail/sp_obsolete.hpp +0 -32
  159. package/react-native/boost/boost/smart_ptr/detail/sp_thread_pause.hpp +0 -51
  160. package/react-native/boost/boost/smart_ptr/detail/sp_thread_sleep.hpp +0 -104
  161. package/react-native/boost/boost/smart_ptr/detail/sp_thread_yield.hpp +0 -100
  162. package/react-native/boost/boost/smart_ptr/detail/sp_typeinfo_.hpp +0 -58
  163. package/react-native/boost/boost/smart_ptr/detail/sp_win32_sleep.hpp +0 -49
  164. package/react-native/boost/boost/smart_ptr/intrusive_ptr.hpp +0 -409
  165. package/react-native/boost/boost/smart_ptr/intrusive_ref_counter.hpp +0 -188
  166. package/react-native/cpp/include/Attachment.h +0 -16
  167. package/react-native/cpp/include/Authentication.h +0 -23
  168. package/react-native/cpp/include/Collection.h +0 -13
  169. package/react-native/cpp/include/DQL.h +0 -21
  170. package/react-native/cpp/include/Document.h +0 -17
  171. package/react-native/cpp/include/Identity.h +0 -17
  172. package/react-native/cpp/include/Lifecycle.h +0 -16
  173. package/react-native/cpp/include/LiveQuery.h +0 -17
  174. package/react-native/cpp/include/Logger.h +0 -22
  175. package/react-native/cpp/include/Misc.h +0 -26
  176. package/react-native/cpp/include/Presence.h +0 -14
  177. package/react-native/cpp/include/RetainableState.h +0 -24
  178. package/react-native/cpp/include/SmallPeerInfo.h +0 -17
  179. package/react-native/cpp/include/Transports.h +0 -25
  180. package/react-native/cpp/include/TypedArray.hpp +0 -167
  181. package/react-native/cpp/include/Utils.h +0 -61
  182. package/react-native/cpp/include/main.h +0 -10
  183. package/react-native/cpp/src/Attachment.cpp +0 -86
  184. package/react-native/cpp/src/Authentication.cpp +0 -224
  185. package/react-native/cpp/src/Collection.cpp +0 -54
  186. package/react-native/cpp/src/DQL.cpp +0 -254
  187. package/react-native/cpp/src/Document.cpp +0 -146
  188. package/react-native/cpp/src/Identity.cpp +0 -123
  189. package/react-native/cpp/src/Lifecycle.cpp +0 -75
  190. package/react-native/cpp/src/LiveQuery.cpp +0 -64
  191. package/react-native/cpp/src/Logger.cpp +0 -200
  192. package/react-native/cpp/src/Misc.cpp +0 -271
  193. package/react-native/cpp/src/Presence.cpp +0 -77
  194. package/react-native/cpp/src/RetainableState.cpp +0 -15
  195. package/react-native/cpp/src/SmallPeerInfo.cpp +0 -108
  196. package/react-native/cpp/src/Transports.cpp +0 -270
  197. package/react-native/cpp/src/TypedArray.cpp +0 -303
  198. package/react-native/cpp/src/Utils.cpp +0 -138
  199. package/react-native/cpp/src/main.cpp +0 -149
  200. package/react-native/dittoffi/dittoffi.h +0 -4698
  201. package/react-native/dittoffi/ifaddrs.cpp +0 -385
  202. package/react-native/dittoffi/ifaddrs.h +0 -206
  203. package/react-native/ios/DittoRNSDK.h +0 -7
  204. package/react-native/ios/DittoRNSDK.mm +0 -107
  205. package/react-native/ios/YeetJSIUtils.h +0 -60
  206. package/react-native/ios/YeetJSIUtils.mm +0 -196
  207. package/react-native/lib/commonjs/ditto.rn.js +0 -93
  208. package/react-native/lib/commonjs/ditto.rn.js.map +0 -1
  209. package/react-native/lib/commonjs/index.js +0 -14
  210. package/react-native/lib/commonjs/index.js.map +0 -1
  211. package/react-native/lib/module/ditto.rn.js +0 -83
  212. package/react-native/lib/module/ditto.rn.js.map +0 -1
  213. package/react-native/lib/module/index.js +0 -13
  214. package/react-native/lib/module/index.js.map +0 -1
  215. package/react-native/lib/typescript/ditto.rn.d.ts +0 -15
  216. package/react-native/lib/typescript/ditto.rn.d.ts.map +0 -1
  217. package/react-native/lib/typescript/index.d.ts +0 -1
  218. package/react-native/lib/typescript/index.d.ts.map +0 -1
  219. package/react-native/scripts/ruby/include_local_boost.rb +0 -78
  220. package/react-native/src/ditto.rn.ts +0 -91
  221. package/react-native/src/environment/environment.fallback.ts +0 -4
  222. package/react-native/src/index.ts +0 -26
  223. package/react-native/src/sources/@cbor-redux.ts +0 -2
  224. package/react-native/src/sources/@ditto.core.ts +0 -1
  225. package/react-native/src/sources/@environment.ts +0 -2
  226. package/react-native/src/sources/attachment-fetch-event.ts +0 -54
  227. package/react-native/src/sources/attachment-fetcher-manager.ts +0 -129
  228. package/react-native/src/sources/attachment-fetcher.ts +0 -124
  229. package/react-native/src/sources/attachment-token.ts +0 -48
  230. package/react-native/src/sources/attachment.ts +0 -59
  231. package/react-native/src/sources/augment.ts +0 -89
  232. package/react-native/src/sources/authenticator.ts +0 -314
  233. package/react-native/src/sources/base-pending-cursor-operation.ts +0 -237
  234. package/react-native/src/sources/base-pending-id-specific-operation.ts +0 -109
  235. package/react-native/src/sources/bridge.ts +0 -549
  236. package/react-native/src/sources/build-time-constants.ts +0 -4
  237. package/react-native/src/sources/cbor.ts +0 -35
  238. package/react-native/src/sources/collection-interface.ts +0 -67
  239. package/react-native/src/sources/collection.ts +0 -212
  240. package/react-native/src/sources/collections-event.ts +0 -99
  241. package/react-native/src/sources/counter.ts +0 -77
  242. package/react-native/src/sources/ditto.ts +0 -945
  243. package/react-native/src/sources/document-id.ts +0 -159
  244. package/react-native/src/sources/document-path.ts +0 -303
  245. package/react-native/src/sources/document.ts +0 -192
  246. package/react-native/src/sources/epilogue.ts +0 -24
  247. package/react-native/src/sources/error-codes.ts +0 -52
  248. package/react-native/src/sources/error.ts +0 -203
  249. package/react-native/src/sources/essentials.ts +0 -53
  250. package/react-native/src/sources/ffi-error.ts +0 -117
  251. package/react-native/src/sources/ffi.ts +0 -1972
  252. package/react-native/src/sources/identity.ts +0 -163
  253. package/react-native/src/sources/init.ts +0 -70
  254. package/react-native/src/sources/internal.ts +0 -113
  255. package/react-native/src/sources/keep-alive.ts +0 -69
  256. package/react-native/src/sources/key-path.ts +0 -195
  257. package/react-native/src/sources/live-query-event.ts +0 -208
  258. package/react-native/src/sources/live-query-manager.ts +0 -101
  259. package/react-native/src/sources/live-query.ts +0 -164
  260. package/react-native/src/sources/logger.ts +0 -196
  261. package/react-native/src/sources/observer-manager.ts +0 -175
  262. package/react-native/src/sources/observer.ts +0 -77
  263. package/react-native/src/sources/pending-collections-operation.ts +0 -232
  264. package/react-native/src/sources/pending-cursor-operation.ts +0 -218
  265. package/react-native/src/sources/pending-id-specific-operation.ts +0 -216
  266. package/react-native/src/sources/presence-manager.ts +0 -160
  267. package/react-native/src/sources/presence.ts +0 -238
  268. package/react-native/src/sources/query-result-item.ts +0 -116
  269. package/react-native/src/sources/query-result.ts +0 -55
  270. package/react-native/src/sources/register.ts +0 -92
  271. package/react-native/src/sources/small-peer-info.ts +0 -176
  272. package/react-native/src/sources/static-tcp-client.ts +0 -6
  273. package/react-native/src/sources/store-observer.ts +0 -176
  274. package/react-native/src/sources/store.ts +0 -365
  275. package/react-native/src/sources/subscription-manager.ts +0 -98
  276. package/react-native/src/sources/subscription.ts +0 -88
  277. package/react-native/src/sources/sync-subscription.ts +0 -90
  278. package/react-native/src/sources/sync.ts +0 -495
  279. package/react-native/src/sources/test-helpers.ts +0 -24
  280. package/react-native/src/sources/transport-conditions-manager.ts +0 -104
  281. package/react-native/src/sources/transport-config.ts +0 -428
  282. package/react-native/src/sources/update-result.ts +0 -66
  283. package/react-native/src/sources/update-results-map.ts +0 -57
  284. package/react-native/src/sources/websocket-client.ts +0 -6
  285. package/react-native/src/sources/write-transaction-collection.ts +0 -122
  286. package/react-native/src/sources/write-transaction-pending-cursor-operation.ts +0 -101
  287. package/react-native/src/sources/write-transaction-pending-id-specific-operation.ts +0 -72
  288. package/react-native/src/sources/write-transaction.ts +0 -119
  289. package/react-native.config.js +0 -9
@@ -1,385 +0,0 @@
1
- // DITTO VENDORING - bionic/ifaddrs.cpp, modified
2
-
3
- /*
4
- * Copyright (C) 2015 The Android Open Source Project
5
- * All rights reserved.
6
- *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions
9
- * are met:
10
- * * Redistributions of source code must retain the above copyright
11
- * notice, this list of conditions and the following disclaimer.
12
- * * Redistributions in binary form must reproduce the above copyright
13
- * notice, this list of conditions and the following disclaimer in
14
- * the documentation and/or other materials provided with the
15
- * distribution.
16
- *
17
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
27
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28
- * SUCH DAMAGE.
29
- */
30
-
31
- #include "ifaddrs.h"
32
-
33
- #include <errno.h>
34
- #include <linux/if_packet.h>
35
- #include <net/if.h>
36
- #include <netinet/in.h>
37
- #include <stdint.h>
38
- #include <stdio.h>
39
- #include <stdlib.h>
40
- #include <string.h>
41
- #include <unistd.h>
42
-
43
- // The public ifaddrs struct is full of pointers. Rather than track several
44
- // different allocations, we use a maximally-sized structure with the public
45
- // part at offset 0, and pointers into its hidden tail.
46
- struct ifaddrs_storage {
47
- // Must come first, so that `ifaddrs_storage` is-a `ifaddrs`.
48
- ifaddrs ifa;
49
-
50
- // The interface index, so we can match RTM_NEWADDR messages with
51
- // earlier RTM_NEWLINK messages (to copy the interface flags).
52
- int interface_index;
53
-
54
- // Storage for the pointers in `ifa`.
55
- sockaddr_storage addr;
56
- sockaddr_storage netmask;
57
- sockaddr_storage ifa_ifu;
58
- char name[IFNAMSIZ + 1];
59
-
60
- explicit ifaddrs_storage(ifaddrs** list) {
61
- memset(this, 0, sizeof(*this));
62
-
63
- // push_front onto `list`.
64
- ifa.ifa_next = *list;
65
- *list = reinterpret_cast<ifaddrs*>(this);
66
- }
67
-
68
- void SetAddress(int family, const void* data, size_t byteCount) {
69
- // The kernel currently uses the order IFA_ADDRESS, IFA_LOCAL, IFA_BROADCAST
70
- // in inet_fill_ifaddr, but let's not assume that will always be true...
71
- if (ifa.ifa_addr == nullptr) {
72
- // This is an IFA_ADDRESS and haven't seen an IFA_LOCAL yet, so assume this is the
73
- // local address. SetLocalAddress will fix things if we later see an IFA_LOCAL.
74
- ifa.ifa_addr = CopyAddress(family, data, byteCount, &addr);
75
- } else {
76
- // We already saw an IFA_LOCAL, which implies this is a destination address.
77
- ifa.ifa_dstaddr = CopyAddress(family, data, byteCount, &ifa_ifu);
78
- }
79
- }
80
-
81
- void SetBroadcastAddress(int family, const void* data, size_t byteCount) {
82
- // ifa_broadaddr and ifa_dstaddr overlap in a union. Unfortunately, it's possible
83
- // to have an interface with both. Keeping the last thing the kernel gives us seems
84
- // to be glibc 2.19's behavior too, so our choice is being source compatible with
85
- // badly-written code that assumes ifa_broadaddr and ifa_dstaddr are interchangeable
86
- // or supporting interfaces with both addresses configured. My assumption is that
87
- // bad code is more common than weird network interfaces...
88
- ifa.ifa_broadaddr = CopyAddress(family, data, byteCount, &ifa_ifu);
89
- }
90
-
91
- void SetLocalAddress(int family, const void* data, size_t byteCount) {
92
- // The kernel source says "for point-to-point IFA_ADDRESS is DESTINATION address,
93
- // local address is supplied in IFA_LOCAL attribute".
94
- // -- http://lxr.free-electrons.com/source/include/uapi/linux/if_addr.h#L17
95
-
96
- // So copy any existing IFA_ADDRESS into ifa_dstaddr...
97
- if (ifa.ifa_addr != nullptr) {
98
- ifa.ifa_dstaddr = reinterpret_cast<sockaddr*>(memcpy(&ifa_ifu, &addr, sizeof(addr)));
99
- }
100
- // ...and then put this IFA_LOCAL into ifa_addr.
101
- ifa.ifa_addr = CopyAddress(family, data, byteCount, &addr);
102
- }
103
-
104
- // Netlink gives us the prefix length as a bit count. We need to turn
105
- // that into a BSD-compatible netmask represented by a sockaddr*.
106
- void SetNetmask(int family, size_t prefix_length) {
107
- // ...and work out the netmask from the prefix length.
108
- netmask.ss_family = family;
109
- uint8_t* dst = SockaddrBytes(family, &netmask);
110
- memset(dst, 0xff, prefix_length / 8);
111
- if ((prefix_length % 8) != 0) {
112
- dst[prefix_length/8] = (0xff << (8 - (prefix_length % 8)));
113
- }
114
- ifa.ifa_netmask = reinterpret_cast<sockaddr*>(&netmask);
115
- }
116
-
117
- void SetPacketAttributes(int ifindex, unsigned short hatype, unsigned char halen) {
118
- sockaddr_ll* sll = reinterpret_cast<sockaddr_ll*>(&addr);
119
- sll->sll_ifindex = ifindex;
120
- sll->sll_hatype = hatype;
121
- sll->sll_halen = halen;
122
- }
123
-
124
- private:
125
- sockaddr* CopyAddress(int family, const void* data, size_t byteCount, sockaddr_storage* ss) {
126
- // Netlink gives us the address family in the header, and the
127
- // sockaddr_in or sockaddr_in6 bytes as the payload. We need to
128
- // stitch the two bits together into the sockaddr that's part of
129
- // our portable interface.
130
- ss->ss_family = family;
131
- memcpy(SockaddrBytes(family, ss), data, byteCount);
132
-
133
- // For IPv6 we might also have to set the scope id.
134
- if (family == AF_INET6 && (IN6_IS_ADDR_LINKLOCAL(data) || IN6_IS_ADDR_MC_LINKLOCAL(data))) {
135
- reinterpret_cast<sockaddr_in6*>(ss)->sin6_scope_id = interface_index;
136
- }
137
-
138
- return reinterpret_cast<sockaddr*>(ss);
139
- }
140
-
141
- // Returns a pointer to the first byte in the address data (which is
142
- // stored in network byte order).
143
- uint8_t* SockaddrBytes(int family, sockaddr_storage* ss) {
144
- if (family == AF_INET) {
145
- sockaddr_in* ss4 = reinterpret_cast<sockaddr_in*>(ss);
146
- return reinterpret_cast<uint8_t*>(&ss4->sin_addr);
147
- } else if (family == AF_INET6) {
148
- sockaddr_in6* ss6 = reinterpret_cast<sockaddr_in6*>(ss);
149
- return reinterpret_cast<uint8_t*>(&ss6->sin6_addr);
150
- } else if (family == AF_PACKET) {
151
- sockaddr_ll* sll = reinterpret_cast<sockaddr_ll*>(ss);
152
- return reinterpret_cast<uint8_t*>(&sll->sll_addr);
153
- }
154
- return nullptr;
155
- }
156
- };
157
-
158
- static void __getifaddrs_callback(void* context, nlmsghdr* hdr) {
159
- ifaddrs** out = reinterpret_cast<ifaddrs**>(context);
160
-
161
- if (hdr->nlmsg_type == RTM_NEWLINK) {
162
- ifinfomsg* ifi = reinterpret_cast<ifinfomsg*>(NLMSG_DATA(hdr));
163
-
164
- // Create a new ifaddr entry, and set the interface index and flags.
165
- ifaddrs_storage* new_addr = new ifaddrs_storage(out);
166
- new_addr->interface_index = ifi->ifi_index;
167
- new_addr->ifa.ifa_flags = ifi->ifi_flags;
168
-
169
- // Go through the various bits of information and find the name.
170
- rtattr* rta = IFLA_RTA(ifi);
171
- size_t rta_len = IFLA_PAYLOAD(hdr);
172
- while (RTA_OK(rta, rta_len)) {
173
- if (rta->rta_type == IFLA_ADDRESS) {
174
- if (RTA_PAYLOAD(rta) < sizeof(new_addr->addr)) {
175
- new_addr->SetAddress(AF_PACKET, RTA_DATA(rta), RTA_PAYLOAD(rta));
176
- new_addr->SetPacketAttributes(ifi->ifi_index, ifi->ifi_type, RTA_PAYLOAD(rta));
177
- }
178
- } else if (rta->rta_type == IFLA_BROADCAST) {
179
- if (RTA_PAYLOAD(rta) < sizeof(new_addr->ifa_ifu)) {
180
- new_addr->SetBroadcastAddress(AF_PACKET, RTA_DATA(rta), RTA_PAYLOAD(rta));
181
- new_addr->SetPacketAttributes(ifi->ifi_index, ifi->ifi_type, RTA_PAYLOAD(rta));
182
- }
183
- } else if (rta->rta_type == IFLA_IFNAME) {
184
- if (RTA_PAYLOAD(rta) < sizeof(new_addr->name)) {
185
- memcpy(new_addr->name, RTA_DATA(rta), RTA_PAYLOAD(rta));
186
- new_addr->ifa.ifa_name = new_addr->name;
187
- }
188
- }
189
- rta = RTA_NEXT(rta, rta_len);
190
- }
191
- } else if (hdr->nlmsg_type == RTM_NEWADDR) {
192
- ifaddrmsg* msg = reinterpret_cast<ifaddrmsg*>(NLMSG_DATA(hdr));
193
-
194
- // We might already know about this interface from an RTM_NEWLINK message.
195
- const ifaddrs_storage* known_addr = reinterpret_cast<const ifaddrs_storage*>(*out);
196
- while (known_addr != nullptr && known_addr->interface_index != static_cast<int>(msg->ifa_index)) {
197
- known_addr = reinterpret_cast<const ifaddrs_storage*>(known_addr->ifa.ifa_next);
198
- }
199
-
200
- // Create a new ifaddr entry, and set the interface index.
201
- ifaddrs_storage* new_addr = new ifaddrs_storage(out);
202
- new_addr->interface_index = static_cast<int>(msg->ifa_index);
203
-
204
- // If this is a known interface, copy what we already know.
205
- // If we don't know about this interface yet, we try to resolve the name and flags using ioctl
206
- // calls during postprocessing.
207
- if (known_addr != nullptr) {
208
- strcpy(new_addr->name, known_addr->name);
209
- new_addr->ifa.ifa_name = new_addr->name;
210
- new_addr->ifa.ifa_flags = known_addr->ifa.ifa_flags;
211
- }
212
-
213
- // Go through the various bits of information and find the name, address
214
- // and any broadcast/destination address.
215
- rtattr* rta = IFA_RTA(msg);
216
- size_t rta_len = IFA_PAYLOAD(hdr);
217
- while (RTA_OK(rta, rta_len)) {
218
- if (rta->rta_type == IFA_ADDRESS) {
219
- if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) {
220
- new_addr->SetAddress(msg->ifa_family, RTA_DATA(rta), RTA_PAYLOAD(rta));
221
- new_addr->SetNetmask(msg->ifa_family, msg->ifa_prefixlen);
222
- }
223
- } else if (rta->rta_type == IFA_BROADCAST) {
224
- if (msg->ifa_family == AF_INET) {
225
- new_addr->SetBroadcastAddress(msg->ifa_family, RTA_DATA(rta), RTA_PAYLOAD(rta));
226
- if (known_addr == nullptr) {
227
- // We did not read the broadcast flag from an RTM_NEWLINK message.
228
- // Ensure that it is set.
229
- new_addr->ifa.ifa_flags |= IFF_BROADCAST;
230
- }
231
- }
232
- } else if (rta->rta_type == IFA_LOCAL) {
233
- if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) {
234
- new_addr->SetLocalAddress(msg->ifa_family, RTA_DATA(rta), RTA_PAYLOAD(rta));
235
- }
236
- } else if (rta->rta_type == IFA_LABEL) {
237
- if (RTA_PAYLOAD(rta) < sizeof(new_addr->name)) {
238
- memcpy(new_addr->name, RTA_DATA(rta), RTA_PAYLOAD(rta));
239
- new_addr->ifa.ifa_name = new_addr->name;
240
- }
241
- }
242
- rta = RTA_NEXT(rta, rta_len);
243
- }
244
- }
245
- }
246
-
247
- static void resolve_or_remove_nameless_interfaces(ifaddrs** list) {
248
- ifaddrs_storage* addr = reinterpret_cast<ifaddrs_storage*>(*list);
249
- ifaddrs_storage* prev_addr = nullptr;
250
- while (addr != nullptr) {
251
- ifaddrs* next_addr = addr->ifa.ifa_next;
252
-
253
- // Try resolving interfaces without a name first.
254
- if (strlen(addr->name) == 0) {
255
- if (if_indextoname(addr->interface_index, addr->name) != nullptr) {
256
- addr->ifa.ifa_name = addr->name;
257
- }
258
- }
259
-
260
- // If the interface could not be resolved, remove it.
261
- if (strlen(addr->name) == 0) {
262
- if (prev_addr == nullptr) {
263
- *list = next_addr;
264
- } else {
265
- prev_addr->ifa.ifa_next = next_addr;
266
- }
267
- free(addr);
268
- } else {
269
- prev_addr = addr;
270
- }
271
-
272
- addr = reinterpret_cast<ifaddrs_storage*>(next_addr);
273
- }
274
- }
275
-
276
- static void get_interface_flags_via_ioctl(ifaddrs** list) {
277
- ScopedFd s(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
278
- if (s.get() == -1) {
279
- return;
280
- }
281
-
282
- for (ifaddrs_storage* addr = reinterpret_cast<ifaddrs_storage*>(*list); addr != nullptr;
283
- addr = reinterpret_cast<ifaddrs_storage*>(addr->ifa.ifa_next)) {
284
- ifreq ifr = {};
285
- strlcpy(ifr.ifr_name, addr->ifa.ifa_name, sizeof(ifr.ifr_name));
286
- if (ioctl(s.get(), SIOCGIFFLAGS, &ifr) != -1) {
287
- addr->ifa.ifa_flags = ifr.ifr_flags;
288
- }
289
- }
290
- }
291
-
292
- int getifaddrs(ifaddrs** out) {
293
- // We construct the result directly into `out`, so terminate the list.
294
- *out = nullptr;
295
-
296
- // Open the netlink socket and ask for all the links and addresses.
297
- NetlinkConnection nc;
298
- // SELinux policy only allows RTM_GETLINK messages to be sent by system apps.
299
- bool getlink_success = false;
300
- bool getaddr_success =
301
- nc.SendRequest(RTM_GETADDR) && nc.ReadResponses(__getifaddrs_callback, out);
302
-
303
- if (!getaddr_success) {
304
- freeifaddrs(*out);
305
- // Ensure that callers crash if they forget to check for success.
306
- *out = nullptr;
307
- return -1;
308
- }
309
-
310
- if (!getlink_success) {
311
- // If we weren't able to depend on GETLINK messages, it's possible some
312
- // interfaces never got their name set. Resolve them using if_indextoname or remove them.
313
- resolve_or_remove_nameless_interfaces(out);
314
- // Similarly, without GETLINK messages, interfaces will not have their flags set.
315
- // Resolve them using the SIOCGIFFLAGS ioctl call.
316
- get_interface_flags_via_ioctl(out);
317
- }
318
-
319
- return 0;
320
- }
321
-
322
- void freeifaddrs(ifaddrs* list) {
323
- while (list != nullptr) {
324
- ifaddrs* current = list;
325
- list = list->ifa_next;
326
- free(current);
327
- }
328
- }
329
-
330
- // DITTO VENDORING - bionic/bionic_netlink.cpp, modified
331
-
332
- NetlinkConnection::NetlinkConnection() {
333
- // The kernel keeps packets under 8KiB (NLMSG_GOODSIZE),
334
- // but that's a bit too large to go on the stack.
335
- size_ = 8192;
336
- data_ = new char[size_];
337
- }
338
-
339
- NetlinkConnection::~NetlinkConnection() {
340
- delete[] data_;
341
- }
342
-
343
- bool NetlinkConnection::SendRequest(int type) {
344
- // Rather than force all callers to check for the unlikely event of being
345
- // unable to allocate 8KiB, check here.
346
- if (data_ == nullptr) return false;
347
-
348
- // Did we open a netlink socket yet?
349
- if (fd_.get() == -1) {
350
- fd_.reset(socket(PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE));
351
- if (fd_.get() == -1) return false;
352
- }
353
-
354
- // Construct and send the message.
355
- struct NetlinkMessage {
356
- nlmsghdr hdr;
357
- rtgenmsg msg;
358
- } request;
359
- memset(&request, 0, sizeof(request));
360
- request.hdr.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST;
361
- request.hdr.nlmsg_type = type;
362
- request.hdr.nlmsg_len = sizeof(request);
363
- request.msg.rtgen_family = AF_UNSPEC; // All families.
364
- return (TEMP_FAILURE_RETRY(send(fd_.get(), &request, sizeof(request), 0)) == sizeof(request));
365
- }
366
-
367
- bool NetlinkConnection::ReadResponses(void callback(void*, nlmsghdr*), void* context) {
368
- // Read through all the responses, handing interesting ones to the callback.
369
- ssize_t bytes_read;
370
- while ((bytes_read = TEMP_FAILURE_RETRY(recv(fd_.get(), data_, size_, 0))) > 0) {
371
- nlmsghdr* hdr = reinterpret_cast<nlmsghdr*>(data_);
372
- for (; NLMSG_OK(hdr, static_cast<size_t>(bytes_read)); hdr = NLMSG_NEXT(hdr, bytes_read)) {
373
- if (hdr->nlmsg_type == NLMSG_DONE) return true;
374
- if (hdr->nlmsg_type == NLMSG_ERROR) {
375
- nlmsgerr* err = reinterpret_cast<nlmsgerr*>(NLMSG_DATA(hdr));
376
- errno = (hdr->nlmsg_len >= NLMSG_LENGTH(sizeof(nlmsgerr))) ? -err->error : EIO;
377
- return false;
378
- }
379
- callback(context, hdr);
380
- }
381
- }
382
-
383
- // We only get here if recv fails before we see a NLMSG_DONE.
384
- return false;
385
- }
@@ -1,206 +0,0 @@
1
- // DITTO VENDORING - private/ScopedFd.h, modified
2
-
3
- #include <sys/types.h>
4
- #include <unistd.h>
5
-
6
- #include <linux/netlink.h>
7
- #include <linux/rtnetlink.h>
8
-
9
- class ScopedFd final {
10
- public:
11
- explicit ScopedFd(int fd) : fd_(fd) {
12
- }
13
-
14
- ScopedFd() : fd_(-1) {
15
- }
16
-
17
- ~ScopedFd() {
18
- reset(-1);
19
- }
20
-
21
- void reset(int fd = -1) {
22
- if (fd_ != -1) {
23
- close(fd_);
24
- }
25
- fd_ = fd;
26
- }
27
-
28
- int get() const {
29
- return fd_;
30
- }
31
-
32
- private:
33
- int fd_;
34
-
35
- };
36
-
37
- // DITTO VENDORING - bionic/ifaddrs.h, modified
38
-
39
- /*
40
- * Copyright (C) 2019 The Android Open Source Project
41
- * All rights reserved.
42
- *
43
- * Redistribution and use in source and binary forms, with or without
44
- * modification, are permitted provided that the following conditions
45
- * are met:
46
- * * Redistributions of source code must retain the above copyright
47
- * notice, this list of conditions and the following disclaimer.
48
- * * Redistributions in binary form must reproduce the above copyright
49
- * notice, this list of conditions and the following disclaimer in
50
- * the documentation and/or other materials provided with the
51
- * distribution.
52
- *
53
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
54
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
55
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
56
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
57
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
58
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
59
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
60
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
61
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
62
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
63
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64
- * SUCH DAMAGE.
65
- */
66
-
67
-
68
- /*
69
- * Copyright (C) 2015 The Android Open Source Project
70
- * All rights reserved.
71
- *
72
- * Redistribution and use in source and binary forms, with or without
73
- * modification, are permitted provided that the following conditions
74
- * are met:
75
- * * Redistributions of source code must retain the above copyright
76
- * notice, this list of conditions and the following disclaimer.
77
- * * Redistributions in binary form must reproduce the above copyright
78
- * notice, this list of conditions and the following disclaimer in
79
- * the documentation and/or other materials provided with the
80
- * distribution.
81
- *
82
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
83
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
84
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
85
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
86
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
87
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
88
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
89
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
90
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
91
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
92
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
93
- * SUCH DAMAGE.
94
- */
95
-
96
- /**
97
- * @file ifaddrs.h
98
- * @brief Access to network interface addresses.
99
- */
100
-
101
- #include <sys/cdefs.h>
102
- #include <netinet/in.h>
103
- #include <sys/socket.h>
104
-
105
- __BEGIN_DECLS
106
-
107
- /**
108
- * Returned by getifaddrs() and freed by freeifaddrs().
109
- */
110
- struct ifaddrs {
111
- /** Pointer to the next element in the linked list. */
112
- struct ifaddrs* ifa_next;
113
-
114
- /** Interface name. */
115
- char* ifa_name;
116
- /** Interface flags (like `SIOCGIFFLAGS`). */
117
- unsigned int ifa_flags;
118
- /** Interface address. */
119
- struct sockaddr* ifa_addr;
120
- /** Interface netmask. */
121
- struct sockaddr* ifa_netmask;
122
-
123
- union {
124
- /** Interface broadcast address (if IFF_BROADCAST is set). */
125
- struct sockaddr* ifu_broadaddr;
126
- /** Interface destination address (if IFF_POINTOPOINT is set). */
127
- struct sockaddr* ifu_dstaddr;
128
- } ifa_ifu;
129
-
130
- /** Unused. */
131
- void* ifa_data;
132
- };
133
-
134
- /** Synonym for `ifa_ifu.ifu_broadaddr` in `struct ifaddrs`. */
135
- #define ifa_broadaddr ifa_ifu.ifu_broadaddr
136
- /** Synonym for `ifa_ifu.ifu_dstaddr` in `struct ifaddrs`. */
137
- #define ifa_dstaddr ifa_ifu.ifu_dstaddr
138
-
139
- /**
140
- * [getifaddrs(3)](http://man7.org/linux/man-pages/man3/getifaddrs.3.html) creates a linked list
141
- * of `struct ifaddrs`. The list must be freed by freeifaddrs().
142
- *
143
- * Returns 0 and stores the list in `*__list_ptr` on success,
144
- * and returns -1 and sets `errno` on failure.
145
- *
146
- * Available since API level 24.
147
- */
148
- int getifaddrs(struct ifaddrs** __list_ptr) __INTRODUCED_IN(24);
149
-
150
- /**
151
- * [freeifaddrs(3)](http://man7.org/linux/man-pages/man3/freeifaddrs.3.html) frees a linked list
152
- * of `struct ifaddrs` returned by getifaddrs().
153
- *
154
- * Available since API level 24.
155
- */
156
- void freeifaddrs(struct ifaddrs* __ptr) __INTRODUCED_IN(24);
157
-
158
- __END_DECLS
159
-
160
-
161
- // DITTO VENDORING - bionic/bionic_netlink.h, modified
162
-
163
- /*
164
- * Copyright (C) 2016 The Android Open Source Project
165
- * All rights reserved.
166
- *
167
- * Redistribution and use in source and binary forms, with or without
168
- * modification, are permitted provided that the following conditions
169
- * are met:
170
- * * Redistributions of source code must retain the above copyright
171
- * notice, this list of conditions and the following disclaimer.
172
- * * Redistributions in binary form must reproduce the above copyright
173
- * notice, this list of conditions and the following disclaimer in
174
- * the documentation and/or other materials provided with the
175
- * distribution.
176
- *
177
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
178
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
179
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
180
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
181
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
182
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
183
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
184
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
185
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
186
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
187
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
188
- * SUCH DAMAGE.
189
- */
190
-
191
-
192
- struct nlmsghdr;
193
-
194
- class NetlinkConnection {
195
- public:
196
- NetlinkConnection();
197
- ~NetlinkConnection();
198
-
199
- bool SendRequest(int type);
200
- bool ReadResponses(void callback(void*, nlmsghdr*), void* context);
201
-
202
- private:
203
- ScopedFd fd_;
204
- char* data_;
205
- size_t size_;
206
- };
@@ -1,7 +0,0 @@
1
- #import <React/RCTBridgeModule.h>
2
-
3
- @interface DittoRNSDK : NSObject <RCTBridgeModule>
4
-
5
- @property(nonatomic, assign) BOOL setBridgeOnMainQueue;
6
-
7
- @end