sir i have to create a new header type so i searched in the net and got the code in the website http://www.isi.edu/nsnam/ns/tutorial/index.html.
But in packet.h PT_PING and name_[PT_PING]="ping" is already defined and in ns-default.tcl Agent/Ping set packetSize_ 64 is also defined. which version you have used and while executing make command i got some errors the errors are as follows In file included from ping.h:12, from ping.cc:9: agent.h:41:23: animation.h: No such file or directory agent.h:42:27: trafficsource.h: No such file or directory In file included from ping.h:12, from ping.cc:9: agent.h:56: error: expected class-name before ',' token agent.h:101: error: ISO C++ forbids declaration of `TrafficSource' with no type agent.h:101: error: expected `;' before '*' token agent.h:102: error: ISO C++ forbids declaration of `TrafficSource' with no type agent.h:102: error: expected `;' before '*' token agent.h:126: error: ISO C++ forbids declaration of `TrafficSource' with no type agent.h:126: error: expected `;' before '*' token agent.h:135: error: `View' has not been declared agent.h:135: error: ISO C++ forbids declaration of `parameter' with no type agent.h: In member function `virtual int Agent::classid() const': agent.h:58: error: `ClassAgentID' undeclared (first use this function) agent.h:58: error: (Each undeclared identifier is reported only once for each function it appears in.) agent.h: At global scope: agent.h:171: error: `View' has not been declared agent.h:171: error: ISO C++ forbids declaration of `nv' with no type ping.cc: In member function `virtual TclObject* PingClass::create(int, const char* const*)': ping.cc:23: error: cannot allocate an object of type `PingAgent' ping.cc:23: error: because the following virtual functions are abstract: agent.h:73: error: virtual void Agent::findClosestCornertoPoint(double, double, double&, double&) const ping.cc: In constructor `PingAgent::PingAgent()': ping.cc:29: error: no matching function for call to `Agent::Agent (packet_t)' agent.h:56: note: candidates are: Agent::Agent(const Agent&) agent.h:133: note: Agent::Agent(const char*, double) agent.h:132: note: Agent::Agent(const char*, int, double) ping.cc: In member function `virtual int PingAgent::command(int, const char* const*)': ping.cc:40: error: `allocpkt' undeclared (first use this function) ping.cc:49: error: invalid conversion from `Packet*' to `int' /usr/include/sys/socket.h:136: error: too few arguments to function `ssize_t send(int, const void*, size_t, int)' ping.cc:49: error: at this point in file ping.cc: In member function `void PingAgent::recv(Packet*, Handler*)': ping.cc:64: error: `off_ip_' undeclared (first use this function) ping.cc:74: error: `allocpkt' undeclared (first use this function) ping.cc:82: error: invalid conversion from `Packet*' to `int' /usr/include/sys/socket.h:136: error: too few arguments to function `ssize_t send(int, const void*, size_t, int)' ping.cc:82: error: at this point in file ping.cc:93: error: no match for 'operator>>' in 'hdrip->hdr_ip::src_ >> *(Address::instance()->Address::NodeShift_ + 4u)' make: *** [ping.o] Error 1 so sir please help me.looking for your respose kindly. Thank You With Regards, N.ArunKumar (Final Year B.Tech Information Technology) Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/