LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   adding new protocol in ns2.35 (https://www.linuxquestions.org/questions/linux-software-2/adding-new-protocol-in-ns2-35-a-4175618931/)

Kalimuha 12-04-2017 07:54 AM

adding new protocol in ns2.35
 
Dear ns2 users, when I add some codes of APIT algorithm in cmu-trace.cc and make, the following error message is generated. Please how I can fix it?

" trace/cmu-trace.cc: In member function ‘void CMUTrace::format_apit(Packet*, int)’:
trace/cmu-trace.cc:1077:45: error: ‘HDR_APIT’ was not declared in this scope
struct hdr_apit *wd = HDR_APIT(p);
^
trace/cmu-trace.cc:1078:60: error: ‘HDR_APIT_BEACON’ was not declared in this scope
struct hdr_apit_beacon *bcn = HDR_APIT_BEACON(p);
^
trace/cmu-trace.cc:1079:57: error: ‘HDR_APIT_RSSI’ was not declared in this scope
struct hdr_apit_rssi *rssi = HDR_APIT_RSSI(p);
^
trace/cmu-trace.cc:1081:22: error: invalid use of incomplete type ‘struct CMUTrace::format_apit(Packet*, int)::hdr_apit’
switch(wd->pkt_type) {
.... "

knudfl 12-04-2017 10:04 AM

See my answer here https://stackoverflow.com/questions/...5-ubuntu-16-04

Defined in ``apit_packet.h´´
Code:

#define HDR_APIT(p) ((struct hdr_apit*)hdr_apit::access(p))
#define HDR_APIT_BEACON(p) ((struct hdr_apit_beacon*)hdr_apit::access(p))
#define HDR_APIT_RSSI(p) ((struct hdr_apit_rssi*)hdr_apit::access(p))



All times are GMT -5. The time now is 09:25 PM.