Movatterモバイル変換


[0]ホーム

URL:


neterror

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:6Imported by:12

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package neterror classifies network errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcPacketWasTruncated

func PacketWasTruncated(errerror)bool

PacketWasTruncated reports whether err indicates truncation but the RecvFromthat generated err was otherwise successful. On Windows, Go's UDP RecvFromcalls WSARecvFrom which returns the WSAEMSGSIZE error code when the receiveddatagram is larger than the provided buffer. When that happens, both a validsize and an error are returned (as per the partial fix for golang/go#14074).If the WSAEMSGSIZE error is returned, then we ignore the error to getsemantics similar to the POSIX operating systems. One caveat is that itappears that the source address is not returned when WSAEMSGSIZE occurs, butwe do not currently look at the source address.

funcShouldDisableUDPGSOadded inv1.40.0

func ShouldDisableUDPGSO(errerror)bool

funcTreatAsLostUDP

func TreatAsLostUDP(errerror)bool

TreatAsLostUDP reports whether err is an error from a UDP sendoperation that should be treated as a UDP packet that just gotlost.

Notably, on Linux this reports true for EPERM errors (from outboundfirewall blocks) which aren't really send errors; they're justsends that are never going to make it because the local OS blockedit.

Types

typeErrUDPGSODisabledadded inv1.40.0

type ErrUDPGSODisabled struct {OnLaddrstringRetryErrerror}

func (ErrUDPGSODisabled)Erroradded inv1.40.0

func (eErrUDPGSODisabled) Error()string

func (ErrUDPGSODisabled)Unwrapadded inv1.40.0

func (eErrUDPGSODisabled) Unwrap()error

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp