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

net_getsockopt, net_getsockname, and struct pollfd not implemented #110

Open
GriffintheFolf opened this issue Feb 11, 2021 · 4 comments
Open

Comments

@GriffintheFolf
Copy link

While attempting to build libcurl for the Wii, I ran into problems where some of the necessary functions, namely net_getsockopt, net_getsockname, and the data type struct pollfd were not present in the library. I was aware that all the network functions are prefixed with net_, but even after adding that prefix, it made no difference.

I checked the network.h header just to make sure I wasn't going crazy. Lastly, I ran nm on libogc just on the off-chance the symbols were in the library but not in the header. But this got me no further.

Interestingly enough, I found this note in network.h:

/*
 * Level number for (get/set)sockopt() to apply to socket itself.
 */
#define  SOL_SOCKET                     0xffff    /* options for socket level */

It almost seems as though there were plans to implement net_getsockopt, but this wasn't done. This has seemingly also persisted for a long time, as I found in this forum post from 2011 and in issue #56 from 2018.

@muff1n1634
Copy link
Contributor

Similar to the networking functions, GX_GetAttrFmtv is mentioned on the Doxygen pages in notes of GX_SetVtxAttrFmtv (see here), but does not have a declaration in gx.h. Running nm on libogc.a like Thomas did shows that it doesn't define the function, either.

I didn't want to open my own issue; this seems like a similar enough problem. Some functions are missing from the libs, but they're referenced in comments and documentation as if they were supposed to exist.

@DacoTaco
Copy link
Member

DacoTaco commented Feb 12, 2023

hey @GriffintheFolf,

first of all, thanks for making the issue.
i just took a look at this.
net_getsockopt is implemented in the master branch at the moment (but not in release just yet), and because of this i took it upon myself to check the other 2 you mentioned.
the net_setsockoptis also implemented, but i indeed didn't find the pollfd struct. there is a pollsd which looks similar to what i found pollfd should look like except it has events and revents defined as shorts, not unsigned ints. i don't know if this is the same struct and if it could cause issues that the variables are a different length?

@Nargash
Copy link

Nargash commented Jul 8, 2023

I ran into this when attempting to get Retroachievements working with the Wii in Retroarch. getsockname still needs to be implemented.

Could this be used as a model? Apologies if this is a silly question, as I'm pretty unfamiliar with this type of development.

@DacoTaco
Copy link
Member

DacoTaco commented Jul 9, 2023

I ran into this when attempting to get Retroachievements working with the Wii in Retroarch. getsockname still needs to be implemented.

Could this be used as a model? Apologies if this is a silly question, as I'm pretty unfamiliar with this type of development.

for gamecube this would semi be true, since gamecube uses lwip. but on the wii this is a different story and we need to find the functions/methods in ios to make it work

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

4 participants