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