mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -04:00
dns.mitm: add GetAddrInfo redir, AtmosphereReloadHostsFile, debug logging control
This commit is contained in:
parent
97aa209c43
commit
1306d03136
22 changed files with 1093 additions and 56 deletions
|
@ -17,6 +17,9 @@
|
|||
|
||||
namespace ams::socket::impl {
|
||||
|
||||
Errno GetLastError();
|
||||
void SetLastError(Errno err);
|
||||
|
||||
u32 InetHtonl(u32 host);
|
||||
u16 InetHtons(u16 host);
|
||||
u32 InetNtohl(u32 net);
|
||||
|
|
|
@ -38,6 +38,16 @@ namespace ams::socket::impl {
|
|||
return ams::Free(ptr);
|
||||
}
|
||||
|
||||
Errno GetLastError() {
|
||||
/* TODO: check that client library is initialized. */
|
||||
return static_cast<Errno>(errno);
|
||||
}
|
||||
|
||||
void SetLastError(Errno err) {
|
||||
/* TODO: check that client library is initialized. */
|
||||
errno = static_cast<int>(err);
|
||||
}
|
||||
|
||||
u32 InetHtonl(u32 host) {
|
||||
if constexpr (util::IsBigEndian()) {
|
||||
return host;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue