I begin implementing new protocol on NS3. It will be very helpful if there is any tutorial or example (shows how to implement new module other than www.nsam.org).

Specifically , i need to implement that one node (CSMA) multicasts locally a packet (UDP) which contains specific information and to estimate the time access share of the channel.