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

Is "off_cmn_" a global value?



Hi,

I'm trying to modify PacketQueue::enque() and deque()
to support queue length in bytes rather than in packet
count.
I did the following in enque() and deque() (in "queue.h")

        virtual void enque(Packet* p) {
		.....
                ++len_;
/****/          hdr_cmn* ch = (hdr_cmn *)p->access(off_cmn_);
/****/          lenb_ += ch->size();
        }
        virtual Packet* deque() {
                Packet* p = head_;
                if (p != 0) {
                        --len_;
/***/           	hdr_cmn* ch = (hdr_cmn *)p->access(off_cmn_);
/***/           	lenb_ -= ch->size();
			......
                }

When I compile it, I got error saying "off_cmn_" undefined.
I suppose "off_cmn_" is a global value. If it is not, what
particular .h file I should include? Or, did I do anything 
wrong?

Please advice.
Thanks,

-- Keith.
-----------------------------------------------
Keith HungKei Chow
Network Architecture Lab, Communication Group,
Department of Electrical & Computer Engineering
University of Toronto
Ontario, Canada.
Tel: (416) 978-1611
Fax: (416) 978-4425
Email: [email protected]
       [email protected]
URL:   http://www.comm.utoronto.ca/~keith/
-----------------------------------------------