[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] new packet type problem
hi there,
i am trying to implement a new packet type for my simulations.
i created a new struct, a static class, added the protocol to the enum in
packet.h and in the class to access the name. i also added the protocol to
the foreach {} command in ns-packet.tcl
when i try to compile and link the ns, i get the following error:
ANT/dynrtpsession.o: In function
`__static_initialization_and_destruction_0':
ANT/dynrtpsession.o(.text+0x1147): undefined reference to
`hdr_rtcp1::offset_'
collect2: ld returned 1 exit status
but i know that hdr_rtcp1::offset_ is declared!
struct hdr_rtcp1 {
RTCPHeader* pRTCP_;
//
static int offset_;
inline static int& offset() { return offset_; }
inline static hdr_rtcp1* access(const Packet* p) {
return (hdr_rtcp1*) p->access(offset_);
}
RTCPHeader* pRTCP() { return (pRTCP_); }
};
any idea?
od
--
Oliver Dawid * [email protected] * http://www.fet.uni-hannover.de/~od/