-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
LibC: Add icmp6.h and ip6.h #24991
LibC: Add icmp6.h and ip6.h #24991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these? The headers were seemingly invented by NetBSD (i.e. not POSIX) and unless you have a specific port in mind that you want to add this in conjunction with, we won’t need this. We don’t write our applications or libraries against clunky C libraries when it can be avoided, especially when we’re talking about headers that just provides userland utility structures. All that userland and C applications need for using IPv6 sockets is already completely defined in headers like netinet/in.h.
struct in6_addr ip6_src; // source address | ||
struct in6_addr ip6_dst; // destination address | ||
} __attribute__((packed)); | ||
static_assert(sizeof(struct ip6_hdr) == 40, "struct ip6_hdr: invalid length"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t usually do this in C headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was used in ip.h
My disposition here would be to close this pull request until we can come up with a good reason why and for what this is needed. |
very vague, plus not entirely true. This is relevant only for stuff ported from Linux/*BSD, and in those cases, I'd argue that we should run into a problem first, and only then introduce a header. The problem with hacking on this before our IPv6/ICMPv6 implementation actually lands is that it doesn't reflect reality in the system - at the present, there's no code in the userspace that requires this, and no code in the kernelspace to interpret those structs anyways. I'd either mark this as WIP or close it until we have a need for those headers. |
There is at least one port using these headers iirc |
To my knowledge, the Java port has been broken in a while, and there's a lot of things to fix with it before we can even run networking applications. So the priorities seem off. |
agreed with Filmröllchen. Once we're done with our IPv6 impl, I'll go through all the ports to re-enable IPv6 in the ones that had it disabled (which is a lot) |
94e70db
to
ccc58b9
Compare
icmp6.h and ip6.h are invented by NetBSD and used by a variety of apps. Our implementation is pruned as much as possible to be free of legacy and data center-tier features.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! |
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions! |
This PR adds 2 new headers to LibC required by some applications with IPv6 support.
Solves #23283