I try to make IPv4/IPv6 dualstack server. So, I want to call net:getaddrinfo with AI_PASSIVE flag. But, net:getaddrinfo/1 and net:getaddrinfo/2 may not accept hints parameters.
Are there any way to call getaddrinfo with AI_PASSIVE flag?
So far passing any (including AI_PASSIVE) hints/flags is not supported at all in nif_getaddrinfo() of erts/emulator/nifs/common/prim_net_nif.c (at least in the master branch as of 9-SEP-2024).
There’s no way to pass any hints since net:getaddrinfo/{1,2} have no way to do it.
I guess you need to write net:getaddrinfo/3 to pass a hint (including AI_PASSIVE) and other hints, as well as corresponding code of prim_net:getaddrinfo and the NIF code of prim_net.