Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + var ErrAborted = New((&tcpip.ErrAborted{}).String(), errno.EPIPE) + var ErrAddressFamilyNotSupported = newWithHost("address family not supported by protocol", errno.EAFNOSUPPORT, ...) + var ErrAddressInUse = newWithHost("address already in use", errno.EADDRINUSE, unix.EADDRINUSE) + var ErrAddressNotAvailable = newWithHost("cannot assign requested address", errno.EADDRNOTAVAIL, unix.EADDRNOTAVAIL) + var ErrAdvertise = newWithHost("advertise error", errno.EADV, unix.EADV) — linux/amd64 + var ErrAlreadyBound = New((&tcpip.ErrAlreadyBound{}).String(), errno.EINVAL) + var ErrAlreadyConnected = newWithHost("transport endpoint is already connected", errno.EISCONN, unix.EISCONN) + var ErrAlreadyConnecting = New((&tcpip.ErrAlreadyConnecting{}).String(), errno.EALREADY) + var ErrAlreadyInProgress = newWithHost("operation already in progress", errno.EALREADY, unix.EALREADY) + var ErrBadAddress = newWithHost("bad address", errno.EFAULT, unix.EFAULT) + var ErrBadBuffer = New((&tcpip.ErrBadBuffer{}).String(), errno.EFAULT) + var ErrBadFD = newWithHost("bad file number", errno.EBADF, unix.EBADF) + var ErrBadFontFile = newWithHost("bad font file format", errno.EBFONT, unix.EBFONT) — linux/amd64 + var ErrBadLocalAddress = New((&tcpip.ErrBadLocalAddress{}).String(), errno.EADDRNOTAVAIL) + var ErrBroadcastDisabled = New((&tcpip.ErrBroadcastDisabled{}).String(), errno.EACCES) + var ErrBrokenPipe = newWithHost("broken pipe", errno.EPIPE, unix.EPIPE) + var ErrBusy = newWithHost("device or resource busy", errno.EBUSY, unix.EBUSY) + var ErrCanceled = newWithHost("operation canceled", errno.ECANCELED, unix.ECANCELED) + var ErrChannelOutOfRange = newWithHost("channel number out of range", errno.ECHRNG, unix.ECHRNG) — linux/amd64 + var ErrClosedForReceive = New((&tcpip.ErrClosedForReceive{}).String(), errno.NOERRNO) + var ErrClosedForSend = New((&tcpip.ErrClosedForSend{}).String(), errno.EPIPE) + var ErrConnectStarted = New((&tcpip.ErrConnectStarted{}).String(), errno.EINPROGRESS) + var ErrConnectionAborted = newWithHost("software caused connection abort", errno.ECONNABORTED, unix.ECONNABORTED) + var ErrConnectionRefused = newWithHost("connection refused", errno.ECONNREFUSED, unix.ECONNREFUSED) + var ErrConnectionReset = newWithHost("connection reset by peer", errno.ECONNRESET, unix.ECONNRESET) + var ErrCorruptedSharedLibrary = newWithHost("accessing a corrupted shared library", errno.ELIBBAD, unix.ELIBBAD) — linux/amd64 + var ErrCrossDeviceLink = newWithHost("cross-device link", errno.EXDEV, unix.EXDEV) + var ErrDeadlock = newWithHost("resource deadlock would occur", errno.EDEADLOCK, unix.EDEADLOCK) — linux/amd64 + var ErrDestinationAddressRequired = newWithHost("destination address required", errno.EDESTADDRREQ, unix.EDESTADDRREQ) + var ErrDestinationRequired = New((&tcpip.ErrDestinationRequired{}).String(), errno.EDESTADDRREQ) + var ErrDeviceOrAddress = newWithHost("no such device or address", errno.ENXIO, unix.ENXIO) + var ErrDirNotEmpty = newWithHost("directory not empty", errno.ENOTEMPTY, unix.ENOTEMPTY) + var ErrDomain = newWithHost("math argument out of domain of func", errno.EDOM, unix.EDOM) + var ErrDuplicateAddress = New((&tcpip.ErrDuplicateAddress{}).String(), errno.EEXIST) + var ErrDuplicateNICID = New((&tcpip.ErrDuplicateNICID{}).String(), errno.EEXIST) + var ErrEcec = newWithHost("exec format error", errno.ENOEXEC, unix.ENOEXEC) + var ErrEndpointOperation = newWithHost("operation not supported on transport endpoint", errno.EOPNOTSUPP, ...) + var ErrExchangeFull = newWithHost("exchange full", errno.EXFULL, unix.EXFULL) — linux/amd64 + var ErrExists = newWithHost("file exists", errno.EEXIST, unix.EEXIST) + var ErrFDInBadState = newWithHost("file descriptor in bad state", errno.EBADFD, unix.EBADFD) — linux/amd64 + var ErrFileTableOverflow = newWithHost("file table overflow", errno.ENFILE, unix.ENFILE) + var ErrFileTooBig = newWithHost("file too large", errno.EFBIG, unix.EFBIG) + var ErrHostDown = newWithHost("host is down", errno.EHOSTDOWN, unix.EHOSTDOWN) + var ErrHostUnreachable = newWithHost("no route to host", errno.EHOSTUNREACH, unix.EHOSTUNREACH) + var ErrIO = newWithHost("I/O error", errno.EIO, unix.EIO) + var ErrIdentifierRemoved = newWithHost("identifier removed", errno.EIDRM, unix.EIDRM) + var ErrIllegalByteSequence = newWithHost("illegal byte sequence", errno.EILSEQ, unix.EILSEQ) + var ErrIllegalSeek = newWithHost("illegal seek", errno.ESPIPE, unix.ESPIPE) + var ErrInProgress = newWithHost("operation now in progress", errno.EINPROGRESS, unix.EINPROGRESS) + var ErrInterrupted = newWithHost("interrupted system call", errno.EINTR, unix.EINTR) + var ErrInvalidArgument = newWithHost("invalid argument", errno.EINVAL, unix.EINVAL) + var ErrInvalidDataMessage = newWithHost("not a data message", errno.EBADMSG, unix.EBADMSG) + var ErrInvalidEndpointState = New((&tcpip.ErrInvalidEndpointState{}).String(), errno.EINVAL) + var ErrInvalidExchange = newWithHost("invalid exchange", errno.EBADE, unix.EBADE) — linux/amd64 + var ErrInvalidOptionValue = New((&tcpip.ErrInvalidOptionValue{}).String(), errno.EINVAL) + var ErrInvalidPortRange = New((&tcpip.ErrInvalidPortRange{}).String(), errno.EINVAL) + var ErrInvalidRequestCode = newWithHost("invalid request code", errno.EBADRQC, unix.EBADRQC) — linux/amd64 + var ErrInvalidRequestDescriptor = newWithHost("invalid request descriptor", errno.EBADR, unix.EBADR) — linux/amd64 + var ErrInvalidSlot = newWithHost("invalid slot", errno.EBADSLT, unix.EBADSLT) — linux/amd64 + var ErrInvalidSyscall = newWithHost("invalid system call number", errno.ENOSYS, unix.ENOSYS) + var ErrIsDir = newWithHost("is a directory", errno.EISDIR, unix.EISDIR) + var ErrIsNamedFile = newWithHost("is a named type file", errno.ENOTNAM, unix.ENOTNAM) — linux/amd64 + var ErrIsRemote = newWithHost("object is remote", errno.EREMOTE, unix.EREMOTE) + var ErrKeyExpired = newWithHost("key has expired", errno.EKEYEXPIRED, unix.EKEYEXPIRED) — linux/amd64 + var ErrKeyRejected = newWithHost("key was rejected by service", errno.EKEYREJECTED, unix.EKEYREJECTED) — linux/amd64 + var ErrKeyRevoked = newWithHost("key has been revoked", errno.EKEYREVOKED, unix.EKEYREVOKED) — linux/amd64 + var ErrLevelThreeHalted = newWithHost("level 3 halted", errno.EL3HLT, unix.EL3HLT) — linux/amd64 + var ErrLevelThreeReset = newWithHost("level 3 reset", errno.EL3RST, unix.EL3RST) — linux/amd64 + var ErrLevelTwoHalted = newWithHost("level 2 halted", errno.EL2HLT, unix.EL2HLT) — linux/amd64 + var ErrLevelTwoNotSynced = newWithHost("level 2 not synchronized", errno.EL2NSYNC, unix.EL2NSYNC) — linux/amd64 + var ErrLibSectionCorrupted = newWithHost(".lib section in a.out corrupted", errno.ELIBSCN, unix.ELIBSCN) — linux/amd64 + var ErrLinkLoop = newWithHost("too many symbolic links encountered", errno.ELOOP, unix.ELOOP) + var ErrLinkNumberOutOfRange = newWithHost("link number out of range", errno.ELNRNG, unix.ELNRNG) — linux/amd64 + var ErrMachineNotOnNetwork = newWithHost("machine is not on the network", errno.ENONET, unix.ENONET) — linux/amd64 + var ErrMalformedHeader = New((&tcpip.ErrMalformedHeader{}).String(), errno.EINVAL) + var ErrMessageTooLong = newWithHost("message too long", errno.EMSGSIZE, unix.EMSGSIZE) + var ErrMissingRequiredFields = New((&tcpip.ErrMissingRequiredFields{}).String(), errno.EINVAL) + var ErrMulticastInputCannotBeOutput = New((&tcpip.ErrMulticastInputCannotBeOutput{}).String(), errno.EINVAL) + var ErrMultihopAttempted = newWithHost("multihop attempted", errno.EMULTIHOP, unix.EMULTIHOP) + var ErrNameTooLong = newWithHost("file name too long", errno.ENAMETOOLONG, unix.ENAMETOOLONG) + var ErrNetworkDown = newWithHost("network is down", errno.ENETDOWN, unix.ENETDOWN) + var ErrNetworkNameNotUnique = newWithHost("name not unique on network", errno.ENOTUNIQ, unix.ENOTUNIQ) — linux/amd64 + var ErrNetworkReset = newWithHost("network dropped connection because of reset", errno.ENETRESET, unix.ENETRESET) + var ErrNetworkUnreachable = newWithHost("network is unreachable", errno.ENETUNREACH, unix.ENETUNREACH) + var ErrNoAnode = newWithHost("no anode", errno.ENOANO, unix.ENOANO) — linux/amd64 + var ErrNoBufferSpace = newWithHost("no buffer space available", errno.ENOBUFS, unix.ENOBUFS) + var ErrNoCSIAvailable = newWithHost("no CSI structure available", errno.ENOCSI, unix.ENOCSI) — linux/amd64 + var ErrNoChild = newWithHost("no child processes", errno.ECHILD, unix.ECHILD) + var ErrNoDataAvailable = newWithHost("no data available", errno.ENODATA, unix.ENODATA) + var ErrNoDevice = newWithHost("no such device", errno.ENODEV, unix.ENODEV) + var ErrNoFileOrDir = newWithHost("no such file or directory", errno.ENOENT, unix.ENOENT) + var ErrNoKey = newWithHost("required key not available", errno.ENOKEY, unix.ENOKEY) — linux/amd64 + var ErrNoLink = newWithHost("link has been severed", errno.ENOLINK, unix.ENOLINK) + var ErrNoLocksAvailable = newWithHost("no record locks available", errno.ENOLCK, unix.ENOLCK) + var ErrNoMedium = newWithHost("no medium found", errno.ENOMEDIUM, unix.ENOMEDIUM) — linux/amd64 + var ErrNoMemory = newWithHost("out of memory", errno.ENOMEM, unix.ENOMEM) + var ErrNoMessage = newWithHost("no message of desired type", errno.ENOMSG, unix.ENOMSG) + var ErrNoNet = New((&tcpip.ErrNoNet{}).String(), errno.ENONET) + var ErrNoPortAvailable = New((&tcpip.ErrNoPortAvailable{}).String(), errno.EAGAIN) + var ErrNoProcess = newWithHost("no such process", errno.ESRCH, unix.ESRCH) + var ErrNoSpace = newWithHost("no space left on device", errno.ENOSPC, unix.ENOSPC) + var ErrNoSuchFile = New((&tcpip.ErrNoSuchFile{}).String(), errno.ENOENT) + var ErrNotASocket = newWithHost("socket operation on non-socket", errno.ENOTSOCK, unix.ENOTSOCK) + var ErrNotBlockDevice = newWithHost("block device required", errno.ENOTBLK, unix.ENOTBLK) + var ErrNotConnected = newWithHost("transport endpoint is not connected", errno.ENOTCONN, unix.ENOTCONN) + var ErrNotDir = newWithHost("not a directory", errno.ENOTDIR, unix.ENOTDIR) + var ErrNotPermitted = newWithHost("operation not permitted", errno.EPERM, unix.EPERM) + var ErrNotPermittedNet = New((&tcpip.ErrNotPermitted{}).String(), errno.EPERM) + var ErrNotRecoverable = newWithHost("state not recoverable", errno.ENOTRECOVERABLE, unix.ENOTRECOVERABLE) + var ErrNotStream = newWithHost("device not a stream", errno.ENOSTR, unix.ENOSTR) + var ErrNotSupported = New((&tcpip.ErrNotSupported{}).String(), errno.EOPNOTSUPP) + var ErrNotTTY = newWithHost("not a typewriter", errno.ENOTTY, unix.ENOTTY) + var ErrOverflow = newWithHost("value too large for defined data type", errno.EOVERFLOW, unix.EOVERFLOW) + var ErrOwnerDied = newWithHost("owner died", errno.EOWNERDEAD, unix.EOWNERDEAD) + var ErrPackageNotInstalled = newWithHost("package not installed", errno.ENOPKG, unix.ENOPKG) — linux/amd64 + var ErrPermissionDenied = newWithHost("permission denied", errno.EACCES, unix.EACCES) + var ErrPortInUse = New((&tcpip.ErrPortInUse{}).String(), errno.EADDRINUSE) + var ErrProtocol = newWithHost("protocol error", errno.EPROTO, unix.EPROTO) + var ErrProtocolDriverNotAttached = newWithHost("protocol driver not attached", errno.EUNATCH, unix.EUNATCH) — linux/amd64 + var ErrProtocolFamilyNotSupported = newWithHost("protocol family not supported", errno.EPFNOSUPPORT, unix.EPFNOSUPPORT) + var ErrProtocolNotAvailable = newWithHost("protocol not available", errno.ENOPROTOOPT, unix.ENOPROTOOPT) + var ErrProtocolNotSupported = newWithHost("protocol not supported", errno.EPROTONOSUPPORT, unix.EPROTONOSUPPORT) + var ErrQueueSizeNotSupported = New((&tcpip.ErrQueueSizeNotSupported{}).String(), errno.ENOTTY) + var ErrQuotaExceeded = newWithHost("quota exceeded", errno.EDQUOT, unix.EDQUOT) + var ErrRFS = newWithHost("RFS specific error", errno.EDOTDOT, unix.EDOTDOT) — linux/amd64 + var ErrRange = newWithHost("math result not representable", errno.ERANGE, unix.ERANGE) + var ErrReadOnlyFS = newWithHost("read-only file system", errno.EROFS, unix.EROFS) + var ErrRemoteAddressChanged = newWithHost("remote address changed", errno.EREMCHG, unix.EREMCHG) — linux/amd64 + var ErrRemoteIO = newWithHost("remote I/O error", errno.EREMOTEIO, unix.EREMOTEIO) — linux/amd64 + var ErrSRMount = newWithHost("srmount error", errno.ESRMNT, unix.ESRMNT) — linux/amd64 + var ErrSendCommunication = newWithHost("communication error on send", errno.ECOMM, unix.ECOMM) — linux/amd64 + var ErrSharedLibraryExeced = newWithHost("cannot exec a shared library directly", errno.ELIBEXEC, unix.ELIBEXEC) — linux/amd64 + var ErrSharedLibraryInaccessible = newWithHost("can not access a needed shared library", errno.ELIBACC, unix.ELIBACC) — linux/amd64 + var ErrShouldRestart = newWithHost("interrupted system call should be restarted", errno.ERESTART, unix.ERESTART) — linux/amd64 + var ErrShutdown = newWithHost("cannot send after transport endpoint shutdown", errno.ESHUTDOWN, ...) + var ErrSocketNotSupported = newWithHost("socket type not supported", errno.ESOCKTNOSUPPORT, unix.ESOCKTNOSUPPORT) + var ErrStaleFileHandle = newWithHost("stale file handle", errno.ESTALE, unix.ESTALE) + var ErrStreamPipe = newWithHost("streams pipe error", errno.ESTRPIPE, unix.ESTRPIPE) — linux/amd64 + var ErrStreamsResourceDepleted = newWithHost("out of streams resources", errno.ENOSR, unix.ENOSR) + var ErrStructureNeedsCleaning = newWithHost("structure needs cleaning", errno.EUCLEAN, unix.EUCLEAN) — linux/amd64 + var ErrTestFileBusy = newWithHost("text file busy", errno.ETXTBSY, unix.ETXTBSY) + var ErrTimedOut = newWithHost("connection timed out", errno.ETIMEDOUT, unix.ETIMEDOUT) + var ErrTimeout = New((&tcpip.ErrTimeout{}).String(), errno.ETIMEDOUT) + var ErrTimerExpired = newWithHost("timer expired", errno.ETIME, unix.ETIME) + var ErrTooManyArgs = newWithHost("argument list too long", errno.E2BIG, unix.E2BIG) + var ErrTooManyLinks = newWithHost("too many links", errno.EMLINK, unix.EMLINK) + var ErrTooManyOpenFiles = newWithHost("too many open files", errno.EMFILE, unix.EMFILE) + var ErrTooManyRefs = newWithHost("too many references: cannot splice", errno.ETOOMANYREFS, unix.ETOOMANYREFS) + var ErrTooManySharedLibraries = newWithHost("attempting to link in too many shared libraries", errno.ELIBMAX, unix.ELIBMAX) — linux/amd64 + var ErrTooManyUsers = newWithHost("too many users", errno.EUSERS, unix.EUSERS) + var ErrTryAgain = newWithHost("try again", errno.EAGAIN, unix.EAGAIN) + var ErrUnknownDevice = New((&tcpip.ErrUnknownDevice{}).String(), errno.ENODEV) + var ErrUnknownNICID = New((&tcpip.ErrUnknownNICID{}).String(), errno.ENODEV) + var ErrUnknownProtocol = New((&tcpip.ErrUnknownProtocol{}).String(), errno.EINVAL) + var ErrUnknownProtocolOption = New((&tcpip.ErrUnknownProtocolOption{}).String(), errno.ENOPROTOOPT) + var ErrWouldBlock = New("operation would block", errno.EWOULDBLOCK) + var ErrWrongMediumType = newWithHost("wrong medium type", errno.EMEDIUMTYPE, unix.EMEDIUMTYPE) — linux/amd64 + var ErrWrongProtocolForSocket = newWithHost("protocol wrong type for socket", errno.EPROTOTYPE, unix.EPROTOTYPE) + type Error struct + func FromError(err error) *Error + func FromHost(err unix.Errno) *Error + func New(message string, linuxTranslation errno.Errno) *Error + func NewDynamic(message string, linuxTranslation errno.Errno) *Error + func TranslateNetstackError(err tcpip.Error) *Error + func (e *Error) String() string + func (e *Error) ToError() error + func (e *Error) ToLinux() errno.Errno