Documentation/translations/zh_CN/security/SCTP.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/security/SCTP.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/security/SCTP.rst- Extension
.rst- Size
- 13591 bytes
- Lines
- 318
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/security/SCTP.rst
:翻译:
赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
====
SCTP
====
SCTP的LSM支持
=============
安全钩子
--------
对于安全模块支持,已经实现了三个特定于SCTP的钩子::
security_sctp_assoc_request()
security_sctp_bind_connect()
security_sctp_sk_clone()
security_sctp_assoc_established()
这些钩子的用法在下面的 `SCTP的SELinux支持`_ 一章中描述SELinux的实现。
security_sctp_assoc_request()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
将关联INIT数据包的 ``@asoc`` 和 ``@chunk->skb`` 传递给安全模块。
成功时返回 0,失败时返回错误。
::
@asoc - 指向sctp关联结构的指针。
@skb - 指向包含关联数据包skbuff的指针。
security_sctp_bind_connect()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
将一个或多个IPv4/IPv6地址传递给安全模块进行基于 ``@optname`` 的验证,
这将导致是绑定还是连接服务,如下面的权限检查表所示。成功时返回 0,失败
时返回错误。
::
@sk - 指向sock结构的指针。
@optname - 需要验证的选项名称。
@address - 一个或多个IPv4 / IPv6地址。
@addrlen - 地址的总长度。使用sizeof(struct sockaddr_in)或
sizeof(struct sockaddr_in6)来计算每个ipv4或ipv6地址。
------------------------------------------------------------------
| BIND 类型检查 |
| @optname | @address contains |
|----------------------------|-----------------------------------|
| SCTP_SOCKOPT_BINDX_ADD | 一个或多个 ipv4 / ipv6 地址 |
| SCTP_PRIMARY_ADDR | 单个 ipv4 or ipv6 地址 |
| SCTP_SET_PEER_PRIMARY_ADDR | 单个 ipv4 or ipv6 地址 |
------------------------------------------------------------------
------------------------------------------------------------------
| CONNECT 类型检查 |
| @optname | @address contains |
|----------------------------|-----------------------------------|
| SCTP_SOCKOPT_CONNECTX | 一个或多个 ipv4 / ipv6 地址 |
| SCTP_PARAM_ADD_IP | 一个或多个 ipv4 / ipv6 地址 |
| SCTP_SENDMSG_CONNECT | 单个 ipv4 or ipv6 地址 |
| SCTP_PARAM_SET_PRIMARY | 单个 ipv4 or ipv6 地址 |
------------------------------------------------------------------
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.