-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed as not planned
Closed as not planned
Copy link
Description
Proposal Details
The net package queries and caches the capabilities of the system IP stack, and calls these functions to determine the type of socket to open when user code calls Dial, Listen and friends. It'd be nice if user code that opens sockets by hand can conveniently call these existing functions, instead of having to duplicate the feature in user code, or resorting to linkname.
The proposal is to add the following:
// SupportsIPv4 reports whether the platform supports IPv4 networking
// functionality.
func SupportsIPv4() bool
// SupportsIPv6 reports whether the platform supports IPv6 networking
// functionality.
func SupportsIPv6() bool
// SupportsIPv4map reports whether the platform supports mapping an
// IPv4 address inside an IPv6 address at transport layer
// protocols. See RFC 4291, RFC 4038 and RFC 3493.
func SupportsIPv4map() boolThis proposal, if accepted, will allow tfo-go to drop its linkname against net.favoriteAddrFamily.
For #67401 (comment).
xiaokentrl
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Incoming