[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 <ndesaulniers@google.com>
This commit is contained in:
Prashanth
2025-01-10 22:57:40 +05:30
committed by GitHub
parent dff7ef2353
commit 0afee850de
3 changed files with 16 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ if (SPHINX_FOUND)
# shell.
file(MAKE_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/headers/arpa/"
"${CMAKE_CURRENT_BINARY_DIR}/headers/net/"
"${CMAKE_CURRENT_BINARY_DIR}/headers/netinet/"
"${CMAKE_CURRENT_BINARY_DIR}/headers/sys/"
)
@@ -42,6 +43,7 @@ if (SPHINX_FOUND)
float
inttypes
locale
net/if
netinet/in
setjmp
signal

View File

@@ -15,6 +15,7 @@ Implementation Status
inttypes
locale
math/index.rst
net/if
netinet/in
search
setjmp

View File

@@ -0,0 +1,13 @@
functions:
if_freenameindex:
in-latest-posix: ''
if_indextoname:
in-latest-posix: ''
if_nameindex:
in-latest-posix: ''
if_nametoindex:
in-latest-posix: ''
macros:
IF_NAMESIZE:
in-latest-posix: ''