1

I'm using NS 2.35 to study the performance of layer-2 switches in networks. There are 2 questions (shown below that bothered me for a long time):

  1. I'd like to know how to get the (Link-layer) Source Node of a packet at runtime in NS2? I want to simulate a layer-2 switch and process packets according to the input ports where they come in. So I want to get the source node of a packet (like one of the fields in packet-trace shows).
  2. Is there an easy way to get the total number of links connected to a node at runtime?

Any help would be greatly appreciated.

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
cgArsenal
  • 11
  • 2

0 Answers0