net.ListenIP
The documentation of net.ListenIP says:
The network must be an IP network name; see func Dial for details.
However using one of the documented IP network names (like "ip" or "ip4") causes the function to return an error on Linux; e.g. unknown network ip.
According to #7439:
The first argument of ListenIP should be "network"+":"+"protocol on top of the IPv4 or
IPv6".
I confirmed that this works on Linux, but the function is clearly not documented correctly. From #7439 I assume that the format of network is platform dependant.
net.DialIP
The documentation of the network parameter of net.DialIP has the same problem as in net.ListenIP.
net.ListenIP
The documentation of
net.ListenIPsays:However using one of the documented IP network names (like "ip" or "ip4") causes the function to return an error on Linux; e.g.
unknown network ip.According to #7439:
I confirmed that this works on Linux, but the function is clearly not documented correctly. From #7439 I assume that the format of
networkis platform dependant.net.DialIP
The documentation of the network parameter of
net.DialIPhas the same problem as innet.ListenIP.