Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary and Secondary DNS #1

Open
LuanTeles opened this issue Jun 3, 2024 · 5 comments
Open

Primary and Secondary DNS #1

LuanTeles opened this issue Jun 3, 2024 · 5 comments

Comments

@LuanTeles
Copy link

LuanTeles commented Jun 3, 2024

Can you please show me a working code to display the DNS address?

@TheRouletteBoi
Copy link
Owner

Can you please show me a working code to display the DNS address?

It's been a while since I've done anything PS3 related but something like this should be appropriate. Let me know if it works or not.

#include <vsh/xsetting.hpp>

xsetting_F48C0548_t* net = xsetting_F48C0548();
xsetting_F48C0548_t::net_info_t netInfo;
int error = net->GetNetworkConfig(&netInfo);
vsh::printf("GetNetworkConfig() returns %d and the primary DNS is %s and the secondary DNS is %s\n", error, netInfo.primaryDns, netInfo.secondaryDns);

@LuanTeles
Copy link
Author

Unfortunately, no. Just by including #include <vsh/xsetting.hpp>, the compiler shows a lot of errors. But let me explain what I'm trying to achieve.

I need Jordy's plugin - https://github.com/LuanTeles/ip_text - to be able to retrieve the DNS because I need it to display custom text depending on the DNS address. This will reflect the name of the custom server based on the DNS of it.

@TheRouletteBoi
Copy link
Owner

Unfortunately, no. Just by including #include <vsh/xsetting.hpp>, the compiler shows a lot of errors. But let me explain what I'm trying to achieve.

I need Jordy's plugin - https://github.com/LuanTeles/ip_text - to be able to retrieve the DNS because I need it to display custom text depending on the DNS address. This will reflect the name of the custom server based on the DNS of it.

I just added that exact same code to your project in xmb_plugin.cpp and it compiled with no errors

void PrintDns()
{
	xsetting_F48C0548_t* net = xsetting_F48C0548();
	xsetting_F48C0548_t::net_info_t netInfo;
	int error = net->GetNetworkConfig(&netInfo);
	stdc::printf("GetNetworkConfig() returns %d and the primary DNS is %s and the secondary DNS is %s\n", error, netInfo.primaryDns, netInfo.secondaryDns);
}

@LuanTeles
Copy link
Author

Thank you so much, without including the lib it's working just fine.

@LuanTeles
Copy link
Author

Ah, other thing, the plugin is showing the info while playing ps1 games, how can i hide it while on it?

@LuanTeles LuanTeles reopened this Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants