From 0a8f034560ef45994bc3aa224ccf3e7805bdc71c Mon Sep 17 00:00:00 2001 From: zhengsiwen960323 Date: Sat, 21 Jun 2025 16:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0socket=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhengsiwen960323 --- .../apis-network-kit/errorcode-kernel.md | 69 +++++++++++++++++++ .../apis-network-kit/errorcode-net-socket.md | 2 + 2 files changed, 71 insertions(+) create mode 100644 zh-cn/application-dev/reference/apis-network-kit/errorcode-kernel.md diff --git a/zh-cn/application-dev/reference/apis-network-kit/errorcode-kernel.md b/zh-cn/application-dev/reference/apis-network-kit/errorcode-kernel.md new file mode 100644 index 00000000000..c3cc2631bc4 --- /dev/null +++ b/zh-cn/application-dev/reference/apis-network-kit/errorcode-kernel.md @@ -0,0 +1,69 @@ +# 内核错误码 + +> **说明:** +> +> 以下仅列出内核错误码数值及描述。 + +| 错误码数值 | 错误码定义 | 错误码描述 | 可能原因 | 处理步骤 | +|-------|------|-----|------|-----| +| 1 | EPERM | Operation not permitted | -- | -- | +| 2 | ENOENT | No such file or directory | -- | -- | +| 3 | ESRCH | No such process | -- | -- | +| 4 | EINTR | Interrupted system call | -- | -- | +| 5 | EIO | Input/output error | -- | -- | +| 6 | ENXIO | No such device or address | -- | -- | +| 7 | E2BIG | Argument list too long | -- | -- | +| 8 | ENOEXEC | Exec format error | -- | -- | +| 9 | EBADF | Bad file descriptor | -- | -- | +| 10 | ECHILD | No child processes | -- | -- | +| 11 | EAGAIN | Try again | -- | -- | +| 12 | ENOMEM | Out of memory | -- | -- | +| 13 | EACCES | Permission denied | -- | -- | +| 14 | EFAULT | Bad address | -- | -- | +| 16 | EBUSY | Device or resource busy | -- | -- | +| 17 | EEXIST | File exists | -- | -- | +| 18 | EXDEV | Cross-device link | -- | -- | +| 19 | ENODEV | No such device | -- | -- | +| 20 | ENOTDIR | Not a directory | -- | -- | +| 21 | EISDIR | Is a directory | -- | -- | +| 22 | EINVAL | Invalid argument | -- | -- | +| 23 | ENFILE | File table overflow | -- | -- | +| 24 | EMFILE | Too many open files | -- | -- | +| 25 | ENOTTY | Inappropriate ioctl for device | -- | -- | +| 26 | ETXTBSY | Text file busy | -- | -- | +| 96 | EPFNOSUPPORT | Protocol family not supported | -- | -- | +| 97 | EAFNOSUPPORT | Address family not supported by protocol | -- | -- | +| 98 | EADDRINUSE | Address already in use | -- | -- | +| 99 | EADDRNOTAVAIL | Cannot assign requested address | -- | -- | +| 100 | ENETDOWN | Network is down | -- | -- | +| 101 | ENETUNREACH | Network is unreachable | -- | -- | +| 102 | ENETRESET | Network dropped connection because of reset | -- | -- | +| 103 | ECONNABORTED | Software caused connection abort | -- | -- | +| 104 | ECONNRESET | Connection reset by peer | -- | -- | +| 105 | ENOBUFS | No buffer space available | -- | -- | +| 106 | EISCONN | Socket is already connected | -- | -- | +| 107 | ENOTCONN | Socket is not connected | -- | -- | +| 110 | ETIMEDOUT | Connection timed out | -- | -- | +| 111 | ECONNREFUSED | Connection refused | -- | -- | +| 112 | EHOSTDOWN | Host is down | -- | -- | +| 113 | EHOSTUNREACH | No route to host | -- | -- | +| 114 | EALREADY | Operation already in progress | -- | -- | +| 115 | EINPROGRESS | Operation now in progress | -- | -- | +| 116 | ESTALE | Stale file handle | -- | -- | +| 117 | EUCLEAN | Structure needs cleaning | -- | -- | +| 118 | ENOTNAM | Not a XENIX named type file | -- | -- | +| 119 | ENAVAIL | No XENIX semaphores available | -- | -- | +| 120 | EREMOTEIO | Is a named type file | -- | -- | +| 121 | EREMOTEIO | Remote I/O error | -- | -- | +| 122 | EDQUOT | Quota exceeded | -- | -- | +| 123 | ENOMEDIUM | No medium found | -- | -- | +| 124 | EMEDIUMTYPE | Wrong medium type | -- | -- | +| 125 | ECANCELED | Operation Canceled | -- | -- | +| 126 | ENOKEY | Required key not available | -- | -- | +| 127 | EKEYEXPIRED | Key has expired | -- | -- | +| 128 | EKEYREVOKED | Key has been revoked | -- | -- | +| 129 | EKEYREJECTED | Key was rejected by service | -- | -- | +| 130 | EOWNERDEAD | Owner died | -- | -- | +| 131 | ENOTRECOVERABLE | State not recoverable | -- | -- | +| 132 | ERFKILL | Operation not possible due to RF-kill | -- | -- | +| 133 | EHWPOISON | Memory page has hardware error | -- | -- | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis-network-kit/errorcode-net-socket.md b/zh-cn/application-dev/reference/apis-network-kit/errorcode-net-socket.md index 09f4b5376f2..e065914f889 100644 --- a/zh-cn/application-dev/reference/apis-network-kit/errorcode-net-socket.md +++ b/zh-cn/application-dev/reference/apis-network-kit/errorcode-net-socket.md @@ -3,6 +3,8 @@ > **说明:** > > 以下仅介绍本模块特有错误码,通用错误码请参考[通用错误码说明文档](../errorcode-universal.md)。 +> socket错误码映射关系:2301000 + [内核错误码](./errorcode-kernel.md)。 +> socket server错误码映射关系:2303100 + [内核错误码](./errorcode-kernel.md)。 ## 2301001 操作不允许 -- Gitee