fork of VodafoneUSBModem with updated USBHost library
Dependencies: Socket USBHost lwip-sys lwip
Dependents: VodafoneUSBModemSMSTest
Diff: ip/PPPIPInterface.cpp
- Revision:
- 38:d19354028042
- Parent:
- 27:37d3ac289e86
- Child:
- 79:a6ac8206a58d
--- a/ip/PPPIPInterface.cpp Wed Sep 19 10:18:48 2012 +0000 +++ b/ip/PPPIPInterface.cpp Wed Sep 19 15:33:13 2012 +0000 @@ -43,6 +43,9 @@ extern "C" { #include "lwip/ip_addr.h" #include "lwip/inet.h" +#include "lwip/err.h" +#include "lwip/dns.h" + #include "netif/ppp/ppp.h" } @@ -331,6 +334,16 @@ DBG("Remote IP address: %s", inet_ntoa(addrs->his_ipaddr)); DBG("Primary DNS: %s", inet_ntoa(addrs->dns1)); DBG("Secondary DNS: %s", inet_ntoa(addrs->dns2)); + //Setup DNS + if (addrs->dns1.addr != 0) + { + dns_setserver(0, (struct ip_addr*)&(addrs->dns1)); + } + if (addrs->dns2.addr != 0) + { + dns_setserver(1, (struct ip_addr*)&(addrs->dns1)); + } + pIf->setConnected(true); pIf->setIPAddress(inet_ntoa(addrs->our_ipaddr)); break;