Added function-like macros to get/set the hostname on a netif

This commit is contained in:
goldsimon 2010-02-05 11:17:55 +00:00
parent 010dc6258e
commit 758e99f362
2 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,9 @@ HISTORY
++ 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
* nearly every file: Replaced struct ip_addr by typedef ip_addr_t to
make changing the actual implementation behind the typedef easier.

View File

@ -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);
#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
err_t netif_loop_output(struct netif *netif, struct pbuf *p, ip_addr_t *dest_ip);
void netif_poll(struct netif *netif);