libnx icon indicating copy to clipboard operation
libnx copied to clipboard

ipv6: in.h extended

Open XITRIX opened this issue 1 year ago • 4 comments

To be able to use MDNS lib I had to add header for ipv6 address structure

XITRIX avatar Feb 20 '24 23:02 XITRIX

fwiw the switch network stack doesn't support ipv6 so there isn't really much point in dns providing ipv6 addresses. You might be better off looking at making ipv6 support optional in that lib instead.

WinterMute avatar Feb 21 '24 00:02 WinterMute

Yes, it does not support it, but in terms of portability and maintainability I'd prefer to be able to compile non modified version of library, than forking it and doing any modifications just for Switch. I'm making cross platform app, so it will be a really painful if I'll need to do it for each platform like this, than just add missing headers and allow it to build without any problems

XITRIX avatar Feb 21 '24 00:02 XITRIX

Yes, it does not support it, but in terms of portability and maintainability I'd prefer to be able to compile non modified version of library, than forking it and doing any modifications just for Switch. I'm making cross platform app, so it will be a really painful if I'll need to do it for each platform like this, than just add missing headers and allow it to build without any problems

The switch isn't the only system around which doesn't support ipv6. It would seem reasonable to upstream a patch there to allow building without ipv6 support. That would be my recommended option here rather than adding things to libnx headers.

WinterMute avatar Feb 21 '24 00:02 WinterMute

Maybe you are right, I just saw some structures for ipv6 already presented in switch headers, and this was the only one missing to be able to successfully compile and run this lib for Switch, but I just checked the solution for this lib on PSVita, and as you said, they forked this library and added IPV6_UNSUPPORTED definition for vita around ipv6 related functions

XITRIX avatar Feb 21 '24 19:02 XITRIX