Why does Windows have %systemroot%/system32/drivers/etc/hosts, as opposed to something more "Windowsy"? It feels like a relic from the BSD derivative Windows got some bits from eons ago. Is this purely a compatibility thing?

link|improve this question
Unix (and Linux) is a great system that works very well. Implementing things like /etc/hosts is a good idea because it's beautifully simple and extremely effective. Perhaps a developer at Microsoft decided to copy this concept instead of re-inventing the wheel. – Randolf Richardson Nov 8 '11 at 23:34
feedback

closed as not constructive by Linker3000, Gareth, random Nov 9 '11 at 18:08

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

1 Answer

up vote 4 down vote accepted

Yes it arrived with Microsoft's adoption of TCP/IP based on the BSD sockets API as implemented according to the WinSock spec.

Winsock follows the Windows Open System Architecture (WOSA) model; it defines a standard service provider interface (SPI) between the application programming interface (API), with its exported functions and the protocol stacks. It uses the sockets paradigm that was first popularized by Berkeley Software Distribution (BSD) UNIX. It was later adapted for Windows in Windows Sockets 1.1

http://msdn.microsoft.com/en-us/library/windows/desktop/ms740673(v=vs.85).aspx

Compatible as in

A local text file in the same format as the 4.3 Berkeley Software Distribution (BSD) UNIX \etc\hosts file.

http://technet.microsoft.com/en-us/library/bb727005.aspx


One version of the story is here

link|improve this answer
That's far more reasonable than expected. Thanks :) – Malediction Nov 8 '11 at 23:45
1  
@David: The /etc/hosts format is UNIX-style; a simple list of "address hostname [aliases]" entries. The one described in RFC 952 is way more complex. – grawity Nov 9 '11 at 0:47
1  
And now I was expecting an Old New Thing post I haven't read yet. . . – surfasb Nov 9 '11 at 3:04
@surfasb: Yeah Chen's blog is always worth reading. However " 'A question about the windows networking system...' - I have no idea.", he wasn't involved in everything. – RedGrittyBrick Nov 9 '11 at 9:54
1  
@RedGrittyBrick: As always, we forget that he's still human, and you know, didn't write Windows himself. – surfasb Nov 9 '11 at 17:50
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.