/* $(SCE_PS3_ROOT)\target\ppu\lib\libnetctl_stub.a */
#include <netex/libnetctl.h>
struct CellSsOpenPSID
{
uint64_t high;
uint64_t low;
};
void PrintConsoleInfo()
{
// Get PSID High and Low
CellSsOpenPSID psid;
system_call_1(SYS_SS_GET_OPEN_PSID, (uint64_t)&psid);
// Get Mac Address
CellNetCtlInfo netInfo1;
cellNetCtlGetInfo(CELL_NET_CTL_INFO_ETHER_ADDR, &netInfo1);
const char * MacAddress = (const char *)netInfo1.ether_addr.data;
// Get Console IP Address
CellNetCtlInfo netInfo2;
cellNetCtlGetInfo(CELL_NET_CTL_INFO_IP_ADDRESS, &netInfo2);
// Get Nat Type
CellNetCtlNatInfo natInfo;
cellNetCtlGetNatInfo(&natInfo);
printf("\n** Console info **\n\nPSI (High: 0x%llX, Low: 0x%llX)\nMac Address: %02X:%02X:%02X:%02X:%02X:%02X\nConsole IP Address: %s\nNat Type: %i\n\n** End of info **\n\n", psid.high, psid.low, MacAddress[0] & 0xFF, MacAddress[1] & 0xFF, MacAddress[2] & 0xFF, MacAddress[3] & 0xFF, MacAddress[4] & 0xFF, MacAddress[5] & 0xFF, netInfo2.ip_address, natInfo.nat_type);
}
/*
Output:
** Console info **
PSI (High: 0x0000000000000000, Low: 0x0000000000000000)
Mac Address: 12:34:56:78:9A:BC
Console IP Address: 192.168.1.100
Nat Type: 0
** End of info **
*/
/* $(SCE_PS3_ROOT)\target\ppu\lib\libnetctl_stub.a */
#include <netex/libnetctl.h>
struct CellSsOpenPSID
{
uint64_t high;
uint64_t low;
};
void PrintConsoleInfo()
{
// Get PSID High and Low
CellSsOpenPSID psid;
system_call_1(SYS_SS_GET_OPEN_PSID, (uint64_t)&psid);
// Get Mac Address
CellNetCtlInfo netInfo1;
cellNetCtlGetInfo(CELL_NET_CTL_INFO_ETHER_ADDR, &netInfo1);
const char * MacAddress = (const char *)netInfo1.ether_addr.data;
// Get Console IP Address
CellNetCtlInfo netInfo2;
cellNetCtlGetInfo(CELL_NET_CTL_INFO_IP_ADDRESS, &netInfo2);
// Get Nat Type
CellNetCtlNatInfo natInfo;
cellNetCtlGetNatInfo(&natInfo);
printf("\n** Console info **\n\nPSI (High: 0x%llX, Low: 0x%llX)\nMac Address: %02X:%02X:%02X:%02X:%02X:%02X\nConsole IP Address: %s\nNat Type: %i\n\n** End of info **\n\n", psid.high, psid.low, MacAddress[0] & 0xFF, MacAddress[1] & 0xFF, MacAddress[2] & 0xFF, MacAddress[3] & 0xFF, MacAddress[4] & 0xFF, MacAddress[5] & 0xFF, netInfo2.ip_address, natInfo.nat_type);
}
/*
Output:
** Console info **
PSI (High: 0x0000000000000000, Low: 0x0000000000000000)
Mac Address: 12:34:56:78:9A:BC
Console IP Address: 192.168.1.100
Nat Type: 0
** End of info **
*/
/* $(SCE_PS3_ROOT)\target\ppu\lib\libnetctl_stub.a */
#include <netex/libnetctl.h>
struct CellSsOpenPSID
{
uint64_t high;
uint64_t low;
};
void PrintConsoleInfo()
{
// Get PSID High and Low
CellSsOpenPSID psid;
system_call_1(SYS_SS_GET_OPEN_PSID, (uint64_t)&psid);
// Get Mac Address
CellNetCtlInfo netInfo1;
cellNetCtlGetInfo(CELL_NET_CTL_INFO_ETHER_ADDR, &netInfo1);
const char * MacAddress = (const char *)netInfo1.ether_addr.data;
// Get Console IP Address
CellNetCtlInfo netInfo2;
cellNetCtlGetInfo(CELL_NET_CTL_INFO_IP_ADDRESS, &netInfo2);
// Get Nat Type
CellNetCtlNatInfo natInfo;
cellNetCtlGetNatInfo(&natInfo);
printf("\n** Console info **\n\nPSI (High: 0x%llX, Low: 0x%llX)\nMac Address: %02X:%02X:%02X:%02X:%02X:%02X\nConsole IP Address: %s\nNat Type: %i\n\n** End of info **\n\n", psid.high, psid.low, MacAddress[0] & 0xFF, MacAddress[1] & 0xFF, MacAddress[2] & 0xFF, MacAddress[3] & 0xFF, MacAddress[4] & 0xFF, MacAddress[5] & 0xFF, netInfo2.ip_address, natInfo.nat_type);
}
/*
Output:
** Console info **
PSI (High: 0x0000000000000000, Low: 0x0000000000000000)
Mac Address: 12:34:56:78:9A:BC
Console IP Address: 192.168.1.100
Nat Type: 0
** End of info **
*/
Copyright © 2024, NextGenUpdate.
All Rights Reserved.