Hi, If you are interested in learning how tracing works in NS2, please read
http://www.ns2ultimate.com/post/3995318343/post-processing-ns2-result-using-ns2-trace-main-post The above posts are based on the normal trace. If you are interested in wireless trace you might have to modify it a bit. Please look at "new wireless trace format" at the link below: http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Trace_Formats Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On Sep 9, 2011, at 6:07 PM, Mariam A. Moustafa wrote: > > This may help, http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats > --------------------- > > #explanation of trace file > #ACTION: [s|r|D]: s -- sent, r -- received, D -- dropped > #WHEN: the time when the action happened > #WHERE: the node where the action happened > #LAYER: AGT -- application, > # RTR -- routing, > # LL -- link layer (ARP is done here) > # IFQ -- outgoing packet queue (between link and mac layer) > # MAC -- mac, > # PHY -- physical > #flags: > #SEQNO: the sequence number of the packet > #TYPE: the packet type > # cbr -- CBR data stream packet > # DSR -- DSR routing packet (control packet generated by routing) > # RTS -- RTS packet generated by MAC 802.11 > # ARP -- link layer ARP packet > #SIZE: the size of packet at current layer, when packet goes down, size > increases, goes up size decreases > #[a b c d]: a -- the packet duration in mac layer header > # b -- the mac address of destination > # c -- the mac address of source > # d -- the mac type of the packet body > # energy [ energy w ei x es y et z er m ]: > # w -- the total energy of the node > # x -- the total energy consumed while the node was in idle state > # y -- the total energy consumed while the node was in sleep state > # z -- the total energy consumed during packet transmission > # m -- the total energy consumed during packet reception > # flags: > # > #[......]: [ > # source node ip : port_number > # destination node ip (-1 means broadcast) : port_number > # ip header ttl > # ip of next hop (0 means node 0 or broadcast) > # ] > > >>>> Dear all, >>>> I wanted to count control packets in the trace file by using awk file, >>>> but I don't know which packets are control packet as the most type of >>>> packets are cbr from routing layer (RTR).can anyone tell me which kinds of >>>> packet are control packet in trace file? >>>> Regards, >>>> >>>> >>>> >>> >> >