mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
netlib: Introduction to IP conflict detection functions
The documentation includes descriptions of the IP conflict function's prototype, parameters, and return value. Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
This commit is contained in:
@@ -259,6 +259,7 @@ Network Interface Management
|
||||
- :c:func:`netlib_ifup`
|
||||
- :c:func:`netlib_ifdown`
|
||||
- :c:func:`netlib_set_mtu`
|
||||
- :c:func:`netlib_check_ifconflict`
|
||||
|
||||
.. c:function:: int netlib_getifstatus(const char *ifname, uint8_t *flags)
|
||||
|
||||
@@ -294,6 +295,17 @@ Network Interface Management
|
||||
|
||||
:return: 0 on success; -1 on error with ``errno`` set appropriately.
|
||||
|
||||
.. c:function:: int netlib_check_ifconflict(const char *ifname)
|
||||
|
||||
Check the IP address conflict status for a network interface. This function
|
||||
reads the conflict status from the procfs file system (``/proc/net/<ifname>``)
|
||||
which is populated by the ARP Address Conflict Detection (ACD) module.
|
||||
|
||||
:param ifname: Network interface name (e.g., ``"eth0"``).
|
||||
|
||||
:return: 0 if no conflict is detected; 1 if a conflict is detected; a negative
|
||||
value on error with ``errno`` set appropriately.
|
||||
|
||||
ARP Table Support
|
||||
==================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user