Mac OS X provides the usual POSIX and BSD networking functionality. For more information on the actual APIs, see Mac OS X Man Pages.
For the most part, this networking behaves just like it does on any other UNIX system. Mac OS X differs in one crucial way, however. It does not use /etc/hosts, /etc/resolv.conf, and other similar configuration files for network configuration. (More precisely, the file /etc/resolv.conf is provided for read-only use, but should not be modified directly. The file /etc/hosts is provided, but is not used by default.)
If you need to configure name server settings (or other network settings), you should use the System Configuration framework (described in System Configuration Programming Guidelines and System Configuration Framework Reference).
If you need to add static host entries, you should use Directory Services (described in Directory Service Framework Reference, the dscl(1) manual page, and “Open Directory and the dscl Tool” elsewhere in this document).
Last updated: 2008-04-08