Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Linux wifi-lan medium implementation #2983

Open
wants to merge 148 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
a12d1ed
Added Bazel Build directories to .gitignore
proatgram May 18, 2023
bbfc299
Started implementing Linux specific platform
proatgram May 20, 2023
91da4cd
Merge branch 'google:main' into linux-platform
proatgram May 20, 2023
688c7fd
Fix memory leak with getting interfaces
proatgram May 20, 2023
0d0f3dc
Added program data directories to Linux platform device_info
proatgram May 21, 2023
0466523
Implemented Linux equivalent to Windows file_path*
proatgram May 21, 2023
ca8efbf
Initial sketch.
vibhavp Jul 22, 2023
33bd137
Add additional methods for DeviceInfo.
vibhavp Jul 22, 2023
19240c5
Use cleanup attribute for freeing libsystemd resources.
vibhavp Jul 23, 2023
1f6a9cc
Add bluetooth_adapter implementation.
vibhavp Jul 23, 2023
ab3ec3d
More bluetooth medium code.
vibhavp Jul 29, 2023
a891e8b
Add BluetoothServerSocket implementation.
vibhavp Aug 1, 2023
24d1021
Add additional code for implementing BluetoothClassicMedium.
vibhavp Aug 1, 2023
ac121f3
Implemented some more Linux equivalents
proatgram Aug 2, 2023
5644e97
Refactor
vibhavp Aug 3, 2023
e8c5a24
Add additional libraries.
vibhavp Aug 3, 2023
b0484fd
Implemented Windows implementation compliant Linux `http_loader`
proatgram Aug 4, 2023
0efd39c
Added implementation for test_utils
proatgram Aug 6, 2023
632b80a
Implemented scheduled_executor
proatgram Aug 6, 2023
9872919
Implemented preferences_manager and helpers
proatgram Aug 7, 2023
2f2c08c
Implemented submittable_executor and some other missed files
proatgram Aug 7, 2023
295f9d6
Walk through InterfacesAdded data correctly.
vibhavp Aug 9, 2023
f9fb3d2
Rewrite dbus code using sdbus-c++
vibhavp Aug 15, 2023
9b0f4c2
Remove hedron_compile_commands.
vibhavp Aug 15, 2023
4f90fa4
Add initial wifi medium code.
vibhavp Aug 15, 2023
1caa90d
Use NetworkManager object for checking connectivity.
vibhavp Aug 16, 2023
fc0eed5
Simplify Bluetooth code.
vibhavp Aug 16, 2023
000c864
Implemented a TimerQueue class and a Timer class
proatgram Aug 17, 2023
bfe5db2
Added base implementation for input_file and output_file
proatgram Aug 17, 2023
1ff9954
Implemented missing implementation files
proatgram Aug 17, 2023
8daff56
Code dump.
vibhavp Aug 21, 2023
d58f8ca
Add linux implementation
vibhavp Aug 21, 2023
dd13c8b
Add additional WiFi code.
vibhavp Aug 22, 2023
3a4393d
Add more wifi code.
vibhavp Aug 23, 2023
d758621
Add BluezObjectManager.
vibhavp Aug 23, 2023
d8b04cd
Add headers to library comm.
vibhavp Aug 23, 2023
24474a0
Add additional impls.
vibhavp Aug 23, 2023
3034f35
Merge remote-tracking branch 'proatgram/linux-platform'
vibhavp Aug 23, 2023
4908216
Use XDG_RUNTIME_PATH for GetTemporaryPath
vibhavp Aug 23, 2023
f1c3e0d
Use sdbus-c++ glue proxies for device info.
vibhavp Aug 23, 2023
52121a5
Implement remaining platform methods.
vibhavp Aug 26, 2023
e6d273a
Add additional files.
vibhavp Aug 26, 2023
6e4c035
Add ConnectedToWifi.
vibhavp Aug 26, 2023
ef666b2
Add Wifi Direct medium
vibhavp Aug 26, 2023
55847d7
Add WifiDirectSocket methods.
vibhavp Aug 26, 2023
4417dd7
Add Wifi Direct files.
vibhavp Aug 26, 2023
c7bc1a3
Add method ConnectedToWifi.
vibhavp Aug 27, 2023
96ae9cb
GetDownloadPathInternal: Construct DeviceInfo correctly.
vibhavp Aug 27, 2023
8b3c1c2
GetLocalAppDataPath: Use XDG_CONFIG_HOME.
vibhavp Aug 27, 2023
4435620
initBusConnections: Start an async event loop after creating connecti…
vibhavp Aug 27, 2023
d2c88f2
Add CreatePreferencesManager implementation.
vibhavp Aug 27, 2023
4819e2c
Add missing headers.
vibhavp Aug 27, 2023
3ad3a34
Fix compilation errors.
vibhavp Aug 27, 2023
69cad9b
Comment out wifi scan callback code
vibhavp Aug 27, 2023
c505262
Merge remote-tracking branch 'upstream/main'
vibhavp Aug 27, 2023
0376b90
Add support for inhibition locks.
vibhavp Aug 27, 2023
d13621f
Fix deps.
vibhavp Aug 27, 2023
89ea689
DeviceInfo: Register and unregister screen lock listeners.
vibhavp Aug 27, 2023
5910a51
Use /com/google/nearby as the object path.
vibhavp Aug 27, 2023
a46c033
Fix more compilation errors.
vibhavp Aug 27, 2023
e07de69
Rewrite timer to use POSIX timers.
vibhavp Aug 27, 2023
e4082a1
Fix signatures.
vibhavp Aug 27, 2023
300aa83
Use bus name only for default connection.
vibhavp Aug 27, 2023
c9ebae1
Synchronize writes to std::cout.
vibhavp Aug 27, 2023
5698804
Add login_manager_client_glue.h
vibhavp Aug 29, 2023
17955ae
Add bluetooth_classic_server_socket.cc
vibhavp Aug 29, 2023
9b1a494
Add org.freedesktop.Accounts.User.xml.
vibhavp Aug 29, 2023
220208a
Rewrite ThreadPool.
vibhavp Aug 29, 2023
7817611
Minor refactor.
vibhavp Aug 29, 2023
5a7515d
StartAdvertising: Let avahi handle the host name.
vibhavp Aug 29, 2023
df41f81
Profile: Log profile object path after construction.
vibhavp Aug 29, 2023
2f97953
Register: Create a BlueZ profile object before registering it.
vibhavp Aug 29, 2023
57f88d0
Start the thread pool on construction.
vibhavp Aug 29, 2023
64f1da3
profile_object_path: Ensure the object name is valid.
vibhavp Aug 29, 2023
d4f3e72
Add dummy implementations for BLE.
vibhavp Aug 29, 2023
48f17cf
Add ble headers.
vibhavp Aug 29, 2023
e6e73c0
BluetoothServerSocket: Fix lifetime issues with service_uuid.
vibhavp Aug 29, 2023
1911454
Free resources on destruction.
vibhavp Aug 29, 2023
e9d1592
Allow advertising multiple services.
vibhavp Aug 29, 2023
68c8efd
Add log messages for freeing service browsers and entry groups.
vibhavp Aug 29, 2023
f1a5f14
Separate BluetoothAdapter into Adapter and BluezAdapter classes.
vibhavp Aug 29, 2023
f42aca9
Provide Avahi Server object to ServiceBrowser objects.
vibhavp Aug 29, 2023
d558e73
Pass the correct flags to ResolveService.
vibhavp Aug 29, 2023
3e936b9
Remove discovery_cb_lock_, as it can cause deadlocks.
vibhavp Aug 29, 2023
671fcf2
ServiceBrowser: Ignore local services.
vibhavp Aug 29, 2023
6800141
Add ble_medium.h, ble_v2_medium.h.
vibhavp Aug 29, 2023
2d7197e
Add connectionsd.
vibhavp Aug 29, 2023
8198275
Print: Avoid memory leaks.
vibhavp Aug 29, 2023
fae8c4f
Use the correct syslog identifier.
vibhavp Aug 29, 2023
02fdbb5
Use the correct object name for LoginManager.
vibhavp Aug 29, 2023
afeecca
Store a copy of the last known name and address to use for lost devices.
vibhavp Aug 29, 2023
ef3ea70
Simplify ObjectManager listener code.
vibhavp Aug 29, 2023
6c79b1c
Exclude linux related packages.
vibhavp Aug 29, 2023
df00801
Add copyright notice headers.
vibhavp Aug 29, 2023
393c135
Add copyright headers.
vibhavp Aug 29, 2023
dc2d8cd
Move dbus stubs to generated package.
vibhavp Aug 29, 2023
039d992
Minor refactoring.
vibhavp Aug 29, 2023
b4bbae4
Merge branch 'google:main' into main
vibhavp Aug 29, 2023
b34611b
Merge remote-tracking branch 'google/main'
vibhavp Aug 30, 2023
808ed39
clang-format
vibhavp Aug 30, 2023
a5c5068
Rewrite NetworkManager state to use an enum type for clarity.
vibhavp Aug 30, 2023
d8b0c25
Minor refactoring.
vibhavp Aug 30, 2023
0191f6b
Split off most of NetworkManager code into their own files.
vibhavp Aug 30, 2023
b27a959
Refactor
vibhavp Aug 30, 2023
99f9a4e
Use absl::flat_hash_map for known_access_points_.
vibhavp Aug 30, 2023
59594c4
GetInformation: Prevent potential UB while getting AP frequency
vibhavp Aug 30, 2023
4130874
GetIP4Config: Avoid unnecessary lookups for unrelated connections.
vibhavp Aug 30, 2023
adb92ab
Print: Fix crash because of the buffer being freed incorrectly.
vibhavp Aug 30, 2023
0b7b9e9
Reuse the Windows mutex implementation.
vibhavp Aug 31, 2023
b702bda
Disable Start/StopWifiDirect for now.
vibhavp Aug 31, 2023
0b3accb
Move stream implementation to its own file.
vibhavp Sep 1, 2023
20589b4
Register: Set options to allow RFCOMM socket creation.
vibhavp Sep 1, 2023
d6b150d
Add BluetoothInputStream, BluetoothOutputStream.
vibhavp Sep 1, 2023
d2eee1f
StartWifiHotspot: Generate connection UUID in the correct format.
vibhavp Sep 1, 2023
07ac2f1
WiFiLanSocket: Don't store an extra copy of the FD.
vibhavp Sep 1, 2023
4619308
Add support for request cancellation to GetServiceRecordFD.
vibhavp Sep 1, 2023
bdce878
BluetoothServerSocket: Cancel an ongoing Accept request on Close.
vibhavp Sep 1, 2023
9c41b22
Set the initial value for AtomicBoolean.
vibhavp Sep 1, 2023
c8c1e87
Minor refactor.
vibhavp Sep 1, 2023
252964b
ConnectToProfile: log about the connection attempt.
vibhavp Sep 1, 2023
ca2e1c2
Disable AP isolation for softAP
vibhavp Sep 1, 2023
7de62d0
Merge remote-tracking branch 'google/main'
vibhavp Sep 1, 2023
15fef43
Fix indentation.
vibhavp Sep 1, 2023
25a430c
Fix typo.
vibhavp Sep 2, 2023
de5159e
GetOsDeviceName: Use avahi's GetHostNameFqdn
vibhavp Sep 2, 2023
57aedf6
Use CancellationFlagListener to ensure that Accept exits.
vibhavp Sep 2, 2023
4ec7649
Use separate locks for the the thread vector and task queue.
vibhavp Sep 2, 2023
df5800f
Use atexit to cleanup bus connections before exiting.
vibhavp Sep 3, 2023
4bf11c8
Refactor bluetooth code to use shared pointers instead of references.
vibhavp Sep 5, 2023
d960bfc
Add support for sharing DiscoveryCallbacks across BluetoothDevices.
vibhavp Sep 5, 2023
501a77b
Construct BluetoothClassicMedium correctly.
vibhavp Sep 5, 2023
1870555
BluetoothDevice: Inherit from ble_v2::BlePeripheral as well.
vibhavp Sep 5, 2023
7517ba0
Don't request a name for the default bus connection.
vibhavp Sep 6, 2023
e0f601e
Refactor
vibhavp Sep 6, 2023
9b7d627
Add an ObjectManager instance at / for both system and session bus co…
vibhavp Sep 6, 2023
4003ba0
Allow marking/unmarking devices as lost.
vibhavp Sep 8, 2023
bd74133
Set discovery filter to "bredr" before starting discovery.
vibhavp Sep 8, 2023
0a53b9c
Add additional functions.
vibhavp Sep 8, 2023
844e0da
Remove unneeded functions, add UuidFromString.
vibhavp Sep 8, 2023
dd5c6ed
Shutdown: return after shutting down executor.
vibhavp Sep 8, 2023
2bbe5fa
Merged from google/nearby main
kidfromjupiter Oct 22, 2024
120fc13
added walkietalkie example
kidfromjupiter Oct 26, 2024
e91795e
added wifi lan medium implementation for linux
kidfromjupiter Oct 26, 2024
195a404
Removed unnecessary files
kidfromjupiter Oct 26, 2024
151fd44
Removed Walkietalkie example application and connectionsd
kidfromjupiter Oct 26, 2024
e6b23f0
Removed stray bluetooth_adapter files
kidfromjupiter Oct 26, 2024
3c34a10
Removed stray bluetooth_adapter files again
kidfromjupiter Oct 26, 2024
b36c933
Added comments where applicable
kidfromjupiter Oct 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ Cargo.lock

