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

struct sockaddr_storage definition missing in net/socket.h, causing "incomplete type is not allowed" #95

Closed
dee12452 opened this issue Jun 29, 2020 · 3 comments

Comments

@dee12452
Copy link

Hello,

Trying to port over a lib for a project I picked up and I'm running into an issue where psl1ght doesn't have an implementation for sockaddr_storage in any of the socket.h.

Looking at this doc on sys/socket.h
https://pubs.opengroup.org/onlinepubs/009696799/basedefs/sys/socket.h.html

Looks like

The <sys/socket.h> header shall define the sockaddr_storage structure. This structure shall be:

Large enough to accommodate all supported protocol-specific address structures

Aligned at an appropriate boundary so that pointers to it can be cast as pointers to protocol-specific address structures and used to access the fields of those structures without alignment problems

The sockaddr_storage structure shall contain at least the following members:

sa_family_t   ss_family

Just wondering why it doesn't exist? Is it because the PS3 doesn't handle IPV6?

I'm not familiar with networking code so I figured I'd ask more knowledgable people before I just hack my own definition into my fork of psl1ght and truck on.

Thanks!

@dee12452 dee12452 changed the title sockaddr_storage missing in net/socket.h, causing "incomplete type is not allowed" struct sockaddr_storage definition missing in net/socket.h, causing "incomplete type is not allowed" Jun 29, 2020
@dee12452
Copy link
Author

dee12452 commented Jun 29, 2020

Seems related to the question / request here
ps3dev/ps3toolchain#78
Where we are just missing support for IPV6 headers and types

@miigotu
Copy link
Member

miigotu commented Jul 2, 2020

Have you done the check suggested in ps3dev/ps3toolchain#78 (comment) ?
If it is just missing from the header you are welcome to make a PR to add the code. But first check that it is even going to work

check that the SPRX actually supports IPv6 though (i.e. that socket(PF_INET6, SOCK_DGRAM, 0) doesn't just return an error)

@dee12452
Copy link
Author

dee12452 commented Jul 2, 2020

Not quite, was going to do as suggested there though. I'll go ahead and close this issue and just use the other to track the work

@dee12452 dee12452 closed this as completed Jul 2, 2020
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