Added sequential dns resolver function for netconn api (netconn_gethostbyname)

This commit is contained in:
goldsimon
2007-11-16 17:16:17 +00:00
parent 7e447c83fb
commit e2cd201f6a
5 changed files with 112 additions and 0 deletions

View File

@@ -181,6 +181,9 @@ err_t netconn_join_leave_group (struct netconn *conn,
struct ip_addr *interface,
enum netconn_igmp join_or_leave);
#endif /* LWIP_IGMP */
#if LWIP_DNS
err_t netconn_gethostbyname(const char *name, struct ip_addr *addr);
#endif /* LWIP_DNS */
#define netconn_err(conn) ((conn)->err)
#define netconn_recv_bufsize(conn) ((conn)->recv_bufsize)

View File

@@ -37,6 +37,8 @@
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
#include "lwip/ip_addr.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#ifdef __cplusplus
extern "C" {
@@ -86,6 +88,15 @@ struct api_msg {
struct api_msg_msg msg;
};
#if LWIP_DNS
struct dns_api_msg {
const char *name;
struct ip_addr *addr;
sys_sem_t sem;
err_t *err;
};
#endif /* LWIP_DNS */
void do_newconn ( struct api_msg_msg *msg);
void do_delconn ( struct api_msg_msg *msg);
void do_bind ( struct api_msg_msg *msg);
@@ -101,6 +112,10 @@ void do_close ( struct api_msg_msg *msg);
void do_join_leave_group( struct api_msg_msg *msg);
#endif /* LWIP_IGMP */
#if LWIP_DNS
void do_gethostbyname(void *arg);
#endif /* LWIP_DNS */
#ifdef __cplusplus
}
#endif