Install NAT on ns3-3.24 problem

142 views
Skip to first unread message

Tom

unread,
Apr 28, 2016, 8:01:24 AM4/28/16
to ns-3-users
HI all,

I am trying to apply the  patch1 & patch3  given in

in ns3-3.24

First, I patch the patch set 1 in ns3-3.24, and got some Hunk FAILED & Hunk succeeded

I try to  manually modified those FAILED element of files individually according to the patch set 1 

But I builded ns3 again, still got error message 

sudo ./waf configure --enable-examples --enable-tests  --disable-python
sudo ./waf build

../src/internet/test/ipv4-netfilter-test.cc: In constructor ‘Ipv4NetfilterTestSuite::Ipv4NetfilterTestSuite()’:
../src/internet/test/ipv4-netfilter-test.cc:130:43: error: no matching function for call to ‘Ipv4NetfilterTestSuite::AddTestCase(Ipv4NetfilterRemovePacket*)’
  AddTestCase(new Ipv4NetfilterRemovePacket);
                                           ^
../src/internet/test/ipv4-netfilter-test.cc:130:43: note: candidate is:
In file included from ../src/internet/test/ipv4-netfilter-test.cc:18:0:
./ns3/test.h:1181:8: note: void ns3::TestCase::AddTestCase(ns3::TestCase*, ns3::TestCase::TestDuration)
   void AddTestCase (TestCase *testCase, enum TestDuration duration);
        ^
./ns3/test.h:1181:8: note:   candidate expects 2 arguments, 1 provided

It seems like the function of "ipv4-netfilter-test.cc" is too old for the definition of ns3/test.h
How could I fix the problem ?
Am I missing something or something wrong ?
Please do help me  

Best Regards,
Tom

Tom

unread,
Apr 28, 2016, 8:05:47 AM4/28/16
to ns-3-users

This is the print screen of the error message


13072926_1099376686787673_2060867510_o.png

Konstantinos

unread,
Apr 28, 2016, 8:52:38 AM4/28/16
to ns-3-users
Hi, 

These patch can be applied directly on specific codebase, ie
To apply to ns-3-dev (as of changeset 3a0af8a1c005 August 8 2012), first apply patch 1, then apply patch 3.

That's 4yr old and several things have changed since in the internet module. I do not think that you will be able to apply the patch automatically onto ns-3.24 (we are currently on ns-3.25)
I would recommend to apply them by hand one by one. It's not such a big patch and only a couple of files need to be modified. The rest are new.
Message has been deleted

Tom

unread,
Apr 28, 2016, 9:13:20 AM4/28/16
to ns-3-users
Hi Konstantinos , 

Thanks a lot,

I manually apply patch set 1 by hand one by one several times , and still got the same problem.

Add these code in corresponding position, and also the new file in the right place.

I still don't know why...

These function that I mentioned was still got wrong.

It seems like not match.


Best Regards,
Tom

Konstantinos

unread,
Apr 28, 2016, 9:26:10 AM4/28/16
to ns-3-users
That's due to a change in the test API

You need to update this part
 AddTestCase(new Ipv4NetfilterRemovePacket);

to something like this:
 AddTestCase(new Ipv4NetfilterRemovePacket, TestCase::Quick);

Regards,
K.

林廣驊

unread,
Apr 29, 2016, 1:24:29 AM4/29/16
to ns-3-...@googlegroups.com
HI, 

I check the function, AddTestCase, of the test.h on ns-3.14 (original NAT environment) & ns-3.25  

ns-3.14 -->  
void AddTestCase (TestCase *testCase);

diffenent from

ns-3.25 -->  
void AddTestCase (TestCase *testCase, enum TestDuration duration);

But I don't know how to add the other parameter, 
enum TestDuration duration.

Please show me how to fix it in 
ipv4-netfilter-test.cc if you can.

Thanks you very much for your patience.


Best Regards,
Tom


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/DseWu2gZ8Ug/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Konstantinos

unread,
Apr 29, 2016, 3:35:16 AM4/29/16
to ns-3-users
Hi,

Studying the API you can find the possible alternatives for TestCast duration:

How long the test takes to execute.

Enumerator
QUICK 

Fast test.

EXTENSIVE 

Medium length test.

TAKES_FOREVER 

Very long running test.

Definition at line 1151 of file test.h.


Most of the cases are configured to be 'quick'.

Hope this helps.

Regards,
K.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Joahannes Bruno

unread,
Sep 14, 2016, 1:29:47 PM9/14/16
to ns-3-users
Friend, how you installed the NAT?

I have errors in version ns3.25.


I spent this step shown here, but more errors appear. Can you help me?

Attached is the log with errors. Thanks in advance.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
log_install_nat.log

Joahannes Bruno

unread,
Sep 14, 2016, 3:15:16 PM9/14/16
to ns-3-users
I managed to correct the error. Now that appears is: error:
"No matching function for call to 'std :: map <std :: pair <unsigned long int, unsigned char>, unsigned short int> :: map (int)': m_identification (0) m_netfilter (0)"

But I'm adding as is in the patch:

Ipv4L3Protocol::Ipv4L3Protocol()
 
: m_identification (0), m_netfilter (0)
{
  NS_LOG_FUNCTION
(this);
}

Any suggestion?

Tommaso Pecorella

unread,
Sep 14, 2016, 7:12:11 PM9/14/16
to ns-3-users
Yes, two suggestions: do NOT post your questions in more than one thread and read the posting guidelines.

T.
Reply all
Reply to author
Forward
0 new messages