Correct IP address type in API; clean up scopes, loops.
This commit is contained in:
31
mdns.c
31
mdns.c
@@ -132,11 +132,10 @@ char *nlabel_to_str(const uint8_t *name) {
|
|||||||
// does NOT uncompress the field, so it could be as small as 2 bytes
|
// does NOT uncompress the field, so it could be as small as 2 bytes
|
||||||
// or 1 for the root
|
// or 1 for the root
|
||||||
static size_t label_len(uint8_t *pkt_buf, size_t pkt_len, size_t off) {
|
static size_t label_len(uint8_t *pkt_buf, size_t pkt_len, size_t off) {
|
||||||
uint8_t *p;
|
|
||||||
uint8_t *e = pkt_buf + pkt_len;
|
uint8_t *e = pkt_buf + pkt_len;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
for (p = pkt_buf + off; p < e; p++) {
|
for (uint8_t *p = pkt_buf + off; p < e; p++) {
|
||||||
if (*p == 0) {
|
if (*p == 0) {
|
||||||
return len + 1;
|
return len + 1;
|
||||||
} else if ((*p & 0xC0) == 0xC0) {
|
} else if ((*p & 0xC0) == 0xC0) {
|
||||||
@@ -295,7 +294,6 @@ const char *rr_get_type_name(enum rr_type type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void rr_entry_destroy(struct rr_entry *rr) {
|
void rr_entry_destroy(struct rr_entry *rr) {
|
||||||
struct rr_data_txt *txt_rec;
|
|
||||||
assert(rr);
|
assert(rr);
|
||||||
|
|
||||||
// check rr_type and free data elements
|
// check rr_type and free data elements
|
||||||
@@ -306,8 +304,8 @@ void rr_entry_destroy(struct rr_entry *rr) {
|
|||||||
// don't free entry
|
// don't free entry
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RR_TXT:
|
case RR_TXT: {
|
||||||
txt_rec = &rr->data.TXT;
|
struct rr_data_txt *txt_rec = &rr->data.TXT;
|
||||||
while (txt_rec) {
|
while (txt_rec) {
|
||||||
struct rr_data_txt *next = txt_rec->next;
|
struct rr_data_txt *next = txt_rec->next;
|
||||||
if (txt_rec->txt)
|
if (txt_rec->txt)
|
||||||
@@ -320,6 +318,7 @@ void rr_entry_destroy(struct rr_entry *rr) {
|
|||||||
txt_rec = next;
|
txt_rec = next;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case RR_SRV:
|
case RR_SRV:
|
||||||
if (rr->data.SRV.target)
|
if (rr->data.SRV.target)
|
||||||
@@ -342,9 +341,7 @@ void rr_entry_destroy(struct rr_entry *rr) {
|
|||||||
|
|
||||||
// destroys an RR list (and optionally, items)
|
// destroys an RR list (and optionally, items)
|
||||||
void rr_list_destroy(struct rr_list *rr, char destroy_items) {
|
void rr_list_destroy(struct rr_list *rr, char destroy_items) {
|
||||||
struct rr_list *rr_next;
|
for (struct rr_list *rr_next; rr; rr = rr_next) {
|
||||||
|
|
||||||
for (; rr; rr = rr_next) {
|
|
||||||
rr_next = rr->next;
|
rr_next = rr->next;
|
||||||
if (destroy_items)
|
if (destroy_items)
|
||||||
rr_entry_destroy(rr->e);
|
rr_entry_destroy(rr->e);
|
||||||
@@ -359,8 +356,8 @@ int rr_list_count(struct rr_list *rr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct rr_entry *rr_list_remove(struct rr_list **rr_head, struct rr_entry *rr) {
|
struct rr_entry *rr_list_remove(struct rr_list **rr_head, struct rr_entry *rr) {
|
||||||
struct rr_list *le = *rr_head, *pe = NULL;
|
struct rr_list *pe = NULL;
|
||||||
for (; le; le = le->next) {
|
for (struct rr_list *le = *rr_head; le; le = le->next) {
|
||||||
if (le->e == rr) {
|
if (le->e == rr) {
|
||||||
if (pe == NULL) {
|
if (pe == NULL) {
|
||||||
*rr_head = le->next;
|
*rr_head = le->next;
|
||||||
@@ -389,8 +386,8 @@ int rr_list_append(struct rr_list **rr_head, struct rr_entry *rr) {
|
|||||||
if (*rr_head == NULL) {
|
if (*rr_head == NULL) {
|
||||||
*rr_head = node;
|
*rr_head = node;
|
||||||
} else {
|
} else {
|
||||||
struct rr_list *e = *rr_head, *taile;
|
struct rr_list *taile = NULL;
|
||||||
for (; e; e = e->next) {
|
for (struct rr_list *e = *rr_head; e; e = e->next) {
|
||||||
// already in list - don't add
|
// already in list - don't add
|
||||||
if (e->e == rr) {
|
if (e->e == rr) {
|
||||||
MDNS_FREE(node);
|
MDNS_FREE(node);
|
||||||
@@ -618,8 +615,7 @@ struct rr_group *rr_group_find(struct rr_group* g, uint8_t *name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct rr_entry *rr_entry_find(struct rr_list *rr_list, uint8_t *name, uint16_t type) {
|
struct rr_entry *rr_entry_find(struct rr_list *rr_list, uint8_t *name, uint16_t type) {
|
||||||
struct rr_list *rr = rr_list;
|
for (struct rr_list *rr = rr_list; rr; rr = rr->next) {
|
||||||
for (; rr; rr = rr->next) {
|
|
||||||
if (rr->e->type == type && cmp_nlabel(rr->e->name, name) == 0)
|
if (rr->e->type == type && cmp_nlabel(rr->e->name, name) == 0)
|
||||||
return rr->e;
|
return rr->e;
|
||||||
}
|
}
|
||||||
@@ -629,8 +625,7 @@ struct rr_entry *rr_entry_find(struct rr_list *rr_list, uint8_t *name, uint16_t
|
|||||||
// looks for a matching entry in rr_list
|
// looks for a matching entry in rr_list
|
||||||
// if entry is a PTR, we need to check if the PTR target also matches
|
// if entry is a PTR, we need to check if the PTR target also matches
|
||||||
struct rr_entry *rr_entry_match(struct rr_list *rr_list, struct rr_entry *entry) {
|
struct rr_entry *rr_entry_match(struct rr_list *rr_list, struct rr_entry *entry) {
|
||||||
struct rr_list *rr = rr_list;
|
for (struct rr_list *rr = rr_list; rr; rr = rr->next) {
|
||||||
for (; rr; rr = rr->next) {
|
|
||||||
if (rr->e->type == entry->type && cmp_nlabel(rr->e->name, entry->name) == 0) {
|
if (rr->e->type == entry->type && cmp_nlabel(rr->e->name, entry->name) == 0) {
|
||||||
if (entry->type != RR_PTR) {
|
if (entry->type != RR_PTR) {
|
||||||
return rr->e;
|
return rr->e;
|
||||||
@@ -644,9 +639,7 @@ struct rr_entry *rr_entry_match(struct rr_list *rr_list, struct rr_entry *entry)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void rr_group_destroy(struct rr_group *group) {
|
void rr_group_destroy(struct rr_group *group) {
|
||||||
struct rr_group *g = group;
|
for (struct rr_group *g = group; g; ) {
|
||||||
|
|
||||||
while (g) {
|
|
||||||
struct rr_group *nextg = g->next;
|
struct rr_group *nextg = g->next;
|
||||||
free(g->name);
|
free(g->name);
|
||||||
rr_list_destroy(g->rr, 1);
|
rr_list_destroy(g->rr, 1);
|
||||||
|
|||||||
98
mdnsd.c
98
mdnsd.c
@@ -216,20 +216,11 @@ static void print_rr_entry(struct rr_entry *rr_e)
|
|||||||
|
|
||||||
static void print_cache(struct mdnsd *svr)
|
static void print_cache(struct mdnsd *svr)
|
||||||
{
|
{
|
||||||
struct rr_group *group = svr->cache;
|
|
||||||
struct rr_list *list = NULL;
|
|
||||||
struct rr_entry *entry = NULL;
|
|
||||||
char *pname = NULL;
|
|
||||||
|
|
||||||
DEBUG_PRINTF("\n");
|
DEBUG_PRINTF("\n");
|
||||||
DEBUG_PRINTF(" Multicast DNS Cache\n");
|
DEBUG_PRINTF(" Multicast DNS Cache\n");
|
||||||
|
|
||||||
for (; group; group = group->next) {
|
for (struct rr_group *group = svr->cache; group; group = group->next) {
|
||||||
if (group->name) {
|
char *pname = group->name? nlabel_to_str(group->name): NULL;
|
||||||
pname = nlabel_to_str(group->name);
|
|
||||||
} else {
|
|
||||||
pname = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG_PRINTF("==================================================\n");
|
DEBUG_PRINTF("==================================================\n");
|
||||||
DEBUG_PRINTF(" Group: %s\n", pname ? pname : "Unknown");
|
DEBUG_PRINTF(" Group: %s\n", pname ? pname : "Unknown");
|
||||||
@@ -238,9 +229,8 @@ static void print_cache(struct mdnsd *svr)
|
|||||||
MDNS_FREE(pname);
|
MDNS_FREE(pname);
|
||||||
}
|
}
|
||||||
|
|
||||||
list = group->rr;
|
for (struct rr_list *list = group->rr; list; list = list->next) {
|
||||||
for (; list; list = list->next) {
|
struct rr_entry *entry = list->e;
|
||||||
entry = list->e;
|
|
||||||
if (entry) {
|
if (entry) {
|
||||||
print_rr_entry(entry);
|
print_rr_entry(entry);
|
||||||
}
|
}
|
||||||
@@ -281,9 +271,7 @@ done:
|
|||||||
|
|
||||||
static char *get_service_type_without_subtype(char *name)
|
static char *get_service_type_without_subtype(char *name)
|
||||||
{
|
{
|
||||||
char *str = NULL;
|
char *str = strstr(name, MDNS_CHECK_SUBTYPE_STR);
|
||||||
|
|
||||||
str = strstr(name, MDNS_CHECK_SUBTYPE_STR);
|
|
||||||
if (str) {
|
if (str) {
|
||||||
str += strlen(MDNS_CHECK_SUBTYPE_STR);
|
str += strlen(MDNS_CHECK_SUBTYPE_STR);
|
||||||
} else {
|
} else {
|
||||||
@@ -297,21 +285,16 @@ static char *get_service_type_without_subtype(char *name)
|
|||||||
static int lookup_hostname(struct mdnsd *svr, char *hostname)
|
static int lookup_hostname(struct mdnsd *svr, char *hostname)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
struct rr_group *group = svr->cache;
|
|
||||||
struct rr_list *list = NULL;
|
|
||||||
struct rr_entry *entry = NULL;
|
|
||||||
int b_found = 0;
|
int b_found = 0;
|
||||||
char *e_name;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
pthread_mutex_lock(&svr->data_lock);
|
pthread_mutex_lock(&svr->data_lock);
|
||||||
|
|
||||||
for (; group; group = group->next) {
|
for (struct rr_group *group = svr->cache; group; group = group->next) {
|
||||||
list = group->rr;
|
for (struct rr_list *list = group->rr; list; list = list->next) {
|
||||||
for (; list; list = list->next) {
|
struct rr_entry *entry = list->e;
|
||||||
entry = list->e;
|
int ret;
|
||||||
if (entry && entry->name) {
|
if (entry && entry->name) {
|
||||||
e_name = nlabel_to_str(entry->name);
|
char *e_name = nlabel_to_str(entry->name);
|
||||||
ret = strncmp(e_name, hostname, strlen(hostname));
|
ret = strncmp(e_name, hostname, strlen(hostname));
|
||||||
MDNS_FREE(e_name);
|
MDNS_FREE(e_name);
|
||||||
} else {
|
} else {
|
||||||
@@ -339,26 +322,22 @@ static int lookup_hostname(struct mdnsd *svr, char *hostname)
|
|||||||
}
|
}
|
||||||
#endif /* !defined MDNS_NO_RESPONDER_SUPPORT */
|
#endif /* !defined MDNS_NO_RESPONDER_SUPPORT */
|
||||||
|
|
||||||
static int lookup_hostname_to_addr(struct mdnsd *svr, char *hostname, int *ipaddr)
|
static int lookup_hostname_to_addr(struct mdnsd *svr, char *hostname, uint32_t *ipaddr)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
struct rr_group *group = svr->cache;
|
|
||||||
struct rr_list *list = NULL;
|
|
||||||
struct rr_entry *entry = NULL;
|
|
||||||
int b_found = 0;
|
int b_found = 0;
|
||||||
char *e_name;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
update_cache(svr);
|
update_cache(svr);
|
||||||
|
|
||||||
pthread_mutex_lock(&svr->data_lock);
|
pthread_mutex_lock(&svr->data_lock);
|
||||||
|
|
||||||
for (; group; group = group->next) {
|
for (struct rr_group *group = svr->cache; group; group = group->next) {
|
||||||
list = group->rr;
|
for (struct rr_list *list = group->rr; list; list = list->next) {
|
||||||
for (; list; list = list->next) {
|
struct rr_entry *entry = list->e;
|
||||||
entry = list->e;
|
|
||||||
if (entry && (entry->type == RR_A)) { // currently, support only ipv4
|
if (entry && (entry->type == RR_A)) { // currently, support only ipv4
|
||||||
|
int ret;
|
||||||
if (entry->name) {
|
if (entry->name) {
|
||||||
|
char *e_name;
|
||||||
e_name = nlabel_to_str(entry->name);
|
e_name = nlabel_to_str(entry->name);
|
||||||
ret = strncmp(e_name, hostname, strlen(hostname));
|
ret = strncmp(e_name, hostname, strlen(hostname));
|
||||||
MDNS_FREE(e_name);
|
MDNS_FREE(e_name);
|
||||||
@@ -405,10 +384,8 @@ static int lookup_service(struct mdnsd *svr, char *type, struct mdns_service_inf
|
|||||||
|
|
||||||
MDNS_FREE(type_nlabel);
|
MDNS_FREE(type_nlabel);
|
||||||
if (ptr_grp) {
|
if (ptr_grp) {
|
||||||
struct rr_list *list = ptr_grp->rr;
|
for (struct rr_list *list = ptr_grp->rr; list; list = list->next) {
|
||||||
struct rr_entry *entry = NULL;
|
struct rr_entry *entry = list->e;
|
||||||
for (; list; list = list->next) {
|
|
||||||
entry = list->e;
|
|
||||||
if (entry && (entry->type == RR_PTR)) {
|
if (entry && (entry->type == RR_PTR)) {
|
||||||
if (entry->data.PTR.name) { /* SRV's name */
|
if (entry->data.PTR.name) { /* SRV's name */
|
||||||
struct rr_group *srv_grp = rr_group_find(svr->cache,
|
struct rr_group *srv_grp = rr_group_find(svr->cache,
|
||||||
@@ -608,13 +585,12 @@ static ssize_t send_packet(int fd, const void *data, size_t len, int domain) {
|
|||||||
static int populate_query(struct mdnsd *svr, struct rr_list **rr_head)
|
static int populate_query(struct mdnsd *svr, struct rr_list **rr_head)
|
||||||
{
|
{
|
||||||
int num_qns = 0;
|
int num_qns = 0;
|
||||||
struct rr_entry *qn_e = NULL;
|
|
||||||
|
|
||||||
// check if we have the records
|
// check if we have the records
|
||||||
pthread_mutex_lock(&svr->data_lock);
|
pthread_mutex_lock(&svr->data_lock);
|
||||||
|
|
||||||
while (svr->query) {
|
while (svr->query) {
|
||||||
qn_e = rr_list_remove(&svr->query, svr->query->e);
|
struct rr_entry *qn_e = rr_list_remove(&svr->query, svr->query->e);
|
||||||
if (qn_e == NULL) {
|
if (qn_e == NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -636,8 +612,8 @@ static int populate_probe(struct mdnsd *svr, struct rr_list **rr_head)
|
|||||||
// check if we have the records
|
// check if we have the records
|
||||||
pthread_mutex_lock(&svr->data_lock);
|
pthread_mutex_lock(&svr->data_lock);
|
||||||
|
|
||||||
for (struct rr_entry *qn_e = NULL; svr->probe; ) {
|
while (svr->probe) {
|
||||||
qn_e = rr_list_remove(&svr->probe, svr->probe->e);
|
struct rr_entry *qn_e = rr_list_remove(&svr->probe, svr->probe->e);
|
||||||
if (qn_e == NULL) {
|
if (qn_e == NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -954,8 +930,8 @@ static int process_mdns_pkt(struct mdnsd *svr, struct mdns_pkt *pkt, struct mdns
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove our replies if they were already in their answers
|
// remove our replies if they were already in their answers
|
||||||
struct rr_list *ans = NULL, *prev_ans = NULL;
|
struct rr_list *prev_ans = NULL;
|
||||||
for (ans = reply->rr_ans; ans; ) {
|
for (struct rr_list *ans = reply->rr_ans; ans; ) {
|
||||||
struct rr_list *next_ans = ans->next;
|
struct rr_list *next_ans = ans->next;
|
||||||
struct rr_entry *known_ans = rr_entry_match(pkt->rr_ans, ans->e);
|
struct rr_entry *known_ans = rr_entry_match(pkt->rr_ans, ans->e);
|
||||||
|
|
||||||
@@ -1500,11 +1476,11 @@ static int mdnsd_set_host_info(struct mdnsd *svr, const char *hostname, uint32_t
|
|||||||
|
|
||||||
domain = check_mdns_domain(hostname);
|
domain = check_mdns_domain(hostname);
|
||||||
if (domain == MDNS_DOMAIN_LOCAL) {
|
if (domain == MDNS_DOMAIN_LOCAL) {
|
||||||
snprintf(mdns_suffix, sizeof(mdns_suffix), MDNS_SUFFIX_LOCAL);
|
snprintf(mdns_suffix, sizeof(mdns_suffix)-1, MDNS_SUFFIX_LOCAL);
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_NETUTILS_MDNS_XMDNS)
|
#if defined(CONFIG_NETUTILS_MDNS_XMDNS)
|
||||||
else if (domain == MDNS_DOMAIN_SITE) {
|
else if (domain == MDNS_DOMAIN_SITE) {
|
||||||
snprintf(mdns_suffix, sizeof(mdns_suffix), MDNS_SUFFIX_SITE);
|
snprintf(mdns_suffix, sizeof(mdns_suffix)-1, MDNS_SUFFIX_SITE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
@@ -2233,11 +2209,10 @@ void mdnsd_add_rr(struct mdnsd *svr, struct rr_entry *rr) {
|
|||||||
* On success, 0 is returned. On failure, a negative value is returned.
|
* On success, 0 is returned. On failure, a negative value is returned.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
int mdnsd_resolve_hostname(char *hostname, int *ipaddr)
|
int mdnsd_resolve_hostname(char *hostname, uint32_t *ipaddr)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
struct timeval old_time, cur_time;
|
struct timeval old_time, cur_time;
|
||||||
unsigned int time_diff;
|
|
||||||
int try_count;
|
int try_count;
|
||||||
int domain;
|
int domain;
|
||||||
|
|
||||||
@@ -2295,13 +2270,7 @@ int mdnsd_resolve_hostname(char *hostname, int *ipaddr)
|
|||||||
|
|
||||||
try_count = 0;
|
try_count = 0;
|
||||||
TIME_GET(old_time);
|
TIME_GET(old_time);
|
||||||
while (1) {
|
do {
|
||||||
TIME_GET(cur_time);
|
|
||||||
time_diff = TIME_DIFF_USEC(old_time, cur_time);
|
|
||||||
if (time_diff > (MDNS_HOSTNAME_RESOLVER_TIMEOUT_MSEC * 1000)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (try_count < MDNS_HOSTNAME_RESOLVER_MAX_TRY_COUNT) {
|
if (try_count < MDNS_HOSTNAME_RESOLVER_MAX_TRY_COUNT) {
|
||||||
struct rr_entry *a_e = NULL;
|
struct rr_entry *a_e = NULL;
|
||||||
struct rr_entry *aaaa_e = NULL;
|
struct rr_entry *aaaa_e = NULL;
|
||||||
@@ -2327,7 +2296,8 @@ int mdnsd_resolve_hostname(char *hostname, int *ipaddr)
|
|||||||
result = 0;
|
result = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
} while ((TIME_GET(cur_time),TIME_DIFF_USEC(old_time, cur_time)) <= (MDNS_HOSTNAME_RESOLVER_TIMEOUT_MSEC * 1000));
|
||||||
|
|
||||||
|
|
||||||
#ifdef MDNS_NO_RESPONDER_SUPPORT
|
#ifdef MDNS_NO_RESPONDER_SUPPORT
|
||||||
out_with_context:
|
out_with_context:
|
||||||
@@ -2448,13 +2418,7 @@ int mdnsd_discover_service(char *service_type, int discover_time_msec, struct md
|
|||||||
|
|
||||||
try_count = 0;
|
try_count = 0;
|
||||||
TIME_GET(old_time);
|
TIME_GET(old_time);
|
||||||
while (1) {
|
do {
|
||||||
TIME_GET(cur_time);
|
|
||||||
time_diff = TIME_DIFF_USEC(old_time, cur_time);
|
|
||||||
if (time_diff > (discover_time_msec * 1000)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (try_count < MDNS_HOSTNAME_RESOLVER_MAX_TRY_COUNT) {
|
if (try_count < MDNS_HOSTNAME_RESOLVER_MAX_TRY_COUNT) {
|
||||||
|
|
||||||
ptr_e = qn_create(create_nlabel(service_type_str), RR_PTR, 0);
|
ptr_e = qn_create(create_nlabel(service_type_str), RR_PTR, 0);
|
||||||
@@ -2469,7 +2433,7 @@ int mdnsd_discover_service(char *service_type, int discover_time_msec, struct md
|
|||||||
}
|
}
|
||||||
|
|
||||||
usleep(MDNS_SERVICE_DISCOVERY_WAIT_TIME_MSEC * 1000);
|
usleep(MDNS_SERVICE_DISCOVERY_WAIT_TIME_MSEC * 1000);
|
||||||
}
|
} while ((TIME_GET(cur_time),TIME_DIFF_USEC(old_time, cur_time)) <= (discover_time_msec * 1000));
|
||||||
|
|
||||||
if (lookup_service(g_svr, service_type_str, g_service_list, num_of_services) == 0) {
|
if (lookup_service(g_svr, service_type_str, g_service_list, num_of_services) == 0) {
|
||||||
*service_list = g_service_list;
|
*service_list = g_service_list;
|
||||||
|
|||||||
2
mdnsd.h
2
mdnsd.h
@@ -129,7 +129,7 @@ void mdnsd_add_rr(struct mdnsd *svr, struct rr_entry *rr);
|
|||||||
* On success, 0 is returned. On failure, a negative value is returned.
|
* On success, 0 is returned. On failure, a negative value is returned.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int mdnsd_resolve_hostname(char *hostname, int *ipaddr);
|
int mdnsd_resolve_hostname(char *hostname, uint32_t *ipaddr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mdnsd_discover_service() discovers services with the given service type string
|
* mdnsd_discover_service() discovers services with the given service type string
|
||||||
|
|||||||
Reference in New Issue
Block a user