-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add hostapd interaction interface: define and implement basic commands #30
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abeltrano
force-pushed
the
wpactrlsettings
branch
from
November 22, 2023 05:01
182428e
to
09b67d8
Compare
abeltrano
force-pushed
the
wpactrlsettings
branch
from
November 22, 2023 05:02
09b67d8
to
fcd804c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes a wide range of changes to the codebase related to the
Hostapd
protocol, cache management, response handling, and testing. The most important changes include adding new definitions and structures related to theHostapd
protocol, implementing theHostapd
class with necessary headers and member functions, and adding new methods and attributes to theNotification
class for extracting information from GitHub notifications.Main protocol changes:
linux/wpa-controller/include/Wpa/ProtocolHostapd.hxx
: Added new definitions and structures related to theHostapd
protocol.linux/wpa-controller/Hostapd.cxx
: Implemented theHostapd
class, including necessary headers and member functions for sending commands to the hostapd daemon and handling responses.linux/wpa-controller/include/Wpa/Hostapd.hxx
: Added the declaration of theHostapd
class, providing the necessary member functions to control the hostapd daemon.linux/wpa-controller/ProtocolHostapd.cxx
: Added new functions to convert a string representation of the hostapd interface state to an enum value and to check if a given hostapd interface state is operational.Cache and response handling changes:
linux/wpa-controller/WpaResponse.cxx
: Added two new member functions to theWpaResponse
class,operator bool()
andIsOk()
, for boolean context usage and checking if the response is considered "OK".linux/wpa-controller/include/Wpa/WpaCommandStatus.hxx
: Added a new header file defining a structWpaCommandStatus
that inherits fromWpaCommand
and adds aStatus
member variable of typeHostapdStatus
.linux/wpa-controller/include/Wpa/WpaCommand.hxx
: Modified theWpaCommand
struct to include a default constructor and a constructor that takes astd::string_view
parameter.linux/wpa-controller/WpaCommand.cxx
: Removed theWpaCommand
constructor that takes astd::string_view
parameter.linux/wpa-controller/include/Wpa/WpaResponseStatus.hxx
: Added a new header file defining a structWpaResponseStatus
inheriting fromWpaResponse
and adding a member variableStatus
of typeHostapdStatus
.linux/wpa-controller/include/Wpa/WpaResponse.hxx
: Added additional member functions and a private member variable to theWpaResponse
struct, including a constructor, an implicit conversion operator, and two member functionsIsOk()
andFailed()
.linux/wpa-controller/include/Wpa/ProtocolWpa.hxx
: Added a new header file defining a structProtocolWpa
that contains constants for various command and response payloads used in the WPA daemon protocol.linux/wpa-controller/include/Wpa/IHostapd.hxx
: Added a new header file defining an interfaceIHostapd
for interacting with the hostapd daemon.Testing and build system changes:
test/models/notification/cleaner_test.rb
: Added new tests to theNotification::Cleaner
class. (Fdc3fd42R1)linux/wpa-controller/CMakeLists.txt
: Added new source files and header files to thewpa-controller
target, as well as new include directories. [1] [2]src/shared/notstd/CMakeLists.txt
: Added a new library target callednotstd
and included theExceptions.hxx
header file in the target sources.src/shared/CMakeLists.txt
: Added a new subdirectorynotstd
to thesrc/shared
directory.tests/unit/linux/wpa-controller/CMakeLists.txt
: Added a new source fileTestHostapd.cxx
to thewpa-controller-test-unit
target.linux/wpa-controller/WpaCommandStatus.cxx
: Added a new source file defining the constructor for theWpaCommandStatus
struct.linux/wpa-controller/ProtocolWpa.cxx
: Added a new source file defining two static member functions for checking if a given response starts with "OK" or "FAIL" payloads.src/shared/notstd/include/notstd/Exceptions.hxx
: Added a new header file defining a new exception classNotImplementedException
.