mirror of
https://github.com/SagerNet/sing-tun.git
synced 2025-10-05 16:47:27 +08:00
17 lines
290 B
Go
17 lines
290 B
Go
//go:build !windows
|
|
|
|
package ping
|
|
|
|
import (
|
|
"golang.org/x/net/ipv6"
|
|
)
|
|
|
|
func parseIPv6ControlMessage(cmsg []byte) (*ipv6.ControlMessage, error) {
|
|
var controlMessage ipv6.ControlMessage
|
|
err := controlMessage.Parse(cmsg)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &controlMessage, nil
|
|
}
|