mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Moved #define NETDB_ELEM_SIZE from dns.h to netdb.h, where it belongs, and use sizeof() instead of hacked constants that are wrong on 64-bit platforms
This commit is contained in:
parent
142cc8fe2a
commit
1fd4b851f5
@ -58,6 +58,7 @@
|
|||||||
#include "lwip/snmp_structs.h"
|
#include "lwip/snmp_structs.h"
|
||||||
#include "lwip/snmp_msg.h"
|
#include "lwip/snmp_msg.h"
|
||||||
#include "lwip/dns.h"
|
#include "lwip/dns.h"
|
||||||
|
#include "lwip/netdb.h"
|
||||||
#include "netif/ppp/ppp.h"
|
#include "netif/ppp/ppp.h"
|
||||||
#include "netif/ppp/pppoe.h"
|
#include "netif/ppp/pppoe.h"
|
||||||
#include "netif/ppp/pppol2tp.h"
|
#include "netif/ppp/pppol2tp.h"
|
||||||
|
@ -70,13 +70,6 @@ extern "C" {
|
|||||||
#define DNS_RRCLASS_HS 4 /* Hesiod [Dyer 87] */
|
#define DNS_RRCLASS_HS 4 /* Hesiod [Dyer 87] */
|
||||||
#define DNS_RRCLASS_FLUSH 0x800 /* Flush bit */
|
#define DNS_RRCLASS_FLUSH 0x800 /* Flush bit */
|
||||||
|
|
||||||
/* The size used for the next line is rather a hack, but it prevents including socket.h in all files
|
|
||||||
that include memp.h, and that would possibly break portability (since socket.h defines some types
|
|
||||||
and constants possibly already define by the OS).
|
|
||||||
Calculation rule:
|
|
||||||
sizeof(struct addrinfo) + sizeof(struct sockaddr_in) + DNS_MAX_NAME_LENGTH + 1 byte zero-termination */
|
|
||||||
#define NETDB_ELEM_SIZE (32 + 16 + DNS_MAX_NAME_LENGTH + 1)
|
|
||||||
|
|
||||||
#if DNS_LOCAL_HOSTLIST
|
#if DNS_LOCAL_HOSTLIST
|
||||||
/** struct used for local host-list */
|
/** struct used for local host-list */
|
||||||
struct local_hostlist_entry {
|
struct local_hostlist_entry {
|
||||||
|
@ -92,6 +92,8 @@ struct addrinfo {
|
|||||||
};
|
};
|
||||||
#endif /* LWIP_DNS_API_DECLARE_STRUCTS */
|
#endif /* LWIP_DNS_API_DECLARE_STRUCTS */
|
||||||
|
|
||||||
|
#define NETDB_ELEM_SIZE (sizeof(struct addrinfo) + sizeof(struct sockaddr_in) + DNS_MAX_NAME_LENGTH + 1)
|
||||||
|
|
||||||
#if LWIP_DNS_API_DECLARE_H_ERRNO
|
#if LWIP_DNS_API_DECLARE_H_ERRNO
|
||||||
/* application accessable error code set by the DNS API functions */
|
/* application accessable error code set by the DNS API functions */
|
||||||
extern int h_errno;
|
extern int h_errno;
|
||||||
|
Loading…
Reference in New Issue
Block a user