how to access system files such as network libraries? I am trying to find some algorithms about the implementation of network stack for Mac OS X, can I access the actual codes from the operating system itself.

Any suggestions are very much appreciated.

Thanks
Apple has published quite a lot of source code


Open Source: Source code for a lot of frameworks and commands
Open Source Development Resources


PS: Any detailled discussion about the code (or even where to find which functionality) is off topic on AskDifferent and should be discussed on StackOverflow.