The easiest way of doing this is to do via tcl http://tagus.inesc-id.pt/~pestrela/ns2/ns2_tips.html#_Toc124667332
Pedro Vale Estrela > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Vinh Pham > Sent: terça-feira, 5 de Dezembro de 2006 22:20 > To: Ns-users@ISI.EDU > Subject: [ns] Mac-802_11 support for cross-layer notification > > > > Hi all. > > I want to modify the class Mac802_11 such that it sends a notification > to the routing module (e.g OLSR) each time a packet is discarded due to > max number of retransmissions have been reached. In the original > implementation, > Mac802_11 only have uptarget_ and downtarget_ as references to other > object instances. Suppose I want to introduce a new variable olsr_ in > the Mac802_11 class, holding a reference/pointer to the OLSR routing > module, how can I accomplish this? And where? Any suggestion is > appreciated. > > > Thanks for your help. > > Regards > > Vinh Pham