diff --git a/src/core/libraries/network/net_ctl_codes.h b/src/core/libraries/network/net_ctl_codes.h index a38565c1..0dac4201 100644 --- a/src/core/libraries/network/net_ctl_codes.h +++ b/src/core/libraries/network/net_ctl_codes.h @@ -26,3 +26,11 @@ constexpr int ORBIS_NET_CTL_STATE_IPOBTAINED = 3; constexpr int ORBIS_NET_CTL_EVENT_TYPE_DISCONNECTED = 1; constexpr int ORBIS_SCE_NET_CTL_EVENT_TYPE_DISCONNECT_REQ_FINISHED = 2; constexpr int ORBIS_NET_CTL_EVENT_TYPE_IPOBTAINED = 3; + +// get info codes +// device +constexpr int ORBIS_NET_CTL_DEVICE_WIRED = 0; +constexpr int ORBIS_NET_CTL_DEVICE_WIRELESS = 1; +// link +constexpr int ORBIS_NET_CTL_LINK_DISCONNECTED = 0; +constexpr int ORBIS_NET_CTL_LINK_CONNECTED = 1; diff --git a/src/core/libraries/network/net_obj.cpp b/src/core/libraries/network/net_obj.cpp new file mode 100644 index 00000000..e69de29b diff --git a/src/core/libraries/network/net_obj.h b/src/core/libraries/network/net_obj.h new file mode 100644 index 00000000..e69de29b diff --git a/src/core/libraries/network/netctl.cpp b/src/core/libraries/network/netctl.cpp index 3ecdde77..32d55b23 100644 --- a/src/core/libraries/network/netctl.cpp +++ b/src/core/libraries/network/netctl.cpp @@ -149,10 +149,10 @@ int PS4_SYSV_ABI sceNetCtlGetIfStat() { int PS4_SYSV_ABI sceNetCtlGetInfo(int code, OrbisNetCtlInfo* info) { switch (code) { case ORBIS_NET_CTL_INFO_DEVICE: - info->device = 0; + info->device = ORBIS_NET_CTL_DEVICE_WIRED; break; case ORBIS_NET_CTL_INFO_LINK: - info->link = 0; // disconnected + info->link = ORBIS_NET_CTL_LINK_DISCONNECTED; break; default: LOG_ERROR(Lib_NetCtl, "{} unsupported code", code); @@ -187,7 +187,10 @@ int PS4_SYSV_ABI sceNetCtlGetNetEvConfigInfoIpcInt() { } int PS4_SYSV_ABI sceNetCtlGetResult(int eventType, int* errorCode) { - LOG_ERROR(Lib_NetCtl, "(STUBBED) called eventType = {} ", eventType); + if (!errorCode) { + return ORBIS_NET_CTL_ERROR_INVALID_ADDR; + } + LOG_DEBUG(Lib_NetCtl, "(STUBBED) called eventType = {} ", eventType); *errorCode = 0; return ORBIS_OK; }