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

LibC: Add icmp6.h and ip6.h #24991

Closed
wants to merge 1 commit into from
Closed

LibC: Add icmp6.h and ip6.h #24991

wants to merge 1 commit into from

Conversation

logkos
Copy link
Contributor

@logkos logkos commented Sep 3, 2024

This PR adds 2 new headers to LibC required by some applications with IPv6 support.

Solves #23283

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Sep 3, 2024
Copy link
Collaborator

@kleinesfilmroellchen kleinesfilmroellchen left a 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");
Copy link
Collaborator

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.

Copy link
Contributor Author

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

@kleinesfilmroellchen
Copy link
Collaborator

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.

@sdomi
Copy link
Contributor

sdomi commented Sep 3, 2024

required by applications with IPv6 support.

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.

@logkos
Copy link
Contributor Author

logkos commented Sep 4, 2024

There is at least one port using these headers iirc

@logkos
Copy link
Contributor Author

logkos commented Sep 4, 2024

yep this can wait till IPv6 support
Solves #23283

icmp6.h is used in OpenJDK port

@logkos logkos marked this pull request as draft September 4, 2024 11:26
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Sep 4, 2024
@kleinesfilmroellchen
Copy link
Collaborator

icmp6.h is used in OpenJDK port

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.

@sdomi
Copy link
Contributor

sdomi commented Sep 4, 2024

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)

@logkos logkos marked this pull request as ready for review September 13, 2024 18:28
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Sep 13, 2024
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.
Copy link

stale bot commented Oct 5, 2024

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!

@stale stale bot added the stale label Oct 5, 2024
Copy link

stale bot commented Nov 9, 2024

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!

@stale stale bot closed this Nov 9, 2024
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants