mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 15:32:52 +00:00
added ORBIS_NET_CTL_INFO_DEVICE , ORBIS_NET_CTL_INFO_MTU
This commit is contained in:
parent
00503b9357
commit
8b99d2ba1b
@ -12,11 +12,13 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <common/singleton.h>
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/libraries/error_codes.h"
|
#include "core/libraries/error_codes.h"
|
||||||
#include "core/libraries/libs.h"
|
#include "core/libraries/libs.h"
|
||||||
#include "core/libraries/network/net_ctl_codes.h"
|
#include "core/libraries/network/net_ctl_codes.h"
|
||||||
#include "core/libraries/network/netctl.h"
|
#include "core/libraries/network/netctl.h"
|
||||||
|
#include "net_util.h"
|
||||||
|
|
||||||
namespace Libraries::NetCtl {
|
namespace Libraries::NetCtl {
|
||||||
|
|
||||||
@ -162,6 +164,14 @@ int PS4_SYSV_ABI sceNetCtlGetInfo(int code, OrbisNetCtlInfo* info) {
|
|||||||
case ORBIS_NET_CTL_INFO_DEVICE:
|
case ORBIS_NET_CTL_INFO_DEVICE:
|
||||||
info->device = ORBIS_NET_CTL_DEVICE_WIRED;
|
info->device = ORBIS_NET_CTL_DEVICE_WIRED;
|
||||||
break;
|
break;
|
||||||
|
case ORBIS_NET_CTL_INFO_ETHER_ADDR: {
|
||||||
|
auto* netinfo = Common::Singleton<NetUtil::NetUtilInternal>::Instance();
|
||||||
|
netinfo->RetrieveEthernetAddr();
|
||||||
|
memcpy(info->ether_addr.data, netinfo->GetEthernetAddr().data(), 6);
|
||||||
|
} break;
|
||||||
|
case ORBIS_NET_CTL_INFO_MTU:
|
||||||
|
info->mtu = 1500; // default value
|
||||||
|
break;
|
||||||
case ORBIS_NET_CTL_INFO_LINK:
|
case ORBIS_NET_CTL_INFO_LINK:
|
||||||
info->link = ORBIS_NET_CTL_LINK_DISCONNECTED;
|
info->link = ORBIS_NET_CTL_LINK_DISCONNECTED;
|
||||||
break;
|
break;
|
||||||
@ -183,6 +193,7 @@ int PS4_SYSV_ABI sceNetCtlGetInfo(int code, OrbisNetCtlInfo* info) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(Lib_NetCtl, "{} unsupported code", code);
|
LOG_ERROR(Lib_NetCtl, "{} unsupported code", code);
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,26 @@ union OrbisNetCtlInfo {
|
|||||||
|
|
||||||
// GetInfo codes
|
// GetInfo codes
|
||||||
constexpr int ORBIS_NET_CTL_INFO_DEVICE = 1;
|
constexpr int ORBIS_NET_CTL_INFO_DEVICE = 1;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_ETHER_ADDR = 2;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_MTU = 3;
|
||||||
constexpr int ORBIS_NET_CTL_INFO_LINK = 4;
|
constexpr int ORBIS_NET_CTL_INFO_LINK = 4;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_BSSID = 5;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_SSID = 6;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_WIFI_SECURITY = 7;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_RSSI_DBM = 8;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_RSSI_PERCENTAGE = 9;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_CHANNEL = 10;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_IP_CONFIG = 11;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_DHCP_HOSTNAME = 12;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_PPPOE_AUTH_NAME = 13;
|
||||||
constexpr int ORBIS_NET_CTL_INFO_IP_ADDRESS = 14;
|
constexpr int ORBIS_NET_CTL_INFO_IP_ADDRESS = 14;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_NETMASK = 15;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_DEFAULT_ROUTE = 16;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_PRIMARY_DNS = 17;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_SECONDARY_DNS = 18;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_HTTP_PROXY_CONFIG = 19;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_HTTP_PROXY_SERVER = 20;
|
||||||
|
constexpr int ORBIS_NET_CTL_INFO_HTTP_PROXY_PORT = 21;
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceNetBweCheckCallbackIpcInt();
|
int PS4_SYSV_ABI sceNetBweCheckCallbackIpcInt();
|
||||||
int PS4_SYSV_ABI sceNetBweClearEventIpcInt();
|
int PS4_SYSV_ABI sceNetBweClearEventIpcInt();
|
||||||
|
Loading…
Reference in New Issue
Block a user