mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-23 01:21:33 +00:00
Added function-like macros to get/set the hostname on a netif
This commit is contained in:
parent
010dc6258e
commit
758e99f362
@ -19,6 +19,9 @@ HISTORY
|
|||||||
|
|
||||||
++ New features:
|
++ New features:
|
||||||
|
|
||||||
|
2010-02-05: Simon Goldschmidt
|
||||||
|
* netif.h: Added function-like macros to get/set the hostname on a netif
|
||||||
|
|
||||||
2010-02-04: Simon Goldschmidt
|
2010-02-04: Simon Goldschmidt
|
||||||
* nearly every file: Replaced struct ip_addr by typedef ip_addr_t to
|
* nearly every file: Replaced struct ip_addr by typedef ip_addr_t to
|
||||||
make changing the actual implementation behind the typedef easier.
|
make changing the actual implementation behind the typedef easier.
|
||||||
|
@ -280,6 +280,11 @@ void netif_set_link_down(struct netif *netif);
|
|||||||
void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback);
|
void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback);
|
||||||
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
||||||
|
|
||||||
|
#if LWIP_NETIF_HOSTNAME
|
||||||
|
#define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0)
|
||||||
|
#define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL)
|
||||||
|
#endif /* LWIP_NETIF_HOSTNAME */
|
||||||
|
|
||||||
#if ENABLE_LOOPBACK
|
#if ENABLE_LOOPBACK
|
||||||
err_t netif_loop_output(struct netif *netif, struct pbuf *p, ip_addr_t *dest_ip);
|
err_t netif_loop_output(struct netif *netif, struct pbuf *p, ip_addr_t *dest_ip);
|
||||||
void netif_poll(struct netif *netif);
|
void netif_poll(struct netif *netif);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user