Hello ns users!
 I am trying to develop a new MANET routing protocol, following the steps 
described in the tutorial "Implementing a new MANET unicast routing protocol in 
NS2" . I have created the requested files and i have written the code, with 
small changes, but i haven't added any new variables or functions. My protocol 
is named myproto. Here are the errors i get:
 myproto/myproto.h:37: error: 'myproto_state' does not name a type
 myproto/myproto.h:38: error: 'myproto_rtable' does not name a type
 myproto/myproto.h:48: error: ISO C++ forbids declaration of 'myproto_state' 
with no type
 myproto/myproto.h:48: error: 'myproto_state' declared as an 'inline' field
 myproto/myproto.h:48: error: expected ';' before '&' token
 myproto/myproto.h:49: error: expected `;' before 'inline'
 myproto/myproto.h: In member function 'int& Myproto::accessible_var()':
 myproto/myproto.h:49: error: 'accessible_var_' was not declared in this scope
 myproto/myproto.cc: In constructor 'Myproto::Myproto(nsaddr_t)':
 myproto/myproto.cc:38: error: 'accessible_var_' was not declared in this scope
 myproto/myproto.cc: In member function 'virtual int Myproto::command(int, 
const char* const*)':
 myproto/myproto.cc:52: error: 'rtable_' was not declared in this scope
 myproto/myproto.cc:56: error: 'da_addr' was not declared in this scope
 myproto/myproto.cc: In member function 'void 
Myproto::recv_myproto_pkt(Packet*)':
 myproto/myproto.cc:108: warning: unused variable 'ih'
 myproto/myproto.cc:109: warning: unused variable 'ph'
 myproto/myproto.cc: In member function 'void Myproto::forward_data(Packet*)':
 myproto/myproto.cc:170: error: 'nsdaddr_t' was not declared in this scope
 myproto/myproto.cc:170: error: expected `;' before 'next_hop'
 myproto/myproto.cc:171: error: 'next_hop' was not declared in this scope
 make: *** [myproto/myproto.o] Error 1
  Please tell me what could be wrong. I really got stuck, don't know what to do 
in this point. Thank you in advance!
 Regards, Alexandra 
 
                
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2ยข/min or less.

Reply via email to