restarted implementation - draft work

This commit is contained in:
georgemoralis 2025-01-05 10:31:53 +02:00
parent 57bdb6cac2
commit 035ca58994
2 changed files with 18 additions and 12 deletions

View File

@ -550,12 +550,12 @@ int PS4_SYSV_ABI sceNetEpollControl() {
return ORBIS_OK; return ORBIS_OK;
} }
int PS4_SYSV_ABI sceNetEpollCreate() { int PS4_SYSV_ABI sceNetEpollCreate(const char* name, int flags) {
LOG_ERROR(Lib_Net, "(STUBBED) called"); LOG_ERROR(Lib_Net, "(STUBBED) called");
return ORBIS_OK; return ORBIS_OK;
} }
int PS4_SYSV_ABI sceNetEpollDestroy() { int PS4_SYSV_ABI sceNetEpollDestroy(int eid) {
LOG_ERROR(Lib_Net, "(STUBBED) called"); LOG_ERROR(Lib_Net, "(STUBBED) called");
return ORBIS_OK; return ORBIS_OK;
} }
@ -870,9 +870,9 @@ int PS4_SYSV_ABI sceNetResolverConnectDestroy() {
return ORBIS_OK; return ORBIS_OK;
} }
int PS4_SYSV_ABI sceNetResolverCreate() { int PS4_SYSV_ABI sceNetResolverCreate(const char* name, int memid, int flags) {
LOG_ERROR(Lib_Net, "(STUBBED) called"); LOG_ERROR(Lib_Net, "(DUMMY) name = {} memid ={} flags={}", std::string(name), memid, flags);
return ORBIS_OK; return 100; // return a fake resolver id
} }
int PS4_SYSV_ABI sceNetResolverDestroy() { int PS4_SYSV_ABI sceNetResolverDestroy() {
@ -885,8 +885,12 @@ int PS4_SYSV_ABI sceNetResolverGetError() {
return ORBIS_OK; return ORBIS_OK;
} }
int PS4_SYSV_ABI sceNetResolverStartAton() { int PS4_SYSV_ABI sceNetResolverStartAton(int rid, const u32* addr, char* hostname, int hostname_len,
LOG_ERROR(Lib_Net, "(STUBBED) called"); int timeout, int retry, int flags) {
LOG_ERROR(Lib_Net, "rid = {} , hostname_len ={} timeout={} retry={} flags={}", rid,
hostname_len, timeout, retry, flags);
struct hostent* resolved = gethostbyaddr((const char*)addr, hostname_len, AF_INET);
strcpy(hostname, resolved->h_name);
return ORBIS_OK; return ORBIS_OK;
} }
@ -1041,7 +1045,8 @@ int PS4_SYSV_ABI sceNetShutdown() {
} }
int PS4_SYSV_ABI sceNetSocket(const char* name, int family, int type, int protocol) { int PS4_SYSV_ABI sceNetSocket(const char* name, int family, int type, int protocol) {
LOG_ERROR(Lib_Net, "(STUBBED) called"); LOG_ERROR(Lib_Net, "(STUBBED) name = {} family = {} type = {} protocol = {}", std::string(name),
family, type, protocol);
return ORBIS_OK; return ORBIS_OK;
} }

View File

@ -133,8 +133,8 @@ int PS4_SYSV_ABI sceNetDuplicateIpStart();
int PS4_SYSV_ABI sceNetDuplicateIpStop(); int PS4_SYSV_ABI sceNetDuplicateIpStop();
int PS4_SYSV_ABI sceNetEpollAbort(); int PS4_SYSV_ABI sceNetEpollAbort();
int PS4_SYSV_ABI sceNetEpollControl(); int PS4_SYSV_ABI sceNetEpollControl();
int PS4_SYSV_ABI sceNetEpollCreate(); int PS4_SYSV_ABI sceNetEpollCreate(const char* name, int flags);
int PS4_SYSV_ABI sceNetEpollDestroy(); int PS4_SYSV_ABI sceNetEpollDestroy(int eid);
int PS4_SYSV_ABI sceNetEpollWait(); int PS4_SYSV_ABI sceNetEpollWait();
int* PS4_SYSV_ABI sceNetErrnoLoc(); int* PS4_SYSV_ABI sceNetErrnoLoc();
int PS4_SYSV_ABI sceNetEtherNtostr(); int PS4_SYSV_ABI sceNetEtherNtostr();
@ -196,10 +196,11 @@ int PS4_SYSV_ABI sceNetResolverConnect();
int PS4_SYSV_ABI sceNetResolverConnectAbort(); int PS4_SYSV_ABI sceNetResolverConnectAbort();
int PS4_SYSV_ABI sceNetResolverConnectCreate(); int PS4_SYSV_ABI sceNetResolverConnectCreate();
int PS4_SYSV_ABI sceNetResolverConnectDestroy(); int PS4_SYSV_ABI sceNetResolverConnectDestroy();
int PS4_SYSV_ABI sceNetResolverCreate(); int PS4_SYSV_ABI sceNetResolverCreate(const char* name, int memid, int flags);
int PS4_SYSV_ABI sceNetResolverDestroy(); int PS4_SYSV_ABI sceNetResolverDestroy();
int PS4_SYSV_ABI sceNetResolverGetError(); int PS4_SYSV_ABI sceNetResolverGetError();
int PS4_SYSV_ABI sceNetResolverStartAton(); int PS4_SYSV_ABI sceNetResolverStartAton(int rid, const u32* addr, char* hostname, int hostname_len,
int timeout, int retry, int flags);
int PS4_SYSV_ABI sceNetResolverStartAton6(); int PS4_SYSV_ABI sceNetResolverStartAton6();
int PS4_SYSV_ABI sceNetResolverStartNtoa(); int PS4_SYSV_ABI sceNetResolverStartNtoa();
int PS4_SYSV_ABI sceNetResolverStartNtoa6(); int PS4_SYSV_ABI sceNetResolverStartNtoa6();