  By analyzing the source codes of ns-2, we discuss the simulated
implementations of wireless channels, network interfaces and mostly the 802.11
MAC protocol in ns-2. We also notice the "bugs" of the 802.11 simulation
compared with the reality, and present an extension to fading channels as well.
