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

Access to the packet MAC Header



Hi,

I'm trying to do some changes to the TwoStateErrorModel::corrupt(Packet*p)
in the same spirit as in ErrorModel::CorruptTime(Packet *p). I need to
access the MAC handler to retrieve the packet transmission time. I do 
that by creating an instance of the scheduler using :
	Scheduler &s = Scheduler::instance();
        double now = s.clock();
        double start = now - hdr_mac::access(p)->txtime();

When compiling, I get the following error:
	 In method `int TwoStateErrorModel::corrupt(classPacket *)':
	`hdr_mac' undeclared (first use this function)
	 (Each undeclared identifier is reported only once	
	 for each function it appears in.)

Why is hdr_mac unknown in TwoStateErrorModel::corrupt(Packet*p) although,
it is known in ErrorModel::CorruptTime(Packet *p)? And if this is the
case, how can I retrieve the packet txtime otherwise?

Any help is appreciated and thanks in advance,

--Hussein.