81b1e4f6348 chore: Release v0.2.21-rc.1 9303e2e49a1 chore: Update the pkgsrc versions in the update-versions tool 71ec4b3b1e9 chore: Update the version-sync script to work in a post-tox.api.h world 66da842f753 chore: Add version update script compatible with ci-tools. 199878f7660 chore: Use new bazel script for circle ci. 8278e9cda46 chore: Add release issue template and workflow. a9bb3a1c4d1 chore: Fix alpine-s390x build. 6e0a641272e chore: Add a source tarball deploy workflow. 4adebe4d8b1 chore: Don't upload ios/macos variants in deploy workflows. 18f1d858ccb chore: Move one of the 3 freebsd builds to post-submit. 432ab60c002 feat: Add a Makefile for the single file deploy build. a86c0011fd5 chore: Add deploy job for single C file library. 2e7495e8f2a docs: Update changelog format to use the new clog-compatible way. a682da99e84 chore: Export wasmExports from the wasm binary. 12f34cdff27 chore: Add wasm to the nightly binary deploys. 1451029613f chore: Add strict-abi support for macOS/iOS. c53c30e09d9 chore: Add time option to manual fuzz trigger. 2ccecdc2a1a chore: Add remaining fuzz tests to cflite. 4626c2e230e test: Add a Net_Crypto fuzz test. b4a0e617c48 refactor: Use IP string length from ip_ntoa instead of strlen. b85b91f22f6 cleanup: rename getnodes/sendnodes to nodes request/response This change alignes the naming to be closer to the spec and make it less ambiguous. This change also changes the naming of some private/experimental marked APIs. - tox_callback_dht_nodes_response() - tox_dht_nodes_request() - Tox_Event_Dht_Get_Nodes_Response f1991aaa029 perf: Use stack allocation for strerror rendering. 3984211ccbf cleanup: remove kicked peers from saved peers list 26a991ed2be fix: ip to string function not accepting tcp families 712861f2e6d cleanup: Make websockify output qtox-compatible logging. 01932ea2f73 chore: Add opus and vpx to the toxcore wasm build. d29c42ef631 refactor: don't fully discard received DHT nodes. This is mostly forward thinking, where we might introduce other ip families, in addition to ipv4, ipv6, tcp_ipv4 etc. 21e2325934f chore: Fix xcframework tarball creation. b10c8b766ba chore: Fix xcframework checksum creation. 93787a9322e chore: Add ios/macos framework build. 9f723f891d3 fix: run do_gca also in bootstrap nodes 496cc703556 chore: Support arm64 iphone simulator. aa0e2a8e928 chore: Add support for more iOS architectures. 13ad8e81cbf chore: Add binary deploy workflows. c8344726378 refactor: Move tox_log_level out into its own file. 8799bea76c3 cleanup: Mark events/dispatch headers as experimental. d4164edb548 refactor: Remove tox_types.h; use `struct` tags instead. d408c982090 refactor: Move `Tox_Options` to `tox_options.h`. 5ab42d41209 chore: Move most cirrus jobs to circleci. 463eeae1144 cleanup: Avoid clashing with global define `DEBUG`. 92cc1e91747 refactor: Make Tox_Options own the passed proxy host and savedata. f276b397226 test: Add some more asserts for I/O and alloc to succeed. edb4dfc4869 fix: Don't crash on malloc failures in bin_unpack. be457d5d0b2 cleanup: Use tox memory for bin_unpack and net_strerror. git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 81b1e4f6348124784088591c4fe9ab41e273031d
1275 lines
26 KiB
Python
1275 lines
26 KiB
Python
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
|
load("@rules_fuzzing//fuzzing:cc_defs.bzl", "cc_fuzz_test")
|
|
|
|
exports_files(
|
|
srcs = [
|
|
"tox.h",
|
|
"tox_dispatch.h",
|
|
"tox_events.h",
|
|
"tox_log_level.h",
|
|
"tox_options.h",
|
|
"tox_private.h",
|
|
],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "test_util",
|
|
testonly = True,
|
|
srcs = ["test_util.cc"],
|
|
hdrs = ["test_util.hh"],
|
|
)
|
|
|
|
cc_test(
|
|
name = "test_util_test",
|
|
size = "small",
|
|
srcs = ["test_util_test.cc"],
|
|
deps = [
|
|
":crypto_core",
|
|
":crypto_core_test_util",
|
|
":test_util",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "attributes",
|
|
hdrs = ["attributes.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ccompat",
|
|
srcs = ["ccompat.c"],
|
|
hdrs = ["ccompat.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [":attributes"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "mem",
|
|
srcs = ["mem.c"],
|
|
hdrs = ["mem.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "mem_test_util",
|
|
testonly = True,
|
|
srcs = ["mem_test_util.cc"],
|
|
hdrs = ["mem_test_util.hh"],
|
|
deps = [
|
|
":mem",
|
|
":test_util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "mem_test",
|
|
size = "small",
|
|
srcs = ["mem_test.cc"],
|
|
deps = [
|
|
":mem",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "util",
|
|
srcs = ["util.c"],
|
|
hdrs = ["util.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
"//c-toxcore/testing/fuzzing:__pkg__",
|
|
"//c-toxcore/toxav:__pkg__",
|
|
],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":mem",
|
|
"@pthread",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "util_test",
|
|
size = "small",
|
|
srcs = ["util_test.cc"],
|
|
deps = [
|
|
":util",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "sort",
|
|
srcs = ["sort.c"],
|
|
hdrs = ["sort.h"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "sort_test_util",
|
|
testonly = True,
|
|
srcs = ["sort_test_util.cc"],
|
|
hdrs = ["sort_test_util.hh"],
|
|
deps = [
|
|
":sort",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "sort_test",
|
|
size = "small",
|
|
srcs = ["sort_test.cc"],
|
|
deps = [
|
|
":sort",
|
|
":sort_test_util",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "sort_bench",
|
|
testonly = True,
|
|
srcs = ["sort_bench.cc"],
|
|
deps = [
|
|
":mem",
|
|
":sort",
|
|
":sort_test_util",
|
|
"@benchmark",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "logger",
|
|
srcs = ["logger.c"],
|
|
hdrs = ["logger.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
"//c-toxcore/toxav:__pkg__",
|
|
],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":mem",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "bin_pack",
|
|
srcs = ["bin_pack.c"],
|
|
hdrs = ["bin_pack.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":logger",
|
|
"//c-toxcore/third_party:cmp",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "bin_unpack",
|
|
srcs = ["bin_unpack.c"],
|
|
hdrs = ["bin_unpack.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":mem",
|
|
"//c-toxcore/third_party:cmp",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "bin_pack_test",
|
|
size = "small",
|
|
srcs = ["bin_pack_test.cc"],
|
|
deps = [
|
|
":bin_pack",
|
|
":bin_unpack",
|
|
":logger",
|
|
":mem",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "crypto_core",
|
|
srcs = ["crypto_core.c"],
|
|
hdrs = ["crypto_core.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":mem",
|
|
":util",
|
|
"@libsodium",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "crypto_core_pack",
|
|
srcs = ["crypto_core_pack.c"],
|
|
hdrs = ["crypto_core_pack.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":bin_pack",
|
|
":bin_unpack",
|
|
":ccompat",
|
|
":crypto_core",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "crypto_core_test_util",
|
|
testonly = True,
|
|
srcs = ["crypto_core_test_util.cc"],
|
|
hdrs = ["crypto_core_test_util.hh"],
|
|
deps = [
|
|
":crypto_core",
|
|
":test_util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "crypto_core_test",
|
|
size = "small",
|
|
srcs = ["crypto_core_test.cc"],
|
|
flaky = True,
|
|
deps = [
|
|
":crypto_core",
|
|
":crypto_core_test_util",
|
|
":mem_test_util",
|
|
":util",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "list",
|
|
srcs = ["list.c"],
|
|
hdrs = ["list.h"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":mem",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "list_test",
|
|
size = "small",
|
|
srcs = ["list_test.cc"],
|
|
deps = [
|
|
":list",
|
|
":mem",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "state",
|
|
srcs = ["state.c"],
|
|
hdrs = ["state.h"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":logger",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "mono_time",
|
|
srcs = ["mono_time.c"],
|
|
hdrs = ["mono_time.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
"//c-toxcore/testing:__pkg__",
|
|
"//c-toxcore/toxav:__pkg__",
|
|
],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":mem",
|
|
":util",
|
|
"@pthread",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "mono_time_test",
|
|
size = "small",
|
|
srcs = ["mono_time_test.cc"],
|
|
deps = [
|
|
":mem_test_util",
|
|
":mono_time",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "shared_key_cache",
|
|
srcs = ["shared_key_cache.c"],
|
|
hdrs = ["shared_key_cache.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
"//c-toxcore/testing:__pkg__",
|
|
"//c-toxcore/toxav:__pkg__",
|
|
],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "net_profile",
|
|
srcs = ["net_profile.c"],
|
|
hdrs = ["net_profile.h"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":logger",
|
|
":mem",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "network",
|
|
srcs = ["network.c"],
|
|
hdrs = ["network.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
"//c-toxcore/testing/fuzzing:__pkg__",
|
|
"//c-toxcore/toxav:__pkg__",
|
|
],
|
|
deps = [
|
|
":attributes",
|
|
":bin_pack",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_profile",
|
|
":util",
|
|
"@libsodium",
|
|
"@psocket",
|
|
"@pthread",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "network_test_util",
|
|
testonly = True,
|
|
srcs = ["network_test_util.cc"],
|
|
hdrs = ["network_test_util.hh"],
|
|
deps = [
|
|
":crypto_core",
|
|
":mem",
|
|
":network",
|
|
":test_util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "network_test",
|
|
size = "small",
|
|
srcs = ["network_test.cc"],
|
|
deps = [
|
|
":network",
|
|
":network_test_util",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "timed_auth",
|
|
srcs = ["timed_auth.c"],
|
|
hdrs = ["timed_auth.h"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":mono_time",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ping_array",
|
|
srcs = ["ping_array.c"],
|
|
hdrs = ["ping_array.h"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":mem",
|
|
":mono_time",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "ping_array_test",
|
|
size = "small",
|
|
srcs = ["ping_array_test.cc"],
|
|
deps = [
|
|
":crypto_core_test_util",
|
|
":mem_test_util",
|
|
":mono_time",
|
|
":ping_array",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "LAN_discovery",
|
|
srcs = ["LAN_discovery.c"],
|
|
hdrs = ["LAN_discovery.h"],
|
|
visibility = [
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
"//c-toxcore/testing:__pkg__",
|
|
],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":mem",
|
|
":network",
|
|
":util",
|
|
"@psocket",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "DHT",
|
|
srcs = [
|
|
"DHT.c",
|
|
"ping.c",
|
|
],
|
|
hdrs = [
|
|
"DHT.h",
|
|
"ping.h",
|
|
],
|
|
visibility = [
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
"//c-toxcore/testing:__pkg__",
|
|
],
|
|
deps = [
|
|
":LAN_discovery",
|
|
":attributes",
|
|
":bin_pack",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":ping_array",
|
|
":shared_key_cache",
|
|
":sort",
|
|
":state",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "DHT_test_util",
|
|
testonly = True,
|
|
srcs = ["DHT_test_util.cc"],
|
|
hdrs = ["DHT_test_util.hh"],
|
|
deps = [
|
|
":DHT",
|
|
":crypto_core",
|
|
":crypto_core_test_util",
|
|
":network",
|
|
":network_test_util",
|
|
":test_util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "DHT_test",
|
|
size = "small",
|
|
srcs = ["DHT_test.cc"],
|
|
deps = [
|
|
":DHT",
|
|
":DHT_test_util",
|
|
":crypto_core",
|
|
":crypto_core_test_util",
|
|
":logger",
|
|
":mem_test_util",
|
|
":mono_time",
|
|
":network",
|
|
":network_test_util",
|
|
":test_util",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_fuzz_test(
|
|
name = "DHT_fuzz_test",
|
|
size = "small",
|
|
testonly = True,
|
|
srcs = ["DHT_fuzz_test.cc"],
|
|
corpus = ["//tools/toktok-fuzzer/corpus:DHT_fuzz_test"],
|
|
deps = [
|
|
":DHT",
|
|
":mem_test_util",
|
|
"//c-toxcore/testing/fuzzing:fuzz_support",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "onion",
|
|
srcs = ["onion.c"],
|
|
hdrs = ["onion.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":shared_key_cache",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "forwarding",
|
|
srcs = ["forwarding.c"],
|
|
hdrs = ["forwarding.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":timed_auth",
|
|
],
|
|
)
|
|
|
|
cc_fuzz_test(
|
|
name = "forwarding_fuzz_test",
|
|
size = "small",
|
|
srcs = ["forwarding_fuzz_test.cc"],
|
|
corpus = ["//tools/toktok-fuzzer/corpus:forwarding_fuzz_test"],
|
|
deps = [
|
|
":forwarding",
|
|
"//c-toxcore/testing/fuzzing:fuzz_support",
|
|
"//c-toxcore/testing/fuzzing:fuzz_tox",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "announce",
|
|
srcs = ["announce.c"],
|
|
hdrs = ["announce.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":LAN_discovery",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":forwarding",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":shared_key_cache",
|
|
":timed_auth",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "TCP_common",
|
|
srcs = ["TCP_common.c"],
|
|
hdrs = ["TCP_common.h"],
|
|
visibility = ["//c-toxcore/auto_tests:__pkg__"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":net_profile",
|
|
":network",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "TCP_server",
|
|
srcs = ["TCP_server.c"],
|
|
hdrs = ["TCP_server.h"],
|
|
copts = select({
|
|
"//tools/config:linux": ["-DTCP_SERVER_USE_EPOLL=1"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
],
|
|
deps = [
|
|
":TCP_common",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":forwarding",
|
|
":list",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_profile",
|
|
":network",
|
|
":onion",
|
|
":util",
|
|
"@psocket",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "TCP_client",
|
|
srcs = ["TCP_client.c"],
|
|
hdrs = ["TCP_client.h"],
|
|
visibility = ["//c-toxcore/auto_tests:__pkg__"],
|
|
deps = [
|
|
":TCP_common",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":forwarding",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_profile",
|
|
":network",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "TCP_connection",
|
|
srcs = ["TCP_connection.c"],
|
|
hdrs = ["TCP_connection.h"],
|
|
visibility = ["//c-toxcore/auto_tests:__pkg__"],
|
|
deps = [
|
|
":DHT",
|
|
":TCP_client",
|
|
":TCP_common",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":forwarding",
|
|
":list",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_profile",
|
|
":network",
|
|
":onion",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "TCP_connection_test",
|
|
size = "small",
|
|
srcs = ["TCP_connection_test.cc"],
|
|
deps = [
|
|
":TCP_connection",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "net_crypto",
|
|
srcs = ["net_crypto.c"],
|
|
hdrs = ["net_crypto.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/toxav:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":LAN_discovery",
|
|
":TCP_client",
|
|
":TCP_connection",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":list",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_profile",
|
|
":network",
|
|
":util",
|
|
"@pthread",
|
|
],
|
|
)
|
|
|
|
cc_fuzz_test(
|
|
name = "net_crypto_fuzz_test",
|
|
size = "small",
|
|
testonly = True,
|
|
srcs = ["net_crypto_fuzz_test.cc"],
|
|
corpus = ["//tools/toktok-fuzzer/corpus:net_crypto_fuzz_test"],
|
|
deps = [
|
|
":DHT",
|
|
":TCP_client",
|
|
":mem_test_util",
|
|
":net_crypto",
|
|
":network",
|
|
"//c-toxcore/testing/fuzzing:fuzz_support",
|
|
"//c-toxcore/testing/fuzzing:fuzz_tox",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "onion_announce",
|
|
srcs = ["onion_announce.c"],
|
|
hdrs = ["onion_announce.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":LAN_discovery",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":onion",
|
|
":shared_key_cache",
|
|
":sort",
|
|
":timed_auth",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "group_announce",
|
|
srcs = ["group_announce.c"],
|
|
hdrs = ["group_announce.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":LAN_discovery",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "group_announce_test",
|
|
size = "small",
|
|
srcs = ["group_announce_test.cc"],
|
|
deps = [
|
|
":DHT",
|
|
":crypto_core",
|
|
":group_announce",
|
|
":logger",
|
|
":mem_test_util",
|
|
":mono_time",
|
|
":network",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_fuzz_test(
|
|
name = "group_announce_fuzz_test",
|
|
size = "small",
|
|
testonly = True,
|
|
srcs = ["group_announce_fuzz_test.cc"],
|
|
corpus = ["//tools/toktok-fuzzer/corpus:group_announce_fuzz_test"],
|
|
deps = [
|
|
":group_announce",
|
|
":mem_test_util",
|
|
"//c-toxcore/testing/fuzzing:fuzz_support",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "group_onion_announce",
|
|
srcs = ["group_onion_announce.c"],
|
|
hdrs = ["group_onion_announce.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/other/bootstrap_daemon:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":group_announce",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":onion_announce",
|
|
":timed_auth",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "onion_client",
|
|
srcs = ["onion_client.c"],
|
|
hdrs = ["onion_client.h"],
|
|
visibility = ["//c-toxcore/auto_tests:__pkg__"],
|
|
deps = [
|
|
":DHT",
|
|
":LAN_discovery",
|
|
":TCP_connection",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":group_announce",
|
|
":group_onion_announce",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_crypto",
|
|
":network",
|
|
":onion",
|
|
":onion_announce",
|
|
":ping_array",
|
|
":sort",
|
|
":timed_auth",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "friend_connection",
|
|
srcs = ["friend_connection.c"],
|
|
hdrs = ["friend_connection.h"],
|
|
visibility = ["//c-toxcore/auto_tests:__pkg__"],
|
|
deps = [
|
|
":DHT",
|
|
":LAN_discovery",
|
|
":TCP_connection",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_crypto",
|
|
":network",
|
|
":onion",
|
|
":onion_announce",
|
|
":onion_client",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "friend_requests",
|
|
srcs = ["friend_requests.c"],
|
|
hdrs = ["friend_requests.h"],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/testing:__pkg__",
|
|
],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":friend_connection",
|
|
":mem",
|
|
":network",
|
|
":onion",
|
|
":onion_announce",
|
|
":onion_client",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "group_moderation",
|
|
srcs = ["group_moderation.c"],
|
|
hdrs = ["group_moderation.h"],
|
|
deps = [
|
|
":DHT",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":network",
|
|
":util",
|
|
"@libsodium",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "group_moderation_test",
|
|
size = "small",
|
|
srcs = ["group_moderation_test.cc"],
|
|
deps = [
|
|
":DHT",
|
|
":crypto_core",
|
|
":crypto_core_test_util",
|
|
":group_moderation",
|
|
":logger",
|
|
":mem_test_util",
|
|
":util",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_fuzz_test(
|
|
name = "group_moderation_fuzz_test",
|
|
size = "small",
|
|
testonly = True,
|
|
srcs = ["group_moderation_fuzz_test.cc"],
|
|
corpus = ["//tools/toktok-fuzzer/corpus:group_moderation_fuzz_test"],
|
|
deps = [
|
|
":group_moderation",
|
|
":mem_test_util",
|
|
"//c-toxcore/testing/fuzzing:fuzz_support",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "Messenger",
|
|
srcs = [
|
|
"Messenger.c",
|
|
"group_chats.c",
|
|
"group_connection.c",
|
|
"group_pack.c",
|
|
],
|
|
hdrs = [
|
|
"Messenger.h",
|
|
"group_chats.h",
|
|
"group_common.h",
|
|
"group_connection.h",
|
|
"group_pack.h",
|
|
],
|
|
visibility = [
|
|
"//c-toxcore/auto_tests:__pkg__",
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/testing:__pkg__",
|
|
"//c-toxcore/toxav:__pkg__",
|
|
],
|
|
deps = [
|
|
":DHT",
|
|
":LAN_discovery",
|
|
":TCP_client",
|
|
":TCP_connection",
|
|
":TCP_server",
|
|
":announce",
|
|
":attributes",
|
|
":bin_pack",
|
|
":bin_unpack",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":crypto_core_pack",
|
|
":forwarding",
|
|
":friend_connection",
|
|
":friend_requests",
|
|
":group_announce",
|
|
":group_moderation",
|
|
":group_onion_announce",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_crypto",
|
|
":network",
|
|
":onion",
|
|
":onion_announce",
|
|
":onion_client",
|
|
":state",
|
|
":util",
|
|
"@libsodium",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "group",
|
|
srcs = ["group.c"],
|
|
hdrs = ["group.h"],
|
|
visibility = ["//c-toxcore/toxav:__pkg__"],
|
|
deps = [
|
|
":DHT",
|
|
":Messenger",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":friend_connection",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_crypto",
|
|
":network",
|
|
":sort",
|
|
":state",
|
|
":util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "tox_options",
|
|
srcs = ["tox_options.c"],
|
|
hdrs = ["tox_options.h"],
|
|
copts = ["-UTOX_HIDE_DEPRECATED"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":ccompat",
|
|
":tox_log_level",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "tox_log_level",
|
|
srcs = ["tox_log_level.c"],
|
|
hdrs = ["tox_log_level.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "tox",
|
|
srcs = [
|
|
"tox.c",
|
|
"tox_api.c",
|
|
"tox_private.c",
|
|
],
|
|
hdrs = [
|
|
"tox.h",
|
|
"tox_private.h",
|
|
"tox_struct.h",
|
|
],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":DHT",
|
|
":Messenger",
|
|
":TCP_client",
|
|
":TCP_server",
|
|
":attributes",
|
|
":ccompat",
|
|
":crypto_core",
|
|
":friend_requests",
|
|
":group",
|
|
":group_moderation",
|
|
":logger",
|
|
":mem",
|
|
":mono_time",
|
|
":net_crypto",
|
|
":net_profile",
|
|
":network",
|
|
":onion_client",
|
|
":state",
|
|
":tox_log_level",
|
|
":tox_options",
|
|
":util",
|
|
"//c-toxcore/toxencryptsave:defines",
|
|
"@pthread",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "tox_test",
|
|
size = "small",
|
|
srcs = ["tox_test.cc"],
|
|
deps = [
|
|
":crypto_core",
|
|
":tox",
|
|
":tox_log_level",
|
|
":tox_options",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "tox_pack",
|
|
srcs = ["tox_pack.c"],
|
|
hdrs = ["tox_pack.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":bin_pack",
|
|
":ccompat",
|
|
":tox",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "tox_unpack",
|
|
srcs = ["tox_unpack.c"],
|
|
hdrs = ["tox_unpack.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":bin_unpack",
|
|
":ccompat",
|
|
":tox",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "tox_events",
|
|
srcs = [
|
|
"tox_event.c",
|
|
"tox_events.c",
|
|
] + glob([
|
|
"events/*.c",
|
|
]),
|
|
hdrs = [
|
|
"events/events_alloc.h",
|
|
"tox_event.h",
|
|
"tox_events.h",
|
|
],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":bin_pack",
|
|
":bin_unpack",
|
|
":ccompat",
|
|
":logger",
|
|
":mem",
|
|
":tox",
|
|
":tox_pack",
|
|
":tox_unpack",
|
|
"//c-toxcore/third_party:cmp",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "tox_events_test",
|
|
size = "small",
|
|
srcs = ["tox_events_test.cc"],
|
|
deps = [
|
|
":crypto_core",
|
|
":tox",
|
|
":tox_events",
|
|
"@com_google_googletest//:gtest",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_fuzz_test(
|
|
name = "tox_events_fuzz_test",
|
|
size = "small",
|
|
srcs = ["tox_events_fuzz_test.cc"],
|
|
corpus = ["//tools/toktok-fuzzer/corpus:tox_events_fuzz_test"],
|
|
deps = [
|
|
":tox_dispatch",
|
|
":tox_events",
|
|
"//c-toxcore/testing/fuzzing:fuzz_support",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "tox_dispatch",
|
|
srcs = ["tox_dispatch.c"],
|
|
hdrs = ["tox_dispatch.h"],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":attributes",
|
|
":ccompat",
|
|
":tox",
|
|
":tox_events",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "toxcore",
|
|
actual = ":tox_dispatch",
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
)
|
|
|
|
sh_library(
|
|
name = "cimple_files",
|
|
srcs = glob([
|
|
"events/*.c",
|
|
"events/*.h",
|
|
"*.c",
|
|
"*.h",
|
|
]),
|
|
visibility = ["//c-toxcore/testing:__pkg__"],
|
|
)
|