Hacker News new | past | comments | ask | show | jobs | submit login

gethostbyname uses /etc/nsswitch.conf to determine how host names should be resolved. The document describes /etc/hosts and DNS, but there can be more.

On modern systems, it is likely that multicast DNS is performed to resolve local names before going to DNS.

I actually pointed this out in my Google interview and the interviewer instructed me to skip Name Service Switch part.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: