[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling error under Linux





On Mon, 12 Apr 1999, Pissens Stephane wrote:

> 
> I've tried to compile NS 2.1b5 under Linux SuSe 6.0 ( i've installed tcl
> , tk , otcl and tclcl first ) and i got the
> following error :
> 
> mip.h: In method `MIPEncapsulator::MIPEncapsulator()':
> mip.h:66: warning: member initializers for `int MIPEncapsulator::mask_'
> mip.h:67: warning:   and `int MIPEncapsulator::shift_'
> mip.cc:53: warning:   will be re-ordered to match declaration order
> mip.cc: In method `MIPDecapsulator::MIPDecapsulator()':

try re-ordering the member variables in the initialiser. the order of
class declaration (in mip.h) should match the order of initialisation 
(in mip.cc)

> mip.cc:113: member `off_ip_' is private
> mip.cc: In method `void MIPDecapsulator::recv(class Packet *, class
> Handler *)':
> mip.cc:120: member `off_ip_' is private
> make: *** [mip.o] Error 1

that is odd since off_ip_ being a protected variable of class instance
MIPDecapsulator, should be accessible by the instance methods such as the
recv() function. well, you could try to use the hdr macro used all over ns
:

hdr_ip *pouthdr = HDR_IP(p) ;// defined in packet.h

instead of 
hdr_ip *pouthdr = (hdr_ip*)p->access(off_ip_); 

and get rid of off_ip_. you could do the same with all offsets.

hope this helps,
--Padma Haldar.


> 
> Can someone help me please
> Thanks
> 
> 

------------------------------------------------
Be true to your work, your word, and your friend.
--Thoreau

Padmaparna Haldar
ISI/USC.
310.822.1511 #352