Giter Club home page Giter Club logo

Comments (8)

adamgreen avatar adamgreen commented on July 19, 2024

I didn't see anything exposed from the C++ wrapper classes but lwIP supports the following C API that you should be able to use:

    void dns_setserver(u8_t numdns, ip_addr_t *dnsserver);

Set numdns to 0 to set the primary DNS server address.

Example:

#include <lwip/dns.h>

int main(void) {
    //

    // Set primary DNS to resolver1.opendns.com
    ip_addr_t primaryDnsServer;
    ip4_addr_set_u32(&primaryDnsServer, ipaddr_addr("208.67.222.222"));
    dns_setserver(0, &primaryDnsServer);

    //
}

from mbed-os.

mbednotifications avatar mbednotifications commented on July 19, 2024

I suppose it would be best to actually expose it. Should it be a separate
method or optional initialisation argument?
Separate method would make sense to me, but optional argument is perfectly
fine too...
On 31 Oct 2013 23:54, "Adam Green" [email protected] wrote:

I didn't see anything exposed from the C++ wrapper classes but lwIP
supports the following C API that you should be able to use:

void dns_setserver(u8_t numdns, ip_addr_t *dnsserver);

Set numdns to 0 to set the primary DNS server address.

Example:

#include <lwip/dns.h>
int main(void) {
// …

// Set primary DNS to resolver1.opendns.com
ip_addr_t primaryDnsServer;
ip4_addr_set_u32(&primaryDnsServer, ipaddr_addr("208.67.222.222"));
dns_setserver(0, &primaryDnsServer);

// …}


Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-27550385
.

You received this message because you are subscribed to the Google Groups
"mbed-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

from mbed-os.

adamgreen avatar adamgreen commented on July 19, 2024

I don't know who I am replying to here (mbednotifications) but here is my response anyway :)

I prefer the separate method as well. lwIP does default the primary DNS server to be the opendns one I used in my example above.

from mbed-os.

errordeveloper avatar errordeveloper commented on July 19, 2024

Ah, I made that mistake again... It was my reply. So OK, I'll add a separate method when I have a moment.

from mbed-os.

ciarmcom avatar ciarmcom commented on July 19, 2024

ARM Internal Ref: IOTMORF-329

from mbed-os.

sg- avatar sg- commented on July 19, 2024

@geky Is this resolved with the updated DNS query?

from mbed-os.

geky avatar geky commented on July 19, 2024

Yes, though given the date, I'm assuming this issue was raised about the old EthernetInterface?

from mbed-os.

sg- avatar sg- commented on July 19, 2024

Updated with new EthernetInterface.

from mbed-os.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.