Firefox API

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Firefox API

Fatemah Alharbi
Hello,



I’m using the latest version of Firefox on my Windows 10 Home edition and
Linux Ubuntu 14.04 LTS desktops. I noticed that Firefox always sends two
DNS requests: A and AAAA requests. I did an experiment to see which API is
used by Firefox and found that the API getaddrinfo() does send 2 DNS
requests on my Linux machine while it sends only one A request on my
Windows machine. This doesn’t guarantee that Firefox always uses this API.
Does Firefox uses multiple APIs depending on the OS? I would like to know
which API does Firefox use when sending DNS requests.


Thank you for your help. This is part of my PhD research and I appreciate
your cooperation.

--
Sincerely,
Fatemah Alharbi
PhD Student
Computer Science Department
SID 861185554
_______________________________________________
dev-tech-network mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-network
Reply | Threaded
Open this post in threaded view
|

Re: Firefox API

Daniel Stenberg
On Wed, 2 Dec 2015, Fatemah Alharbi wrote:

> I’m using the latest version of Firefox on my Windows 10 Home edition and
> Linux Ubuntu 14.04 LTS desktops. I noticed that Firefox always sends two DNS
> requests: A and AAAA requests. I did an experiment to see which API is used
> by Firefox and found that the API getaddrinfo() does send 2 DNS requests on
> my Linux machine while it sends only one A request on my Windows machine.
> This doesn’t guarantee that Firefox always uses this API. Does Firefox uses
> multiple APIs depending on the OS? I would like to know which API does
> Firefox use when sending DNS requests.

Firefox uses getaddrinfo() both on Windows and Linux. See
netwerk/dns/GetAddrInfo.cpp (the bigger part of that being special Android
code). The differences you see between Windows and Linux, I guess is because
of differences in IPv6 setup or connectivity somehow. Or possibly due to
getaddrinfo() implementation differences. I didn't spot any IPv6/IPv4
differences between platforms in the Firefox name resolving code.

--

  / daniel.haxx.se
_______________________________________________
dev-tech-network mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-network