mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-12 19:27:47 +00:00
network: retrieve subnet mask and gateway info
This commit is contained in:
parent
66bc5a27ba
commit
363236e2c6
5 changed files with 137 additions and 24 deletions
|
@ -50,11 +50,6 @@ void Finalize() {
|
|||
WSACleanup();
|
||||
}
|
||||
|
||||
constexpr IPv4Address TranslateIPv4(in_addr addr) {
|
||||
auto& bytes = addr.S_un.S_un_b;
|
||||
return IPv4Address{bytes.s_b1, bytes.s_b2, bytes.s_b3, bytes.s_b4};
|
||||
}
|
||||
|
||||
sockaddr TranslateFromSockAddrIn(SockAddrIn input) {
|
||||
sockaddr_in result;
|
||||
|
||||
|
@ -141,12 +136,6 @@ void Initialize() {}
|
|||
|
||||
void Finalize() {}
|
||||
|
||||
constexpr IPv4Address TranslateIPv4(in_addr addr) {
|
||||
const u32 bytes = addr.s_addr;
|
||||
return IPv4Address{static_cast<u8>(bytes), static_cast<u8>(bytes >> 8),
|
||||
static_cast<u8>(bytes >> 16), static_cast<u8>(bytes >> 24)};
|
||||
}
|
||||
|
||||
sockaddr TranslateFromSockAddrIn(SockAddrIn input) {
|
||||
sockaddr_in result;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue