간접출처
http://overegoz.tistory.com/669

References

[1] http://4ellene.net/tt/1075


This revised trace support is backwards compatible with the old trace formatting and can be enabled by the following command:


$ns use-newtrace


This command should be called before the universal trace command $ns trace-all trace-fd. Primitive use-newtrace sets up new format for wireless tracing by setting a simulator variable called newTraceFormat. Currently this new trace support is available for wireless simulations only and shall be extended to rest of in the near future.




Event type : 이벤트

In the traces above, the first field (as in the older trace format) describes the type of event taking place at the node and can be one of the four types:

S : send / r : receive / d : drop / f : forward


General tag

The second field starting with "-t" may stand for time or global setting

-t : time / -t : * (global setting)


Node property tags

This field denotes the node properties like node-id, the level at which tracing is being done like agent, router or MAC. The tags start with a leading "-N" and are listed as below:

-Ni: node id

-Nx: node's x-coordinate

-Ny: node's y-coordinate

-Nz: node's z-coordinate

-Ne: node energy level

-Nl: trace level, such as AGT, RTR, MAC

-Nw: reason for the event. The different reasons for dropping a packet are given below:

"END" DROP_END_OF_SIMULATION

"COL" DROP_MAC_COLLISION

"DUP" DROP_MAC_DUPLICATE

"ERR" DROP_MAC_PACKET_ERROR

"RET" DROP_MAC_RETRY_COUNT_EXCEEDED

"STA" DROP_MAC_INVALID_STATE

"BSY" DROP_MAC_BUSY

"NRTE" DROP_RTR_NO_ROUTE i.e no route is available.

"LOOP" DROP_RTR_ROUTE_LOOP i.e there is a routing loop

"TTL" DROP_RTR_TTL i.e TTL has reached zero.

"TOUT" DROP_RTR_QTIMEOUT i.e packet has expired.

"CBK" DROP_RTR_MAC_CALLBACK

"IFQ" DROP_IFQ_QFULL i.e no buffer space in IFQ.

"ARP" DROP_IFQ_ARP_FULL i.e dropped by ARP

"OUT" DROP_OUTSIDE_SUBNET i.e dropped by base stations on receiving routing updates from nodes outside its domain.

Packet information at IP level

The tags for this field start with a leading "-I" and are listed along with their explanations as following:

-Is: source address.source port number

-Id: dest address.dest port number

-It: packet type

-Il: packet size

-If: flow id

-Ii: unique id

-Iv: ttl value

Next hop info

This field provides next hop info and the tag starts with a leading "-H".

-Hs: id for this node

-Hd: id for next hop towards the destination.

Packet info at MAC level

This field gives MAC layer information and starts with a leading "-M" as shown below:

-Ma: duration

-Md: dst's ethernet address

-Ms: src's ethernet address

-Mt: ethernet type

Packet info at "Application level"

The packet information at application level consists of the type of application like ARP, TCP, the type of adhoc routing protocol like DSDV, DSR, AODV etc being traced. This field consists of a leading "-P" and list of tags for different application is listed as below:

-P arp

Address Resolution Protocol. Details for ARP is given by the following tags:

-Po: ARP Request/Reply

-Pm: src mac address

-Ps: src address

-Pa: dst mac address

-Pd: dst address

-P dsr

This denotes the adhoc routing protocol called Dynamic source routing. Information on DSR is represented by the following tags:

-Pn: how many nodes traversed

-Pq: routing request flag

-Pi: route request sequence number

-Pp: routing reply flag

-Pl: reply length

-Pe: src of srcrouting->dst of the source routing

-Pw: error report flag ?

-Pm: number of errors

-Pc: report to whom

-Pb: link error from linka->linkb

-P cbr

Constant bit rate. Information about the CBR application is represented by the following tags:

-Pi: sequence number

-Pf: how many times this pkt was forwarded

-Po: optimal number of forwards

-P tcp

Information about TCP flow is given by the following subtags:

-Ps: seq number

-Pa: ack number

-Pf: how many times this pkt was forwarded

-Po: optimal number of forwards

This field is still under development and new tags shall be added for other applications as they get included along the way.


s -t 0.267662078 -Hs 0 -Hd -1 -Ni 0 -Nx 5.00 -Ny 2.00 -Nz 0.00 –Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 –Ii 20 -Is 0.255 -Id -1.255 –It


-S : 이벤트 ex) sent

-t 0.267662078 : 시간

-Hs 0 : 소스 노드(Hs) 0 에서

-Hd -1 : 목적지 노드(Hd) 1

-Ni 0 : 소스 노드 ID 는 0

-Nx 5.00 : x-co-ordinate는 5.00

-Ny 2.00 : s y-co-ordinate 은 2.00

-Nz 0.00 : z-co-ordinate은 0.00

–Ne -1.000000 : 에너지 레벨은 1.000000

-Nl RTR : 트레이스 레벨은 RTR

-Nw --- : 노드 이벤트는 없음

-Ma 0 : The MAC level information is given by duration (Ma) 0

-Md 0 : 목적지 이더넷 주소 (Md)0

-Ms 0 : 발신지 이더넷 주소(Ms)0

-Mt 0 : 이더넷 종류 0

–Ii 20 : The IP packet level information like packet id (Ii)

-Is 0.255 : 발신자 주소.발신자 포트번호

-Id -1.255 : 목적지 주소.목적지 포트번호

–It

Here, we see that a packet was sent (s) at time (t) 0.267662078 sec, 
from source node (Hs) 0 to destination node (Hd) 1.
The source node id (Ni) is 0, it's x-co-ordinate (Nx) is 5.00,
it's y-co-ordinate (Ny) is 2.00, it's z-co-ordinate (Nz) is 0.00,
it's energy level (Ne) is 1.000000, the trace level (Nl) is
RTR and the node event (Nw) is blank. The MAC level information is
given by duration (Ma) 0, destination Ethernet address (Md) 0,
the source Ethernet address (Ms) is 0 and Ethernet type (Mt) is 0.
The  IP packet level information like packet id (Ii), 
source address.source port number is given by (Is) while the destination address.
destination port number is (Id).
Posted by 배트
,