1. Complier error at the first time

Recheck the Makefile under your ns directory. Make sure the newly added files are added in the Makefile.

  1. When a channel receives a packet, to which interface or radio the channel should forward the packet?

The packet will be only forwarded to the interface associated with the channel.

  1.  How to handle the situation when the number of channels a node wants to access is dynamic?

During the configuration for the TCL script, the channel number should be defined to the maximal number the simulation required. During the simulation, how many channels a node can access totally depends on user's algorithm.