udpcontrol

package
v0.0.0-...-775528f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

README

udpcontrol

Mod from https://github.com/database64128/shadowsocks-go License: AGPLv3

Documentation

Index

Constants

View Source
const SocketControlMessageBufferSize = unix.SizeofCmsghdr + (unix.SizeofInet6Pktinfo+unix.SizeofPtr-1) & ^(unix.SizeofPtr-1)

Variables

This section is empty.

Functions

func ParsePktinfoCmsg

func ParsePktinfoCmsg(cmsg []byte) (netip.Addr, uint32, error)

ParsePktinfoCmsg parses a single socket control message of type IP_PKTINFO or IPV6_PKTINFO, and returns the IP address and index of the network interface the packet was received from, or an error.

This function is only implemented for Linux, macOS and Windows. On other platforms, this is a no-op.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL