2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-08-29 14:57:54 +00:00
|
|
|
|
|
|
|
//go:build !linux
|
|
|
|
|
|
|
|
package magicsock
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"io"
|
2022-09-26 22:49:59 +00:00
|
|
|
|
|
|
|
"tailscale.com/types/logger"
|
|
|
|
"tailscale.com/types/nettype"
|
2022-08-29 14:57:54 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (c *Conn) listenRawDisco(family string) (io.Closer, error) {
|
|
|
|
return nil, errors.New("raw disco listening not supported on this OS")
|
|
|
|
}
|
2022-09-26 22:49:59 +00:00
|
|
|
|
|
|
|
func trySetSocketBuffer(pconn nettype.PacketConn, logf logger.Logf) {
|
|
|
|
portableTrySetSocketBuffer(pconn, logf)
|
|
|
|
}
|
2023-04-04 23:32:16 +00:00
|
|
|
|
|
|
|
func tryEnableUDPOffload(pconn nettype.PacketConn) (hasTX bool, hasRX bool) {
|
|
|
|
return false, false
|
|
|
|
}
|
|
|
|
|
|
|
|
func getGSOSizeFromControl(control []byte) (int, error) {
|
|
|
|
return 0, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func setGSOSizeInControl(control *[]byte, gso uint16) {}
|
|
|
|
|
|
|
|
const (
|
|
|
|
controlMessageSize = 0
|
|
|
|
)
|