1

I am new to NS2. In any tcl file where flooding is done, MESSAGE_PORT is always set to 42. What is the reason behind this?

1 Answers1

0
$ cd ns-2.35/
$ grep -Rin "PORT 42" *
tcl/edu/chan-interference/chanInterference.tcl:35:set MESSAGE_PORT 42
tcl/edu/hidden-terminal/sht.tcl:35:set MESSAGE_PORT 42
tcl/edu/rts-cts/rts-cts-data-ack.tcl:35:set MESSAGE_PORT 42
tcl/ex/flooding.tcl:46:set MESSAGE_PORT 42
tcl/ex/wireless-flooding.tcl:46:set MESSAGE_PORT 42
tcl/test/test-suite-message.tcl:46:set MESSAGE_PORT 42

Please read the files. Some of the code is just a reuse from one file to the others.

The port number may be your choice. There seems to be no difference with e.g. MESSAGE_PORT 1, 2, 40, 41, 42, 43, 44, 101.


"Agent/Message" : See common/message.cc ( Or use $ grep -Rin message * ... to know all message code.

Knud Larsen
  • 3,084