mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-05 15:39:54 +00:00
Document DHCP and AUTOIP API in doxygen module style
This commit is contained in:
parent
9c10daba93
commit
dc0859b8d1
@ -32,9 +32,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup netifapi Thread-safe API
|
* @defgroup netifapi NETIF API
|
||||||
* @ingroup netif
|
|
||||||
* Thread-safe functions to be called from non-TCPIP threads
|
* Thread-safe functions to be called from non-TCPIP threads
|
||||||
|
*
|
||||||
|
* @defgroup netifapi_netif NETIF related
|
||||||
|
* @ingroup netifapi
|
||||||
|
* To be called from non-TCPIP threads
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
@ -114,7 +117,7 @@ netifapi_do_netif_common(struct tcpip_api_call_data *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup netifapi
|
* @ingroup netifapi_netif
|
||||||
* Call netif_add() in a thread-safe way by running that function inside the
|
* Call netif_add() in a thread-safe way by running that function inside the
|
||||||
* tcpip_thread context.
|
* tcpip_thread context.
|
||||||
*
|
*
|
||||||
@ -159,7 +162,7 @@ netifapi_netif_add(struct netif *netif,
|
|||||||
|
|
||||||
#if LWIP_IPV4
|
#if LWIP_IPV4
|
||||||
/**
|
/**
|
||||||
* @ingroup netifapi
|
* @ingroup netifapi_netif
|
||||||
* Call netif_set_addr() in a thread-safe way by running that function inside the
|
* Call netif_set_addr() in a thread-safe way by running that function inside the
|
||||||
* tcpip_thread context.
|
* tcpip_thread context.
|
||||||
*
|
*
|
||||||
|
@ -62,6 +62,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup autoip AUTOIP
|
||||||
|
* AUTOIP related functions
|
||||||
|
* @see netifapi_autoip
|
||||||
|
*/
|
||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
|
|
||||||
#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */
|
#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */
|
||||||
@ -126,7 +132,9 @@ static err_t autoip_arp_announce(struct netif *netif);
|
|||||||
static void autoip_start_probing(struct netif *netif);
|
static void autoip_start_probing(struct netif *netif);
|
||||||
|
|
||||||
|
|
||||||
/** Set a statically allocated struct autoip to work with.
|
/**
|
||||||
|
* @ingroup autoip
|
||||||
|
* Set a statically allocated struct autoip to work with.
|
||||||
* Using this prevents autoip_start to allocate it using mem_malloc.
|
* Using this prevents autoip_start to allocate it using mem_malloc.
|
||||||
*
|
*
|
||||||
* @param netif the netif for which to set the struct autoip
|
* @param netif the netif for which to set the struct autoip
|
||||||
@ -268,6 +276,7 @@ autoip_bind(struct netif *netif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup autoip
|
||||||
* Start AutoIP client
|
* Start AutoIP client
|
||||||
*
|
*
|
||||||
* @param netif network interface on which start the AutoIP client
|
* @param netif network interface on which start the AutoIP client
|
||||||
@ -359,6 +368,7 @@ autoip_network_changed(struct netif *netif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup autoip
|
||||||
* Stop AutoIP client
|
* Stop AutoIP client
|
||||||
*
|
*
|
||||||
* @param netif network interface on which stop the AutoIP client
|
* @param netif network interface on which stop the AutoIP client
|
||||||
|
@ -65,6 +65,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup dhcp4 DHCPv4
|
||||||
|
* DHCP (IPv4) related functions
|
||||||
|
* @see netifapi_dhcp4
|
||||||
|
*/
|
||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
|
|
||||||
#if LWIP_IPV4 && LWIP_DHCP /* don't build if not configured for use in lwipopts.h */
|
#if LWIP_IPV4 && LWIP_DHCP /* don't build if not configured for use in lwipopts.h */
|
||||||
@ -643,7 +649,9 @@ dhcp_handle_ack(struct netif *netif)
|
|||||||
#endif /* LWIP_DNS */
|
#endif /* LWIP_DNS */
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set a statically allocated struct dhcp to work with.
|
/**
|
||||||
|
* @ingroup dhcp4
|
||||||
|
* Set a statically allocated struct dhcp to work with.
|
||||||
* Using this prevents dhcp_start to allocate it using mem_malloc.
|
* Using this prevents dhcp_start to allocate it using mem_malloc.
|
||||||
*
|
*
|
||||||
* @param netif the netif for which to set the struct dhcp
|
* @param netif the netif for which to set the struct dhcp
|
||||||
@ -662,7 +670,9 @@ dhcp_set_struct(struct netif *netif, struct dhcp *dhcp)
|
|||||||
netif->dhcp = dhcp;
|
netif->dhcp = dhcp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Removes a struct dhcp from a netif.
|
/**
|
||||||
|
* @ingroup dhcp4
|
||||||
|
* Removes a struct dhcp from a netif.
|
||||||
*
|
*
|
||||||
* ATTENTION: Only use this when not using dhcp_set_struct() to allocate the
|
* ATTENTION: Only use this when not using dhcp_set_struct() to allocate the
|
||||||
* struct dhcp since the memory is passed back to the heap.
|
* struct dhcp since the memory is passed back to the heap.
|
||||||
@ -680,6 +690,7 @@ void dhcp_cleanup(struct netif *netif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup dhcp4
|
||||||
* Start DHCP negotiation for a network interface.
|
* Start DHCP negotiation for a network interface.
|
||||||
*
|
*
|
||||||
* If no DHCP client instance was attached to this interface,
|
* If no DHCP client instance was attached to this interface,
|
||||||
@ -763,6 +774,7 @@ dhcp_start(struct netif *netif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup dhcp4
|
||||||
* Inform a DHCP server of our manual configuration.
|
* Inform a DHCP server of our manual configuration.
|
||||||
*
|
*
|
||||||
* This informs DHCP servers of our fixed IP address configuration
|
* This informs DHCP servers of our fixed IP address configuration
|
||||||
@ -1086,6 +1098,7 @@ dhcp_bind(struct netif *netif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup dhcp4
|
||||||
* Renew an existing DHCP lease at the involved DHCP server.
|
* Renew an existing DHCP lease at the involved DHCP server.
|
||||||
*
|
*
|
||||||
* @param netif network interface which must renew its lease
|
* @param netif network interface which must renew its lease
|
||||||
@ -1238,6 +1251,7 @@ dhcp_reboot(struct netif *netif)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup dhcp4
|
||||||
* Release a DHCP lease.
|
* Release a DHCP lease.
|
||||||
*
|
*
|
||||||
* @param netif network interface which must release its lease
|
* @param netif network interface which must release its lease
|
||||||
@ -1300,6 +1314,7 @@ dhcp_release(struct netif *netif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup dhcp4
|
||||||
* Remove the DHCP client from the interface.
|
* Remove the DHCP client from the interface.
|
||||||
*
|
*
|
||||||
* @param netif The network interface to stop DHCP on
|
* @param netif The network interface to stop DHCP on
|
||||||
|
@ -92,22 +92,39 @@ err_t netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr,
|
|||||||
err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc,
|
err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc,
|
||||||
netifapi_errt_fn errtfunc);
|
netifapi_errt_fn errtfunc);
|
||||||
|
|
||||||
/** @ingroup netifapi */
|
/** @ingroup netifapi_netif */
|
||||||
#define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL)
|
#define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL)
|
||||||
/** @ingroup netifapi */
|
/** @ingroup netifapi_netif */
|
||||||
#define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL)
|
#define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL)
|
||||||
/** @ingroup netifapi */
|
/** @ingroup netifapi_netif */
|
||||||
#define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL)
|
#define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL)
|
||||||
/** @ingroup netifapi */
|
/** @ingroup netifapi_netif */
|
||||||
#define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL)
|
#define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup netifapi_dhcp4 DHCPv4
|
||||||
|
* @ingroup netifapi
|
||||||
|
* To be called from non-TCPIP threads
|
||||||
|
*/
|
||||||
|
/** @ingroup netifapi_dhcp4 */
|
||||||
#define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start)
|
#define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start)
|
||||||
|
/** @ingroup netifapi_dhcp4 */
|
||||||
#define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL)
|
#define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL)
|
||||||
|
/** @ingroup netifapi_dhcp4 */
|
||||||
#define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL)
|
#define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL)
|
||||||
|
/** @ingroup netifapi_dhcp4 */
|
||||||
#define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew)
|
#define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew)
|
||||||
|
/** @ingroup netifapi_dhcp4 */
|
||||||
#define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release)
|
#define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup netifapi_autoip AUTOIP
|
||||||
|
* @ingroup netifapi
|
||||||
|
* To be called from non-TCPIP threads
|
||||||
|
*/
|
||||||
|
/** @ingroup netifapi_autoip */
|
||||||
#define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start)
|
#define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start)
|
||||||
|
/** @ingroup netifapi_autoip */
|
||||||
#define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop)
|
#define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user