xref: /aosp_15_r20/tools/netsim/rust/hostapd-rs/src/lib.rs (revision cf78ab8cffb8fc9207af348f23af247fb04370a6)
1*cf78ab8cSAndroid Build Coastguard Worker // Copyright 2024 Google LLC
2*cf78ab8cSAndroid Build Coastguard Worker //
3*cf78ab8cSAndroid Build Coastguard Worker // Licensed under the Apache License, Version 2.0 (the "License");
4*cf78ab8cSAndroid Build Coastguard Worker // you may not use this file except in compliance with the License.
5*cf78ab8cSAndroid Build Coastguard Worker // You may obtain a copy of the License at
6*cf78ab8cSAndroid Build Coastguard Worker //
7*cf78ab8cSAndroid Build Coastguard Worker //     https://www.apache.org/licenses/LICENSE-2.0
8*cf78ab8cSAndroid Build Coastguard Worker //
9*cf78ab8cSAndroid Build Coastguard Worker // Unless required by applicable law or agreed to in writing, software
10*cf78ab8cSAndroid Build Coastguard Worker // distributed under the License is distributed on an "AS IS" BASIS,
11*cf78ab8cSAndroid Build Coastguard Worker // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*cf78ab8cSAndroid Build Coastguard Worker // See the License for the specific language governing permissions and
13*cf78ab8cSAndroid Build Coastguard Worker // limitations under the License.
14*cf78ab8cSAndroid Build Coastguard Worker 
15*cf78ab8cSAndroid Build Coastguard Worker //! # hostapd-rs
16*cf78ab8cSAndroid Build Coastguard Worker //!
17*cf78ab8cSAndroid Build Coastguard Worker //! This crate provides a Rust interface to the `hostapd` C library, allowing you to manage WiFi access points
18*cf78ab8cSAndroid Build Coastguard Worker //! and perform various wireless networking tasks directly from your Rust code.
19*cf78ab8cSAndroid Build Coastguard Worker //!
20*cf78ab8cSAndroid Build Coastguard Worker //! It consists of two main modules:
21*cf78ab8cSAndroid Build Coastguard Worker //!
22*cf78ab8cSAndroid Build Coastguard Worker //! * **`hostapd`:** This module provides a high-level and safe interface to interact with the `hostapd` process.
23*cf78ab8cSAndroid Build Coastguard Worker //!   It uses separate threads for managing the `hostapd` process and handling its responses, ensuring efficient
24*cf78ab8cSAndroid Build Coastguard Worker //!   and non-blocking communication.
25*cf78ab8cSAndroid Build Coastguard Worker //! * **`hostapd_sys`:** This module contains the low-level C FFI bindings to the `hostapd` library. It is
26*cf78ab8cSAndroid Build Coastguard Worker //!   automatically generated using `rust-bindgen` and provides platform-specific bindings for Linux, macOS, and Windows.
27*cf78ab8cSAndroid Build Coastguard Worker //!
28*cf78ab8cSAndroid Build Coastguard Worker 
29*cf78ab8cSAndroid Build Coastguard Worker pub mod hostapd;
30*cf78ab8cSAndroid Build Coastguard Worker pub mod hostapd_sys;
31