More cleaning.
This commit is contained in:
parent
69bb04f79f
commit
33761c0b65
|
@ -67,7 +67,6 @@ CWII_IPC_HLE_Device_es::CWII_IPC_HLE_Device_es(u32 _DeviceID, const std::string&
|
||||||
static u8 key_sd [0x10] = {0xab, 0x01, 0xb9, 0xd8, 0xe1, 0x62, 0x2b, 0x08, 0xaf, 0xba, 0xd8, 0x4d, 0xbf, 0xc2, 0xa5, 0x5d};
|
static u8 key_sd [0x10] = {0xab, 0x01, 0xb9, 0xd8, 0xe1, 0x62, 0x2b, 0x08, 0xaf, 0xba, 0xd8, 0x4d, 0xbf, 0xc2, 0xa5, 0x5d};
|
||||||
static u8 key_ecc [0x1e] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
|
static u8 key_ecc [0x1e] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
|
||||||
static u8 key_empty[0x10] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
static u8 key_empty[0x10] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
static u8 key_ecc_r[0x1e] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
|
|
||||||
|
|
||||||
// default key table
|
// default key table
|
||||||
u8* CWII_IPC_HLE_Device_es::keyTable[11] = {
|
u8* CWII_IPC_HLE_Device_es::keyTable[11] = {
|
||||||
|
|
|
@ -611,7 +611,6 @@ bool CWII_IPC_HLE_Device_net_ip_top::Close(u32 _CommandAddress, bool _bForce)
|
||||||
|
|
||||||
static int inet_pton(const char *src, unsigned char *dst)
|
static int inet_pton(const char *src, unsigned char *dst)
|
||||||
{
|
{
|
||||||
static const char digits[] = "0123456789";
|
|
||||||
int saw_digit, octets;
|
int saw_digit, octets;
|
||||||
char ch;
|
char ch;
|
||||||
unsigned char tmp[4], *tp;
|
unsigned char tmp[4], *tp;
|
||||||
|
@ -917,9 +916,9 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtl(u32 _CommandAddress)
|
||||||
|
|
||||||
case IOCTL_SO_INETNTOP:
|
case IOCTL_SO_INETNTOP:
|
||||||
{
|
{
|
||||||
u32 af = Memory::Read_U32(BufferIn);
|
//u32 af = Memory::Read_U32(BufferIn);
|
||||||
//u32 validAddress = Memory::Read_U32(BufferIn + 4);
|
//u32 validAddress = Memory::Read_U32(BufferIn + 4);
|
||||||
u32 src = Memory::Read_U32(BufferIn + 8);
|
//u32 src = Memory::Read_U32(BufferIn + 8);
|
||||||
char ip_s[16];
|
char ip_s[16];
|
||||||
sprintf(ip_s, "%i.%i.%i.%i",
|
sprintf(ip_s, "%i.%i.%i.%i",
|
||||||
Memory::Read_U8(BufferIn + 8),
|
Memory::Read_U8(BufferIn + 8),
|
||||||
|
@ -1126,8 +1125,8 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtlV(u32 CommandAddress)
|
||||||
u32 _BufferIn = 0, _BufferIn2 = 0, _BufferIn3 = 0;
|
u32 _BufferIn = 0, _BufferIn2 = 0, _BufferIn3 = 0;
|
||||||
u32 BufferInSize = 0, BufferInSize2 = 0, BufferInSize3 = 0;
|
u32 BufferInSize = 0, BufferInSize2 = 0, BufferInSize3 = 0;
|
||||||
|
|
||||||
u32 _BufferOut = 0, _BufferOut2 = 0, _BufferOut3 = 0;
|
u32 _BufferOut = 0, _BufferOut2 = 0;
|
||||||
u32 BufferOutSize = 0, BufferOutSize2 = 0, BufferOutSize3 = 0;
|
u32 BufferOutSize = 0, BufferOutSize2 = 0;
|
||||||
|
|
||||||
if (CommandBuffer.InBuffer.size() > 0)
|
if (CommandBuffer.InBuffer.size() > 0)
|
||||||
{
|
{
|
||||||
|
@ -1155,11 +1154,6 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtlV(u32 CommandAddress)
|
||||||
_BufferOut2 = CommandBuffer.PayloadBuffer.at(1).m_Address;
|
_BufferOut2 = CommandBuffer.PayloadBuffer.at(1).m_Address;
|
||||||
BufferOutSize2 = CommandBuffer.PayloadBuffer.at(1).m_Size;
|
BufferOutSize2 = CommandBuffer.PayloadBuffer.at(1).m_Size;
|
||||||
}
|
}
|
||||||
if (CommandBuffer.PayloadBuffer.size() > 2)
|
|
||||||
{
|
|
||||||
_BufferOut3 = CommandBuffer.PayloadBuffer.at(2).m_Address;
|
|
||||||
BufferOutSize3 = CommandBuffer.PayloadBuffer.at(2).m_Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
u32 param = 0, param2 = 0, param3, param4, param5 = 0;
|
u32 param = 0, param2 = 0, param3, param4, param5 = 0;
|
||||||
|
|
||||||
|
|
|
@ -92,18 +92,18 @@ bool CWII_IPC_HLE_Device_net_ssl::IOCtl(u32 _CommandAddress)
|
||||||
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
|
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
|
||||||
u32 Command = Memory::Read_U32(_CommandAddress + 0x0C);
|
u32 Command = Memory::Read_U32(_CommandAddress + 0x0C);
|
||||||
|
|
||||||
u32 ReturnValue = ExecuteCommand(Command, BufferIn, BufferInSize, BufferOut, BufferOutSize);
|
WARN_LOG(WII_IPC_SSL, "%s unknown %i "
|
||||||
Memory::Write_U32(ReturnValue, _CommandAddress + 0x4);
|
"(BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
|
||||||
|
GetDeviceName().c_str(), Command,
|
||||||
|
BufferIn, BufferInSize, BufferOut, BufferOutSize);
|
||||||
|
Memory::Write_U32(0, _CommandAddress + 0x4);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWII_IPC_HLE_Device_net_ssl::IOCtlV(u32 _CommandAddress)
|
bool CWII_IPC_HLE_Device_net_ssl::IOCtlV(u32 _CommandAddress)
|
||||||
{
|
{
|
||||||
u32 ReturnValue = 0;
|
|
||||||
SIOCtlVBuffer CommandBuffer(_CommandAddress);
|
SIOCtlVBuffer CommandBuffer(_CommandAddress);
|
||||||
|
|
||||||
s32 returnValue = 0;
|
|
||||||
|
|
||||||
u32 _BufferIn = 0, _BufferIn2 = 0, _BufferIn3 = 0;
|
u32 _BufferIn = 0, _BufferIn2 = 0, _BufferIn3 = 0;
|
||||||
u32 BufferInSize = 0, BufferInSize2 = 0, BufferInSize3 = 0;
|
u32 BufferInSize = 0, BufferInSize2 = 0, BufferInSize3 = 0;
|
||||||
|
|
||||||
|
@ -508,17 +508,9 @@ _SSL_NEW_ERROR:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Memory::Write_U32(ReturnValue, _CommandAddress+4);
|
// SSL return codes are written to BufferIn
|
||||||
|
Memory::Write_U32(0, _CommandAddress+4);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CWII_IPC_HLE_Device_net_ssl::ExecuteCommand(u32 _Command,
|
|
||||||
u32 _BufferIn, u32 BufferInSize,
|
|
||||||
u32 BufferOut, u32 BufferOutSize)
|
|
||||||
{
|
|
||||||
WARN_LOG(WII_IPC_SSL, "%s unknown %i "
|
|
||||||
"(BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
|
|
||||||
GetDeviceName().c_str(), _Command,
|
|
||||||
_BufferIn, BufferInSize, BufferOut, BufferOutSize);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -97,9 +97,6 @@ public:
|
||||||
|
|
||||||
static WII_SSL _SSL[NET_SSL_MAXINSTANCES];
|
static WII_SSL _SSL[NET_SSL_MAXINSTANCES];
|
||||||
|
|
||||||
private:
|
|
||||||
u32 ExecuteCommand(u32 _Parameter, u32 _BufferIn, u32 _BufferInSize, u32 _BufferOut, u32 _BufferOutSize);
|
|
||||||
u32 ExecuteCommandV(u32 _Parameter, SIOCtlVBuffer CommandBuffer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue