2009-12-20

NS2 new trace format

###### event type (事件類型) ######
$1 ==> event [s: send(傳送); r: receive(接收); d:drop(丟棄); f: forward(轉送)]

###### general flag ######
$2 ==> -t
$3 ==> 時間

###### Next hop info (下一站的資訊) ######
$4 ==> -Hs
$5 ==> id for this node

$6 ==> -Hd
$7 ==> id for next hop towards the destination

###### Node property type tag (節點屬性類型標籤) ######
$8 ==> -Ni
$9 ==> node id (節點ID)

$10 ==> -Nx
$11 ==> node's x coordinate (節點的x座標位置)

$12 ==> -Ny
$13 ==> node's y coordinate (節點的y座標位置)

$14 ==> -Nz
$15 ==> node's z coordinate (節點的z座標位置)

$16 ==> -Ne
$17 ==> node energy level

$18 ==> -Nl
$19 ==> trace level [AGT: Agent trace ; RTR: Router trace; MAC: Mac trace]

$20 ==> -Nw
$21 ==> reason for the event (事件發生原因)

###### packet info at MAC level (封包在Mac層的資訊) ######
$22 ==> -Ma
$23 ==> duration

$24 ==> -Md
$25 ==> dest's ethernet address

$26 ==> -Ms
$27 ==> src's ethernet address

$28 ==> -Mt
$29 ==> ethernet type

###### Packet information at IP level (封包在IP層的資訊) ######
$30 ==> -Is
$31 ==> source address.Source port number (來源位置,a.b其中a為節點ID,b為埠號)

$32 ==> -Id
$33 ==> dest address.dest port number (目的位置,c.d其中c為節點ID,d為埠號)

$34 ==> -It
$35 ==> packet type (封包類型)

$36 ==> -Il
$37 ==> packet size (封包大小)

$38 ==> -If
$39 ==> flow id (資料流ID)

$40 ==> -Ii
$41 ==> unique id (唯一的ID編號)

$42 ==> -Iv
$43 ==> ttl value (Time To Live的值)

###### Packet info at Application level(封包在應用層的資訊) ######
包含的應用程式類型如arp, tcp或者是adhoc路由協定像是DSDR, DSR, AODV等等。
這個欄位都是以P所開頭的,且標籤為隨著應用程式不同而不同。

r -t 29.994272667 -Hs 3 -Hd -2 -Ni 3 -Nx 70.00 -Ny 50.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0

2009-12-17

仙劍奇俠傳三 (電視劇)

曲目曲名演唱類型
1.生生世世愛吳雨霏片頭曲
2.忘記時間胡歌片尾曲
3.此生不換青鳥飛魚插曲
4.光棍胡歌插曲
5.答應不愛你鄭中基插曲
6.偏愛張芸京插曲
7.我做我的王[9]兄弟聯插曲
8.你是我一首唱不完的歌郭蘅祈插曲
9.降魔劍
配樂
10.雪見 — 仙凡之旅
配樂
11.共伴闖天涯
配樂
12.景天 — 護甲
配樂
13.長卿 — 眾生平等
配樂
14.龍葵 — 千年等待
配樂

2009-12-15

NS2 LL (link-layer) Class

14.6 LL (link-layer) Class

The link-layer object is responsible for simulating the data link protocols. Many protocols can be implemented within this
layer such as packet fragmentation and reassembly, and reliable link protocol.
Another important function of the link layer is setting the MAC destination address in the MAC header of the packet. In the
current implementation this task involves two separate issues: finding the next–hop–node’s IP address (routing) and resolving
this IP address into the correct MAC address (ARP). For simplicity, the default mapping between MAC and IP addresses is
one–to–one, which means that IP addresses are re–used at the MAC layer.

VII. A new protocol for ns

NS2 如何傳送一個封包(How to transmit a packet?)