Add Discovery and Wakeup for PS5

This commit is contained in:
Florian Märkl 2020-12-25 14:48:09 +01:00
commit 8904c86a6d
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
9 changed files with 42 additions and 19 deletions

View file

@ -142,7 +142,7 @@ CHIAKI_EXPORT int chiaki_cli_cmd_discover(ChiakiLog *log, int argc, char *argv[]
return 1;
}
((struct sockaddr_in *)host_addr)->sin_port = htons(CHIAKI_DISCOVERY_PORT); // TODO: IPv6
((struct sockaddr_in *)host_addr)->sin_port = htons(CHIAKI_DISCOVERY_PORT_PS4); // TODO: IPv6, PS5, should probably use the service
ChiakiDiscoveryPacket packet;
memset(&packet, 0, sizeof(packet));
@ -151,7 +151,7 @@ CHIAKI_EXPORT int chiaki_cli_cmd_discover(ChiakiLog *log, int argc, char *argv[]
chiaki_discovery_send(&discovery, &packet, host_addr, host_addr_len);
while(1)
sleep(1);
sleep(1); // TODO: wtf
return 0;
}

View file

@ -73,5 +73,5 @@ CHIAKI_EXPORT int chiaki_cli_cmd_wakeup(ChiakiLog *log, int argc, char *argv[])
uint64_t credential = (uint64_t)strtoull(arguments.registkey, NULL, 16);
return chiaki_discovery_wakeup(log, NULL, arguments.host, credential);
return chiaki_discovery_wakeup(log, NULL, arguments.host, credential, false);
}