LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-04-2017, 07:54 AM   #1
Kalimuha
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Rep: Reputation: Disabled
Question 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) {
.... "

Last edited by Kalimuha; 12-04-2017 at 07:55 AM.
 
Old 12-04-2017, 10:04 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,084

Rep: Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486Reputation: 3486
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))
 
  


Reply

Tags
apit, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding new protocol to ns2 savankiran Programming 3 03-22-2017 01:39 PM
Error when adding LAR protocol in NS2 Helen jameel Linux - Software 28 04-03-2016 08:15 PM
adding new protocol in ns2.35 rc49 Linux - Newbie 1 09-26-2015 07:21 AM
adding new protocol to ns2 and aquasim Arktech Linux - Networking 0 07-13-2014 06:45 AM
make error in ns2.29 when adding new protocol assassin91 Linux - Newbie 25 04-23-2012 11:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration