Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Firefox API

9 views
Skip to first unread message

Fatemah Alharbi

unread,
Dec 2, 2015, 6:19:09 PM12/2/15
to dev-tech...@lists.mozilla.org
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

Daniel Stenberg

unread,
Dec 3, 2015, 2:36:31 AM12/3/15
to Fatemah Alharbi, dev-tech...@lists.mozilla.org
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
0 new messages