docs: refactor and split network API documentation#534
Merged
Conversation
Collaborator
Author
|
/check-cla |
✅ CLA Verification Complete@tanghao-xiaomi All contributors have signed the CLA!
📋 View detailed check results: Action Run #25554657194 Your pull request can now proceed with the review process! 🎉 |
Split the 2439-line monolithic net.md into focused files and bring each
to 100% coverage of its source headers.
Files:
- net.md (unchanged scope: BSD socket + DNS, 24 APIs)
trimmed from 2439 to 589 lines after split
- net_dhcp.md NEW — DHCP client (IPv4), DHCPv6 client, DHCP server
15 APIs from netutils/dhcpc.h, netutils/dhcp6c.h,
netutils/dhcpd.h
- net_ftp.md NEW — lightweight FTP server
4 APIs from netutils/ftpd.h
- netlib.md NEW — IPv4/IPv6 address/route/MAC/MTU, iptables,
connectivity checks, URL parsing
81 APIs from netutils/netlib.h
- wapi.md NEW — Wi-Fi interface configuration, scanning,
power management, PMKSA (Linux Wireless Extensions)
47 APIs from wireless/wapi.h
- index.md updated with categorized navigation
Structure fixes:
- Promote 142 individual APIs from '####' (four-level) to '###'
per api-doc-standards.md ('组内每个 API 用 ### 函数名')
- Each file has its own '## openvela 实现说明' section and explicit
#include header declaration
Coverage fixes found during audit:
- net_dhcp.md: split one '### set_startip / set_routerip /
set_netmask / set_dnsip' composite section into 4 independent APIs,
adding proper 参数/返回值 descriptions to each
- netlib.md: add 5 previously missing address-conversion helpers
(netlib_ipv4addrconv, netlib_ethaddrconv, netlib_saddrconv,
netlib_eaddrconv, netlib_nodeaddrconv)
Content quality:
- Translate ~31 parameter descriptions that mixed English and Chinese
(e.g. 'ipaddr 用于存储 the IP address' ->
'ipaddr 用于存储 IP 地址')
- Preserve industry standard terms (BSD socket, SIOCGIF*, WEXT,
Linux Wireless Extensions, struct sockaddr_in) per the standard
Total: 166 + 15 + 4 + 81 + 47 = 313 public APIs documented across
the 5 files, up from 166 before and with every section now verified
against its source header.
83b06f0 to
03346a8
Compare
Collaborator
Author
|
/check-cla |
✅ CLA Verification Complete@tanghao-xiaomi All contributors have signed the CLA!
📋 View detailed check results: Action Run #25556574627 Your pull request can now proceed with the review process! 🎉 |
❌ CLA Signature Required@tanghao-xiaomi Some contributors need to sign the CLA:
Please:
📋 View detailed check results: Action Run #25556572289 💡 Tip: All contributors must sign the CLA before the PR can be merged. |
Collaborator
Author
|
/check-cla |
❌ CLA Signature Still Required@tanghao-xiaomi Some contributors still need to sign the CLA:
Please:
📋 View detailed check results: Action Run #25556629400 💡 Tip: All contributors must sign the CLA before the PR can be merged. |
TangMeng12
approved these changes
May 8, 2026
aiduxiaoxiong
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Split the 2439-line monolithic
net.mdinto focused files and bring each to 100% coverage of its source headers.Files
net.md<sys/socket.h>,<netinet/in.h>,<arpa/inet.h>net_dhcp.mdNEWnetutils/dhcpc.h,dhcp6c.h,dhcpd.hnet_ftp.mdNEWnetutils/ftpd.hnetlib.mdNEWnetutils/netlib.hwapi.mdNEWwireless/wapi.hindex.mdStructure Fixes
####(four-level) to###, perapi-doc-standards.md("组内每个 API 用### 函数名").## openvela 实现说明section and explicit#includeheader declaration.Coverage Fixes Found During Audit
net_dhcp.md: split one composite section (### set_startip / set_routerip / set_netmask / set_dnsip) into 4 independent APIs with proper**参数**:/**返回值**:descriptions.netlib.md: added 5 previously missing address-conversion helpers (netlib_ipv4addrconv,netlib_ethaddrconv,netlib_saddrconv,netlib_eaddrconv,netlib_nodeaddrconv).Content Quality
ipaddr 用于存储 the IP address→ipaddr 用于存储 IP 地址).SIOCGIF*, WEXT, Linux Wireless Extensions,struct sockaddr_in, etc.) per the standard.Coverage
Every
dhcpc_*/dhcp6c_*/dhcpd_*/ftpd_*/netlib_*/wapi_*function declared in the source headers is present in the documentation. 313 public APIs total across the 5 files, up from 166 before, with every section verified against its source.Statistics
6 files changed, +2652 / -82 lines.