8
2
Normally there's a "services" file in C:\Windows\System32\drivers\etc , it lists out the services running and the port to be used.
However what does the word "service" mean here? It's not the "Windows Service", which could be seen when you run "services.msc". Such 2 lists don't tally.
And, this "services" file content could be outdated -- nobody to update it: programs still can communicate through some port without updating the "services" file, if they have some agreement; also, if some program is not running, some port is not taken, the "Windows services file" is also not updated.
So what is this file for?
Anywhere could I find some documents? Maybe because of the popular file name, I have searched on internet but most links are about "Windows Services"... not this "Windows Services File"...
EDIT:
One more question, since the "services" file can be outdated, is there a way to list out all active "services"?
2Specifically the services file backs the
[getservbyname](http://msdn.microsoft.com/en-us/library/windows/desktop/ms738538(v=vs.85).aspx)
API which translates a service name into a socket number. – Richard – 2012-03-20T08:42:23.150@Richard: Perhaps, but it doesn't mention
services
. – Tamara Wijsman – 2012-03-20T08:50:07.990so this is a Windows Socket concept? sorry i'm not familiar here... is it that Windows Socket is a protocol lower than HTTP, TCP/IP, FTP, so that definition done in Windows Socket level can regulate behaviour on HTTP, TCP/IP, or FTP level? – athos – 2012-03-20T08:50:26.033
@athos: No, it's no protocol. Windows services just first translate the service name (eg.
http
) into the service port (eg.80
forhttp
), then provide that service port to the relevant protocol (TCP/IP). – Tamara Wijsman – 2012-03-20T08:51:47.0234
Sidenote: The naming, usage and format of this file comes from Unix where the file is
– RedGrittyBrick – 2012-03-20T09:46:07.390/etc/services
. Microsoft adopted this when they started to replace their proprietary networking protocol Netbeui with the open-source TCP/IP protocols that were becoming more important. See http://www.kuro5hin.org/story/2001/6/19/05641/7357