Skip to content

Commit

Permalink
5.7.2.9 add support ip v6
Browse files Browse the repository at this point in the history
  • Loading branch information
bha-evs committed Aug 5, 2024
1 parent d987530 commit df6214a
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 90 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ include(cmake/fetch_content.cmake)
# in code coverage computation as they are test programs themselves.
set(EXTRA_COVERAGE_EXCLUSION "\'${CMAKE_CURRENT_SOURCE_DIR}/integration/*\'")

project(bofstd VERSION 5.7.2.8)
project(bofstd VERSION 5.7.2.9)

if (EMSCRIPTEN)
message("Force pthread detection for BofStd compilation under EMSCRIPTEN")
Expand Down
8 changes: 6 additions & 2 deletions lib/include/bofstd/bofsocketos.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <ws2tcpip.h>
#define BOF_POLL_RDHUP 0 // does not exist in _WIN32
#define socklen_t int
#define ifaddrs BOF::BOF_NETWORK_INTERFACE_PARAM
//#define ifaddrs BOF::BOF_NETWORK_INTERFACE_PARAM
#else
#define SOCKET_ERROR -1

Expand Down Expand Up @@ -159,6 +159,7 @@ typedef struct in_addr BOF_IN_ADDR;
typedef struct in6_addr BOF_IN_ADDR6;

struct BOF_SOCKET_ADDRESS;
BOFSTD_EXPORT bool Bof_IsItAnIpV6Address(const std::string &_rIpPortV6Address_S, std::string &_rIpAddress_S, uint16_t &_Port_U16);
BOFSTD_EXPORT BOFERR Bof_IpAddressToSocketAddress(const std::string &_rIpAddress_S, BOF_SOCKET_ADDRESS &_rIpAddress_X);
BOFSTD_EXPORT std::string Bof_SocketAddressToString(const BOF_SOCKET_ADDRESS &_rIpAddress_X, bool _ShowProtocol_B, bool _ShowPortNumber_B);

Expand Down Expand Up @@ -734,7 +735,8 @@ struct BOF_NETWORK_INTERFACE_PARAM
std::string IpAddress_S;
std::string IpMask_S;
std::string IpBroadcast_S;

BOF_SOCKADDR_IN SockAddr4_X;
BOF_SOCKADDR_IN6 SockAddr6_X;
BOF_INTERFACE_INFO Info_X;

BOF_NETWORK_INTERFACE_PARAM()
Expand All @@ -749,6 +751,8 @@ struct BOF_NETWORK_INTERFACE_PARAM
IpAddress_S = "";
IpMask_S = "";
IpBroadcast_S = "";
memset(&SockAddr4_X, 0, sizeof(SockAddr4_X));
memset(&SockAddr6_X, 0, sizeof(SockAddr6_X));
}
};

Expand Down
Loading

0 comments on commit df6214a

Please sign in to comment.