Skip to content

Commit dff7ef2

Browse files
authored
[libc][docs] Add netinet/in header documentation by referring to POSIX standards (#122411)
This pull request introduces the following changes to the project with reference to ( #122006 ): 1. **Documentation Update**: - Added a new YAML file `in.yaml` to document network protocol and address macros. - The `in.yaml` file includes the following macros: - `IPPROTO_IP` - `IPPROTO_IPV6` - `IPPROTO_ICMP` - `IPPROTO_RAW` - `IPPROTO_TCP` - `IPPROTO_UDP` - `INADDR_ANY` - `INADDR_BROADCAST` - `INET_ADDRSTRLEN` - `IPV6_JOIN_GROUP` - `IPV6_LEAVE_GROUP` - `IPV6_MULTICAST_HOPS` - `IPV6_MULTICAST_IF` - `IPV6_MULTICAST_LOOP` - `IPV6_UNICAST_HOPS` - `IPV6_V6ONLY` - `IN6_IS_ADDR_UNSPECIFIED` - `IN6_IS_ADDR_LOOPBACK` - `IN6_IS_ADDR_MULTICAST` - `IN6_IS_ADDR_LINKLOCAL` - `IN6_IS_ADDR_SITELOCAL` - `IN6_IS_ADDR_V4MAPPED` - `IN6_IS_ADDR_V4COMPAT` - `IN6_IS_ADDR_MC_NODELOCAL` - `IN6_IS_ADDR_MC_LINKLOCAL` - `IN6_IS_ADDR_MC_SITELOCAL` - `IN6_IS_ADDR_MC_ORGLOCAL` - `IN6_IS_ADDR_MC_GLOBAL` _I believe, all these macros are necessary and should be documented._ 2. **CMake Configuration Update**: - Updated the `CMakeLists.txt` file to create the necessary directory for the `netinet` headers. - Included the `netinet/in` documentation in the Sphinx build configuration. 3. **Index Update**: - Updated the `index.rst` file to include a reference to the newly added `netinet/in` documentation. **Purpose**: - This pull request adds documentation for network protocol and address macros in the `netinet/in` header. - Updates the CMake configuration to support the new documentation. **Testing**: - Verified that the new YAML file is correctly referenced in the `index.rst`. - Ensured that the documentation builds without errors and includes the new network interface documentation. This pull request ensures that the `netinet/in` header macros are documented and included in the project's documentation, and updates the CMake configuration to support these changes.
1 parent 20f0290 commit dff7ef2

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

libc/docs/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if (SPHINX_FOUND)
1818
# shell.
1919
file(MAKE_DIRECTORY
2020
"${CMAKE_CURRENT_BINARY_DIR}/headers/arpa/"
21+
"${CMAKE_CURRENT_BINARY_DIR}/headers/netinet/"
2122
"${CMAKE_CURRENT_BINARY_DIR}/headers/sys/"
2223
)
2324

@@ -41,6 +42,7 @@ if (SPHINX_FOUND)
4142
float
4243
inttypes
4344
locale
45+
netinet/in
4446
setjmp
4547
signal
4648
stdbit

libc/docs/headers/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Implementation Status
1515
inttypes
1616
locale
1717
math/index.rst
18+
netinet/in
1819
search
1920
setjmp
2021
signal

libc/utils/docgen/netinet/in.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
macros:
2+
IPPROTO_IP:
3+
in-latest-posix: ''
4+
IPPROTO_IPV6:
5+
in-latest-posix: ''
6+
IPPROTO_ICMP:
7+
in-latest-posix: ''
8+
IPPROTO_RAW:
9+
in-latest-posix: ''
10+
IPPROTO_TCP:
11+
in-latest-posix: ''
12+
IPPROTO_UDP:
13+
in-latest-posix: ''
14+
INADDR_ANY:
15+
in-latest-posix: ''
16+
INET6_ADDRSTRLEN:
17+
in-latest-posix: ''
18+
INADDR_BROADCAST:
19+
in-latest-posix: ''
20+
INET_ADDRSTRLEN:
21+
in-latest-posix: ''
22+
IPV6_JOIN_GROUP:
23+
in-latest-posix: ''
24+
IPV6_LEAVE_GROUP:
25+
in-latest-posix: ''
26+
IPV6_MULTICAST_HOPS:
27+
in-latest-posix: ''
28+
IPV6_MULTICAST_IF:
29+
in-latest-posix: ''
30+
IPV6_MULTICAST_LOOP:
31+
in-latest-posix: ''
32+
IPV6_UNICAST_HOPS:
33+
in-latest-posix: ''
34+
IPV6_V6ONLY:
35+
in-latest-posix: ''
36+
IN6_IS_ADDR_UNSPECIFIED:
37+
in-latest-posix: ''
38+
IN6_IS_ADDR_LOOPBACK:
39+
in-latest-posix: ''
40+
IN6_IS_ADDR_MULTICAST:
41+
in-latest-posix: ''
42+
IN6_IS_ADDR_LINKLOCAL:
43+
in-latest-posix: ''
44+
IN6_IS_ADDR_SITELOCAL:
45+
in-latest-posix: ''
46+
IN6_IS_ADDR_V4MAPPED:
47+
in-latest-posix: ''
48+
IN6_IS_ADDR_V4COMPAT:
49+
in-latest-posix: ''
50+
IN6_IS_ADDR_MC_NODELOCAL:
51+
in-latest-posix: ''
52+
IN6_IS_ADDR_MC_LINKLOCAL:
53+
in-latest-posix: ''
54+
IN6_IS_ADDR_MC_SITELOCAL:
55+
in-latest-posix: ''
56+
IN6_IS_ADDR_MC_ORGLOCAL:
57+
in-latest-posix: ''
58+
IN6_IS_ADDR_MC_GLOBAL:
59+
in-latest-posix: ''

0 commit comments

Comments
 (0)