Skip to content

Commit 0afee85

Browse files
[libc][docs] Add net/if.h documentation by referring to POSIX standards (#122406)
This pull request introduces the following changes to the project with reference to issue ( #122006 ): 1. **Documentation Update**: - Added a new YAML file `if.yaml` under `net` to document network interface functions and macros. - The `if.yaml` file includes the following functions and macros: - Functions: - `if_freenameindex` - `if_indextoname` - `if_nameindex` - `if_nametoindex` - Macros: - `IF_NAMESIZE` 2. **CMake Configuration Update**: - Updated the `CMakeLists.txt` file to create the necessary directory for the `net` headers. - Included the `net/if` documentation in the Sphinx build configuration. 3. **Index Update**: - Updated the `index.rst` file to include a reference to the newly added `net/if` documentation. **Purpose**: - This pull request adds documentation for network interface functions and macros, ensuring they are included in the project's documentation. - 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. Co-authored-by: Nick Desaulniers <[email protected]>
1 parent dff7ef2 commit 0afee85

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-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/net/"
2122
"${CMAKE_CURRENT_BINARY_DIR}/headers/netinet/"
2223
"${CMAKE_CURRENT_BINARY_DIR}/headers/sys/"
2324
)
@@ -42,6 +43,7 @@ if (SPHINX_FOUND)
4243
float
4344
inttypes
4445
locale
46+
net/if
4547
netinet/in
4648
setjmp
4749
signal

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+
net/if
1819
netinet/in
1920
search
2021
setjmp

libc/utils/docgen/net/if.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
functions:
2+
if_freenameindex:
3+
in-latest-posix: ''
4+
if_indextoname:
5+
in-latest-posix: ''
6+
if_nameindex:
7+
in-latest-posix: ''
8+
if_nametoindex:
9+
in-latest-posix: ''
10+
11+
macros:
12+
IF_NAMESIZE:
13+
in-latest-posix: ''

0 commit comments

Comments
 (0)