libs/libc/netdb: Support the nameserver change notification then we can pass dns info from server to client in usrsock case.

This commit is contained in:
Xiang Xiao
2019-03-19 10:02:10 -06:00
committed by Gregory Nutt
parent 81a3ec250e
commit e26fa54252
6 changed files with 182 additions and 11 deletions
+20
View File
@@ -227,6 +227,26 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen);
int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg);
/****************************************************************************
* Name: dns_register_notify
*
* Description:
* This function is called in order to receive the nameserver change.
*
****************************************************************************/
int dns_register_notify(dns_callback_t callback, FAR void *arg);
/****************************************************************************
* Name: dns_unregister_notify
*
* Description:
* This function is called in order to unsubscribe the notification.
*
****************************************************************************/
int dns_unregister_notify(dns_callback_t callback, FAR void *arg);
#undef EXTERN
#if defined(__cplusplus)
}