[Ns-developers] domain specific network layer implementation in ns-3

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Mon May 25 02:35:19 PDT 2009


hi,

On Fri, 2009-05-22 at 10:57 -0500, Egemen Cetinkaya wrote:
> Hello all,
> 
> What are the steps for implementing a new network protocol to use instead of
> IPv4. My understanding is that ns-3 is primarily simulating Internet like
> networks, but if new network-layer protocols need to be developed for
> specific domains can ns-3 handle such a task?

yes, it can. There are two things you need to take care of:
  1) layer 2 to 3 and vice-versa
  2) layer 3 to 4 or higher and vice-versa

layer 3 can call layer 2 with src/node/net-device.h.

layer 3 can be called by layer 2 with src/node/node.h RegisterProtocol 

layer 3 can be called by layer 4 or higher with sockets:
src/node/socket.h. If you have a new protocol, you need to create a new
kind of socket, create a new kind of socket factory, and aggregate your
protocol, and the socket factory to the node. I think that raw ip
sockets is a simple example of that (see
src/internet-stack/ipv4-l3-protocol and
src/internet-stack/ipv4-raw-socket-factory)

Mathieu



More information about the Ns-developers mailing list