• Tidak ada hasil yang ditemukan

NS2 How to make new wireless protocols?

N/A
N/A
Protected

Academic year: 2024

Membagikan "NS2 How to make new wireless protocols?"

Copied!
6
0
0

Teks penuh

(1)

NS2

How to make new wireless protocols?

Chang-Gun Lee ([email protected]) Assistant Professor

The School of Computer Science and Engineering Seoul National University

(2)

Add a new MAC protocol p

• Same as you did before

– Make newMac.cc and newMac.h

• It is a good idea to start by copying files mac-802-11.cc and mac-802- 11 h from ns-2 30/mac

11.h from ns 2.30/mac

– Register newMac protocol into NS

• Modify packet.h, ns-packet.tcl, ns-default.tcl files of NS

– Rebuild ns

(3)

Add a new Ad-hoc Routing Protocol g

• Basically the same as you did before

M k D d d D d h

– Make newDsdv.cc and newDsdv.h

• It is a good idea to start by copying files dsdv.cc, dsdv.h, rtable.cc, rtable.h from ns-2.30/dsdv

– Register the new protocol into NS only if a new header is made

• Modify packet.h, ns-packet.tcl, ns-default.tcl files of NS

Make newDsdv tcl by referring dsdv tcl in ns 2 30/tcl/mobility – Make newDsdv.tcl by referring dsdv.tcl in ns-2.30/tcl/mobility – Edit ns-2.30/tcl/lib/ns-lib.tcl

• find the first occurrence of dsdv. Do the same for newDsdv

import newDsdv.tcl

• find the second occurrence of dsdv. Do the same for newDsdv

create newDsdv agentg

• find the third occurrence of dsdv.

define your create-newDsdv-agent function by programming what to do when create a newDsdv agentg

– Rebuild ns

(4)

What if the new protocol requires restructuring of mobile nodes?

restructuring of mobile nodes?

for DSDV for DSR

(5)

What if the new protocol requires restructuring of mobile nodes?

• ns-2.30/tcl/lib/ns-mobilenode.tcl has the

description on the structure of a mobile node

• Copy the file and edit it as needed

• Copy the file and edit it as needed

(6)

Homework 9

• Make a newDsdv

– Add or Modify at least one feature of DSDV Add or Modify at least one feature of DSDV

• Clearly explain the added or modified features in your report

– Implement newDsdv with the added or modified features

• Run the simulation to show the difference between DSDV

• Run the simulation to show the difference between DSDV

and newDsdv

Referensi

Dokumen terkait

Elegant and smart is the way to go. Opt out of the baseball cap, t-shirt and jeans. Try and wear a suit or at least a regular buttoned shirt with an elegant dark jacket. It

Don’t be a stranger to the site you’ve joined and I recommend that you visit the site at least once a day during the lifetime of your membership.</p> <p>So there you

At the very least you’ll make some money ˘ maybe not a lot, just a few dollars a month (Google only pays out in $100 increments mind you, so it may take a while to get that first

For example, will it be a free stuff site like http://www.1freebieseeking.com or will it be a more larger general site like http://www.simplysearch4it.com with online games

- medium amounts of files (e-mail messages, project documents and work documents) can be backed up daily, weekly or monthly (at least) - large amounts of data (e-mail messages,

This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.2 of this license or (at your option) any later version%.

Manuscripts typed clearly in English with double spacing on one side of A4 size white paper with at least 2.54 cm margin on all sides and pages numbered consecutively should be

The results of the study explain that achieving sustainable e-Government includes at least five critical dimensions which consist of legal support, simplification of bureaucracy or