-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from microsoft/wpactrlsockinit
Add ability to send wpa control socket messages
- Loading branch information
Showing
25 changed files
with
1,052 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
#include <Wpa/WpaCommand.hxx> | ||
|
||
using namespace Wpa; | ||
|
||
WpaCommand::WpaCommand(std::string_view data) : | ||
Data(data) | ||
{ | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
#include <Wpa/WpaCore.hxx> | ||
|
||
std::string_view Wpa::GetWpaTypeDaemonBinaryName(WpaType type) noexcept | ||
{ | ||
switch (type) | ||
{ | ||
case WpaType::Hostapd: | ||
return "hostapd"; | ||
case WpaType::WpaSupplicant: | ||
return "wpa_supplicant"; | ||
default: | ||
return "unknown"; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
#include <Wpa/WpaResponse.hxx> | ||
|
||
using namespace Wpa; | ||
|
||
WpaResponse::WpaResponse(std::string_view payload) : | ||
Payload(payload) | ||
{ | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
#ifndef WPA_COMMAND_HXX | ||
#define WPA_COMMAND_HXX | ||
|
||
#include <string_view> | ||
#include <string> | ||
|
||
namespace Wpa | ||
{ | ||
/** | ||
* @brief Object to hold generic command data for a wpa_supplicant or hostapd | ||
* request. | ||
*/ | ||
struct WpaCommand | ||
{ | ||
WpaCommand() = default; | ||
WpaCommand(std::string_view data); | ||
|
||
std::string Data; | ||
}; | ||
} // namespace Wpa | ||
|
||
#endif // WPA_COMMAND_HXX |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
#ifndef WPA_RESPONSE_HXX | ||
#define WPA_RESPONSE_HXX | ||
|
||
#include <string_view> | ||
#include <string> | ||
|
||
namespace Wpa | ||
{ | ||
/** | ||
* @brief Object to hold generic, unparsed data from a wpa_supplicant or hostapd | ||
* command response. | ||
*/ | ||
struct WpaResponse | ||
{ | ||
virtual ~WpaResponse() = default; | ||
|
||
WpaResponse() = default; | ||
WpaResponse(std::string_view payload); | ||
|
||
std::string Payload; | ||
}; | ||
} // namespace Wpa | ||
|
||
#endif // WPA_RESPONSE_HXX |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
add_subdirectory(strings) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
add_library(strings INTERFACE) | ||
|
||
set(STRINGS_PUBLIC_INCLUDE ${CMAKE_CURRENT_LIST_DIR}/include) | ||
set(STRINGS_PUBLIC_INCLUDE_PREFIX ${STRINGS_PUBLIC_INCLUDE}/strings) | ||
|
||
target_sources(strings | ||
PUBLIC | ||
${STRINGS_PUBLIC_INCLUDE_PREFIX}/StringHelpers.hxx | ||
) | ||
|
||
list(APPEND STRINGS_PUBLIC_HEADERS | ||
${STRINGS_PUBLIC_INCLUDE_PREFIX}/StringHelpers.hxx | ||
) | ||
|
||
set_target_properties(strings PROPERTIES | ||
PUBLIC_HEADER "${STRINGS_PUBLIC_HEADERS}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${STRINGS_PUBLIC_INCLUDE}" | ||
) |
Oops, something went wrong.