PPP, make DNS a little more optional if LWIP_DNS is unset

This commit is contained in:
Sylvain Rochet
2015-03-07 23:15:00 +01:00
parent 3ca5184998
commit b3218d45f3
5 changed files with 21 additions and 2 deletions

View File

@@ -212,7 +212,11 @@ typedef struct ppp_settings_s {
#else
unsigned int :1; /* 1 bit of padding */
#endif /* EAP_SUPPORT */
#if LWIP_DNS
unsigned int usepeerdns :1; /* Ask peer for DNS adds */
#else
unsigned int :1; /* 1 bit of padding */
#endif /* LWIP_DNS */
unsigned int persist :1; /* Persist mode, always try to open the connection */
#if PRINTPKT_SUPPORT
unsigned int hide_password :1; /* Hide password in dumped packets */
@@ -288,7 +292,9 @@ typedef struct ppp_settings_s {
struct ppp_addrs {
#if PPP_IPV4_SUPPORT
ip_addr_t our_ipaddr, his_ipaddr, netmask;
#if LWIP_DNS
ip_addr_t dns1, dns2;
#endif /* LWIP_DNS */
#endif /* PPP_IPV4_SUPPORT */
#if PPP_IPV6_SUPPORT
ip6_addr_t our6_ipaddr, his6_ipaddr;

View File

@@ -447,8 +447,10 @@ int sifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr, u32_t net_mask);
int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr);
int sifproxyarp(ppp_pcb *pcb, u32_t his_adr);
int cifproxyarp(ppp_pcb *pcb, u32_t his_adr);
#if LWIP_DNS
int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2);
int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2);
#endif /* LWIP_DNS */
#if VJ_SUPPORT
int sifvjcomp(ppp_pcb *pcb, int vjcomp, int cidcomp, int maxcid);
#endif /* VJ_SUPPORT */