# Bazel
bazel-*

.clwb
19 changes: 13 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_rust", version = "0.42.1")
bazel_dep(name = "bazel_skylib", version = "1.5.0")

bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "com_google_absl")
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
bazel_dep(name = "googletest", version = "1.14.0", repo_name = "com_google_googletest")
bazel_dep(name = "boringssl", version = "0.0.0-20240126-22d349c")

git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "beto-core",
remote = "https://beto-core.googlesource.com/beto-core",
commit = "415bd032561d078720642d52e28fd3bc9d5155d4",
remote = "https://beto-core.googlesource.com/beto-core",
)

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
Expand All @@ -21,6 +21,7 @@ rust.toolchain(
versions = ["1.77.1"],
)
use_repo(rust, "rust_toolchains")

register_toolchains("@rust_toolchains//:all")

crate = use_extension(
Expand All @@ -46,7 +47,6 @@ http_archive(

http_archive(
name = "aappleby_smhasher",
strip_prefix = "smhasher-master",
build_file_content = """
package(default_visibility = ["//visibility:public"])
cc_library(
Expand All @@ -56,12 +56,12 @@ cc_library(
copts = ["-Wno-implicit-fallthrough"],
licenses = ["unencumbered"], # MurmurHash is explicity public-domain
)""",
strip_prefix = "smhasher-master",
urls = ["https://github.com/aappleby/smhasher/archive/master.zip"],
)

http_archive(
name = "nlohmann_json",
strip_prefix = "json-3.10.5",
build_file_content = """
cc_library(
name = "json",
Expand All @@ -72,6 +72,7 @@ cc_library(
visibility = ["//visibility:public"],
alwayslink = True,
)""",
strip_prefix = "json-3.10.5",
urls = [
"https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz",
],
Expand All @@ -85,15 +86,21 @@ cc_library(
# https://github.com/google-research/nisaba
http_archive(
name = "com_google_nisaba",
url = "https://github.com/google-research/nisaba/archive/refs/heads/main.zip",
strip_prefix = "nisaba-main",
url = "https://github.com/google-research/nisaba/archive/refs/heads/main.zip",
)

# -------------------------------------------------------------------------
# Protocol buffer matches (should be part of gmock and gtest, but not yet):
# https://github.com/inazarenko/protobuf-matchers
http_archive(
name = "com_github_protobuf_matchers",
urls = ["https://github.com/inazarenko/protobuf-matchers/archive/refs/heads/master.zip"],
strip_prefix = "protobuf-matchers-master",
urls = ["https://github.com/inazarenko/protobuf-matchers/archive/refs/heads/master.zip"],
)

http_archive(
name = "bazel_pkg_config",
strip_prefix = "bazel_pkg_config-master",
urls = ["https://github.com/cherrry/bazel_pkg_config/archive/master.zip"],
)
Loading