102#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_XID) != 0)
103#define DNS_RAND_TXID LWIP_RAND
105static u16_t dns_txid;
106#define DNS_RAND_TXID() (++dns_txid)
111#ifndef DNS_PORT_ALLOWED
112#define DNS_PORT_ALLOWED(port) ((port) >= 1024)
117#define DNS_MAX_TTL 604800
118#elif DNS_MAX_TTL > 0x7FFFFFFF
119#error DNS_MAX_TTL must be a positive 32-bit value
122#if DNS_TABLE_SIZE > 255
123#error DNS_TABLE_SIZE must fit into an u8_t
125#if DNS_MAX_SERVERS > 255
126#error DNS_MAX_SERVERS must fit into an u8_t
133#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0)
134#ifndef DNS_MAX_REQUESTS
135#define DNS_MAX_REQUESTS DNS_TABLE_SIZE
137#if DNS_MAX_REQUESTS > 255
138#error DNS_MAX_REQUESTS must fit into an u8_t
144#define DNS_MAX_REQUESTS DNS_TABLE_SIZE
148#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
149#ifndef DNS_MAX_SOURCE_PORTS
150#define DNS_MAX_SOURCE_PORTS DNS_MAX_REQUESTS
152#if DNS_MAX_SOURCE_PORTS > 255
153#error DNS_MAX_SOURCE_PORTS must fit into an u8_t
157#ifdef DNS_MAX_SOURCE_PORTS
158#undef DNS_MAX_SOURCE_PORTS
160#define DNS_MAX_SOURCE_PORTS 1
163#if LWIP_IPV4 && LWIP_IPV6
164#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) (((t) == LWIP_DNS_ADDRTYPE_IPV6_IPV4) || ((t) == LWIP_DNS_ADDRTYPE_IPV6))
165#define LWIP_DNS_ADDRTYPE_MATCH_IP(t, ip) (IP_IS_V6_VAL(ip) ? LWIP_DNS_ADDRTYPE_IS_IPV6(t) : (!LWIP_DNS_ADDRTYPE_IS_IPV6(t)))
166#define LWIP_DNS_ADDRTYPE_ARG(x) , x
167#define LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(x) x
168#define LWIP_DNS_SET_ADDRTYPE(x, y) do { x = y; } while(0)
171#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) 1
173#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) 0
175#define LWIP_DNS_ADDRTYPE_MATCH_IP(t, ip) 1
176#define LWIP_DNS_ADDRTYPE_ARG(x)
177#define LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(x) 0
178#define LWIP_DNS_SET_ADDRTYPE(x, y)
181#if LWIP_DNS_SUPPORT_MDNS_QUERIES
182#define LWIP_DNS_ISMDNS_ARG(x) , x
184#define LWIP_DNS_ISMDNS_ARG(x)
195#define SIZEOF_DNS_QUERY 4
207#define SIZEOF_DNS_ANSWER 10
209#define SIZEOF_DNS_ANSWER_ASSERT 12
213 DNS_STATE_UNUSED = 0,
215 DNS_STATE_ASKING = 2,
220struct dns_table_entry {
229#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
233#if LWIP_IPV4 && LWIP_IPV6
236#if LWIP_DNS_SUPPORT_MDNS_QUERIES
243struct dns_req_entry {
245 dns_found_callback found;
248#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0)
251#if LWIP_IPV4 && LWIP_IPV6
256#if DNS_LOCAL_HOSTLIST
258#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
261static struct local_hostlist_entry *local_hostlist_dynamic;
266#ifndef DNS_LOCAL_HOSTLIST_STORAGE_PRE
267#define DNS_LOCAL_HOSTLIST_STORAGE_PRE static
271#ifndef DNS_LOCAL_HOSTLIST_STORAGE_POST
272#define DNS_LOCAL_HOSTLIST_STORAGE_POST
274DNS_LOCAL_HOSTLIST_STORAGE_PRE
struct local_hostlist_entry local_hostlist_static[]
275 DNS_LOCAL_HOSTLIST_STORAGE_POST = DNS_LOCAL_HOSTLIST_INIT;
279static void dns_init_local(
void);
286static void dns_check_entries(
void);
294static struct udp_pcb *dns_pcbs[DNS_MAX_SOURCE_PORTS];
295#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
296static u8_t dns_last_pcb_idx;
298static u8_t dns_seqno;
300static struct dns_req_entry dns_requests[DNS_MAX_REQUESTS];
317#ifdef DNS_SERVER_ADDRESS
320 DNS_SERVER_ADDRESS(&dnsserver);
321 dns_setserver(0, &dnsserver);
325 sizeof(
struct dns_query) == SIZEOF_DNS_QUERY);
327 sizeof(
struct dns_answer) <= SIZEOF_DNS_ANSWER_ASSERT);
332#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) == 0)
333 if (dns_pcbs[0] ==
NULL) {
339 LWIP_ASSERT(
"For implicit initialization to work, DNS_STATE_UNUSED needs to be 0",
340 DNS_STATE_UNUSED == 0);
344 udp_recv(dns_pcbs[0], dns_recv,
NULL);
348#if DNS_LOCAL_HOSTLIST
364 if (dnsserver !=
NULL) {
365 dns_servers[numdns] = (*dnsserver);
367 dns_servers[numdns] = *IP_ADDR_ANY;
381dns_getserver(
u8_t numdns)
384 return &dns_servers[numdns];
401#if DNS_LOCAL_HOSTLIST
405#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC && defined(DNS_LOCAL_HOSTLIST_INIT)
407 struct local_hostlist_entry *
entry;
409 struct local_hostlist_entry local_hostlist_init[] = DNS_LOCAL_HOSTLIST_INIT;
412 struct local_hostlist_entry *init_entry = &local_hostlist_init[
i];
415 LWIP_ASSERT(
"namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN",
namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN);
419 char *entry_name = (
char *)
entry +
sizeof(
struct local_hostlist_entry);
422 entry->name = entry_name;
423 entry->addr = init_entry->addr;
424 entry->next = local_hostlist_dynamic;
425 local_hostlist_dynamic =
entry;
440dns_local_iterate(dns_found_callback iterator_fn,
void *iterator_arg)
443#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
444 struct local_hostlist_entry *
entry = local_hostlist_dynamic;
447 if (iterator_fn !=
NULL) {
448 iterator_fn(
entry->name, &
entry->addr, iterator_arg);
455 if (iterator_fn !=
NULL) {
456 iterator_fn(local_hostlist_static[
i].
name, &local_hostlist_static[
i].
addr, iterator_arg);
486 if (
hostname[hostnamelen - 1] ==
'.') {
493 return dns_lookup_local(
hostname, hostnamelen,
addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype));
500#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
501 struct local_hostlist_entry *
entry = local_hostlist_dynamic;
504 !
entry->name[hostnamelen] &&
505 LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype,
entry->addr)) {
517 !local_hostlist_static[
i].name[hostnamelen] &&
518 LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, local_hostlist_static[
i].
addr)) {
529#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
544 struct local_hostlist_entry *
entry = local_hostlist_dynamic;
545 struct local_hostlist_entry *last_entry =
NULL;
549 struct local_hostlist_entry *free_entry;
550 if (last_entry !=
NULL) {
553 local_hostlist_dynamic =
entry->next;
557 memp_free(MEMP_LOCALHOSTLIST, free_entry);
579 struct local_hostlist_entry *
entry;
584 LWIP_ASSERT(
"namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN",
namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN);
589 entry_name = (
char *)
entry +
sizeof(
struct local_hostlist_entry);
592 entry->name = entry_name;
594 entry->next = local_hostlist_dynamic;
595 local_hostlist_dynamic =
entry;
618dns_lookup(
const char *
name,
size_t hostnamelen,
ip_addr_t *
addr LWIP_DNS_ADDRTYPE_ARG(
u8_t dns_addrtype))
622#if DNS_LOCAL_HOSTLIST
623 if (dns_lookup_local(
name, hostnamelen,
addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) ==
ERR_OK) {
627#ifdef DNS_LOOKUP_LOCAL_EXTERN
628 if (DNS_LOOKUP_LOCAL_EXTERN(
name, hostnamelen,
addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype)) ==
ERR_OK) {
636 if ((dns_table[
i].
state == DNS_STATE_DONE) &&
639 LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, dns_table[
i].ipaddr)) {
673 u16_t response_offset = start_offset;
677 if ((
n < 0) || (response_offset == 0xFFFF)) {
683 if ((
n & 0xc0) == 0xc0) {
696 if (response_offset == 0xFFFF) {
712 if (response_offset == 0xFFFF) {
716 return (
u16_t)(response_offset + 1);
734 if ((
n < 0) || (
offset == 0)) {
738 if ((
n & 0xc0) == 0xc0) {
771 struct dns_query qry;
773 u16_t query_idx, copy_len;
774 const char *
hostname, *hostname_part;
777 struct dns_table_entry *
entry = &dns_table[
idx];
791 entry->state = DNS_STATE_UNUSED;
819 if (query_idx +
n + 1 > 0xFFFF) {
821 goto overflow_return;
825 query_idx = (
u16_t)(query_idx +
n + 1);
831 if (LWIP_DNS_ADDRTYPE_IS_IPV6(
entry->reqaddrtype)) {
839#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
840 pcb_idx =
entry->pcb_idx;
847#if LWIP_DNS_SUPPORT_MDNS_QUERIES
848 if (
entry->is_mdns) {
851 if (LWIP_DNS_ADDRTYPE_IS_IPV6(
entry->reqaddrtype)) {
852 dst = &dns_mquery_v6group;
855#if LWIP_IPV4 && LWIP_IPV6
860 dst = &dns_mquery_v4group;
867 dst = &dns_servers[
entry->server_idx];
869 err = udp_sendto(dns_pcbs[pcb_idx],
p,
dst, dst_port);
883#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
884static struct udp_pcb *
885dns_alloc_random_port(
void)
897 if (DNS_PORT_ALLOWED(
port)) {
908 udp_recv(pcb, dns_recv,
NULL);
924 for (
i = 0;
i < DNS_MAX_SOURCE_PORTS;
i++) {
925 if (dns_pcbs[
i] ==
NULL) {
929 if (
i < DNS_MAX_SOURCE_PORTS) {
930 dns_pcbs[
i] = dns_alloc_random_port();
931 if (dns_pcbs[
i] !=
NULL) {
933 dns_last_pcb_idx =
i;
939 for (
i = 0,
idx = (
u8_t)(dns_last_pcb_idx + 1);
i < DNS_MAX_SOURCE_PORTS;
i++,
idx++) {
940 if (
idx >= DNS_MAX_SOURCE_PORTS) {
944 dns_last_pcb_idx =
idx;
948 return DNS_MAX_SOURCE_PORTS;
963#if ((LWIP_DNS_SECURE & (LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT)) != 0)
967#if LWIP_IPV4 && LWIP_IPV6
971 LWIP_ASSERT(
"invalid response", LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[
idx].reqaddrtype));
972 dns_table[
idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV6;
974 LWIP_ASSERT(
"invalid response", !LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[
idx].reqaddrtype));
975 dns_table[
idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV4;
980#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0)
981 for (
i = 0;
i < DNS_MAX_REQUESTS;
i++) {
982 if (dns_requests[
i].found && (dns_requests[
i].dns_table_idx ==
idx)) {
985 dns_requests[
i].found =
NULL;
989 if (dns_requests[
idx].found) {
992 dns_requests[
idx].found =
NULL;
994#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
996 for (
i = 0;
i < DNS_MAX_REQUESTS;
i++) {
1000 if (dns_table[
i].
state == DNS_STATE_ASKING) {
1001 if (dns_table[
i].pcb_idx == dns_table[
idx].pcb_idx) {
1003 dns_table[
idx].pcb_idx = DNS_MAX_SOURCE_PORTS;
1008 if (dns_table[
idx].pcb_idx < DNS_MAX_SOURCE_PORTS) {
1010 udp_remove(dns_pcbs[dns_table[
idx].pcb_idx]);
1011 dns_pcbs[dns_table[
idx].pcb_idx] =
NULL;
1012 dns_table[
idx].pcb_idx = DNS_MAX_SOURCE_PORTS;
1019dns_create_txid(
void)
1025 txid = (
u16_t)DNS_RAND_TXID();
1029 if ((dns_table[
i].
state == DNS_STATE_ASKING) &&
1030 (dns_table[
i].txid == txid)) {
1043dns_backupserver_available(
struct dns_table_entry *pentry)
1066dns_check_entry(
u8_t i)
1069 struct dns_table_entry *
entry = &dns_table[
i];
1073 switch (
entry->state) {
1076 entry->txid = dns_create_txid();
1077 entry->state = DNS_STATE_ASKING;
1078 entry->server_idx = 0;
1089 case DNS_STATE_ASKING:
1090 if (--
entry->tmr == 0) {
1092 if (dns_backupserver_available(
entry)
1098 entry->server_idx++;
1104 dns_call_found(
i,
NULL);
1106 entry->state = DNS_STATE_UNUSED;
1122 case DNS_STATE_DONE:
1124 if ((
entry->ttl == 0) || (--
entry->ttl == 0)) {
1127 entry->state = DNS_STATE_UNUSED;
1130 case DNS_STATE_UNUSED:
1143dns_check_entries(
void)
1158 struct dns_table_entry *
entry = &dns_table[
idx];
1160 entry->state = DNS_STATE_DONE;
1168 if (
entry->ttl > DNS_MAX_TTL) {
1169 entry->ttl = DNS_MAX_TTL;
1171 dns_call_found(
idx, &
entry->ipaddr);
1173 if (
entry->ttl == 0) {
1179 if (
entry->state == DNS_STATE_DONE) {
1180 entry->state = DNS_STATE_UNUSED;
1195 struct dns_answer ans;
1196 struct dns_query qry;
1197 u16_t nquestions, nanswers;
1215 struct dns_table_entry *
entry = &dns_table[
i];
1216 if ((
entry->state == DNS_STATE_ASKING) &&
1217 (
entry->txid == txid)) {
1229 if (nquestions != 1) {
1234#if LWIP_DNS_SUPPORT_MDNS_QUERIES
1235 if (!
entry->is_mdns)
1248 if (res_idx == 0xFFFF) {
1264 if (res_idx + SIZEOF_DNS_QUERY > 0xFFFF) {
1267 res_idx = (
u16_t)(res_idx + SIZEOF_DNS_QUERY);
1276 if (dns_backupserver_available(
entry)) {
1287 while ((nanswers > 0) && (res_idx < p->tot_len)) {
1289 res_idx = dns_skip_name(
p, res_idx);
1290 if (res_idx == 0xFFFF) {
1298 if (res_idx + SIZEOF_DNS_ANSWER > 0xFFFF) {
1301 res_idx = (
u16_t)(res_idx + SIZEOF_DNS_ANSWER);
1306#if LWIP_IPV4 && LWIP_IPV6
1307 if (!LWIP_DNS_ADDRTYPE_IS_IPV6(
entry->reqaddrtype))
1312 if (
pbuf_copy_partial(
p, &ip4addr,
sizeof(ip4_addr_t), res_idx) !=
sizeof(ip4_addr_t)) {
1315 ip_addr_copy_from_ip4(dns_table[
i].ipaddr, ip4addr);
1325#if LWIP_IPV4 && LWIP_IPV6
1326 if (LWIP_DNS_ADDRTYPE_IS_IPV6(
entry->reqaddrtype))
1345 if ((
int)(res_idx +
lwip_htons(ans.len)) > 0xFFFF) {
1351#if LWIP_IPV4 && LWIP_IPV6
1352 if ((
entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) ||
1353 (
entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV6_IPV4)) {
1354 if (
entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) {
1356 dns_table[
i].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV6;
1359 dns_table[
i].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV4;
1362 dns_table[
i].state = DNS_STATE_NEW;
1371 dns_call_found(
i,
NULL);
1372 dns_table[
i].state = DNS_STATE_UNUSED;
1394dns_enqueue(
const char *
name,
size_t hostnamelen, dns_found_callback found,
1395 void *callback_arg LWIP_DNS_ADDRTYPE_ARG(
u8_t dns_addrtype) LWIP_DNS_ISMDNS_ARG(
u8_t is_mdns))
1401 struct dns_req_entry *req;
1402#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0)
1408#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0)
1411 if ((dns_table[
i].
state == DNS_STATE_ASKING) &&
1414#if LWIP_IPV4 && LWIP_IPV6
1415 if (dns_table[
i].reqaddrtype != dns_addrtype) {
1423 for (
r = 0;
r < DNS_MAX_REQUESTS;
r++) {
1424 if (dns_requests[
r].found ==
NULL) {
1425 dns_requests[
r].found = found;
1426 dns_requests[
r].arg = callback_arg;
1427 dns_requests[
r].dns_table_idx =
i;
1428 LWIP_DNS_SET_ADDRTYPE(dns_requests[
r].reqaddrtype, dns_addrtype);
1444 if (
entry->state == DNS_STATE_UNUSED) {
1448 if (
entry->state == DNS_STATE_DONE) {
1459 if ((lseqi >=
DNS_TABLE_SIZE) || (dns_table[lseqi].state != DNS_STATE_DONE)) {
1470#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0)
1473 for (
r = 0;
r < DNS_MAX_REQUESTS;
r++) {
1474 if (dns_requests[
r].found ==
NULL) {
1475 req = &dns_requests[
r];
1484 req->dns_table_idx =
i;
1487 req = &dns_requests[
i];
1494 entry->state = DNS_STATE_NEW;
1495 entry->seqno = dns_seqno;
1496 LWIP_DNS_SET_ADDRTYPE(
entry->reqaddrtype, dns_addrtype);
1497 LWIP_DNS_SET_ADDRTYPE(req->reqaddrtype, dns_addrtype);
1499 req->arg = callback_arg;
1503#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
1504 entry->pcb_idx = dns_alloc_pcb();
1505 if (
entry->pcb_idx >= DNS_MAX_SOURCE_PORTS) {
1508 entry->state = DNS_STATE_UNUSED;
1515#if LWIP_DNS_SUPPORT_MDNS_QUERIES
1516 entry->is_mdns = is_mdns;
1552 return dns_gethostbyname_addrtype(
hostname,
addr, found, callback_arg, LWIP_DNS_ADDRTYPE_DEFAULT);
1571 void *callback_arg,
u8_t dns_addrtype)
1574#if LWIP_DNS_SUPPORT_MDNS_QUERIES
1583#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) == 0)
1584 if (dns_pcbs[0] ==
NULL) {
1589 if (
hostname[hostnamelen - 1] ==
'.') {
1607#if LWIP_IPV4 && LWIP_IPV6
1608 if ((
IP_IS_V6(
addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV4)) ||
1609 (
IP_IS_V4(
addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV6)))
1616 if (dns_lookup(
hostname, hostnamelen,
addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) ==
ERR_OK) {
1619#if LWIP_IPV4 && LWIP_IPV6
1620 if ((dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) || (dns_addrtype == LWIP_DNS_ADDRTYPE_IPV6_IPV4)) {
1623 if (dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) {
1624 fallback = LWIP_DNS_ADDRTYPE_IPV6;
1626 fallback = LWIP_DNS_ADDRTYPE_IPV4;
1628 if (dns_lookup(
hostname, hostnamelen,
addr LWIP_DNS_ADDRTYPE_ARG(fallback)) ==
ERR_OK) {
1636#if LWIP_DNS_SUPPORT_MDNS_QUERIES
1653 return dns_enqueue(
hostname, hostnamelen, found, callback_arg LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)
1654 LWIP_DNS_ISMDNS_ARG(is_mdns));
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
#define LWIP_ARRAYSIZE(x)
#define LWIP_DEBUGF(debug, message)
#define LWIP_ASSERT(message, assertion)
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define LWIP_UNUSED_ARG(x)
#define LWIP_DBG_LEVEL_WARNING
#define DNS_MAX_NAME_LENGTH
#define LWIP_DNS_SUPPORT_MDNS_QUERIES
int pbuf_try_get_at(const struct pbuf *p, u16_t offset)
struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
u8_t pbuf_free(struct pbuf *p)
u16_t pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len)
err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
void pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data)
int lwip_stricmp(const char *str1, const char *str2)
int lwip_strnicmp(const char *str1, const char *str2, size_t len)
#define ip_addr_copy_from_ip6_packed(dest, src)
#define IP_IS_V6_VAL(ipaddr)
#define ip_addr_eq(addr1, addr2)
#define ip_addr_copy(dest, src)
#define ip_addr_set_loopback(is_ipv6, ipaddr)
#define ipaddr_aton(cp, addr)
#define ip_addr_debug_print_val(debug, ipaddr)
#define ip_addr_isany_val(ipaddr)
#define MEMCPY(DST, SRC, BYTES)
void * memp_malloc(memp_t type)
void memp_free(memp_t type, void *mem)
#define DNS_MQUERY_IPV4_GROUP_INIT
#define DNS_FLAG1_RESPONSE
#define DNS_FLAG2_ERR_MASK
#define DNS_MQUERY_IPV6_GROUP_INIT
typedefPACK_STRUCT_END struct ip6_addr_packed ip6_addr_p_t