Hi H.Abdul Gaffar, When a packet is collided, HDR_CMN(pkt)->error() will return a non-zero number, which is most likely 1. However, please be cautious that when an error packet reception is caused due to low transmission power (long distance), HDR_CMN(pkt) ->error() could also return a non-zero value. If you need, you can do some minor modifications in underwatermac.cc to differentiate two cases. Thanks, Lina Pu CSE, University of Connecticut -----Original Message----- From: Mailing list of Aqua-Sim, an Underwater Sensor Network Simulator [mailto:[log in to unmask]] On Behalf Of Abdulgaffar H Sent: Wednesday, September 30, 2015 3:08 PM To: [log in to unmask] Subject: awk for MAC protocol. Dear sir, how to calculate the number of packet collision in MAC protocol in Aqua-Sim. Thanks & Regards, H.Abdul Gaffar.