Here are some tips on enabling openflow module, in ns-3.33 and ns-3.38.
You are mentioning two different releases with two different build
systems (Waf and CMake).
To enable openflow in the build, Waf (ns-3.33) or CMake (ns-3.38) needs
to find the 'libopenflow.a' library, plus some headers.
Both Waf and CMake have some heuristics to find these items, if they are
built and installed according to how the bake build system builds the
'ns-3-allinone' package.
Namely, if you use 'bake.py' to configure and build ns-3-allinone (or
the 3.33 or 3.38 versions of these), then openflow will be downloaded
and built one directory up from ns-3, and the build systems will find
them there.
If you do not see openflow enabled, check the output of './waf configure
-vvv'; it may give you some hints. Check also that the library
'libopenflow.a' was built, usually in the 'build' directory of openflow
library.
For our latest release (ns-3.39), you should be able to use bake as
follows, and it should be the same for ns-3.38. Below is the output
from my testing of this just now on ns-3.39:
$ cd bake
$ export PATH=$PATH:`pwd`/build/bin
$ export LD_LIBRARY_PATH=`pwd`/build/lib
$ ./bake.py configure -e ns-allinone-3.39
$ ./bake.py show
You should see:
module: openflow-dev (enabled)
depends on:
libxml2-dev (optional:False)
mercurial (optional:False)
If this doesn't say 'enabled', you are missing either mercurial or
libxml2-dev packages on your system.
Then do:
$ ./bake.py download
$ ./bake.py build
You should see this:
>> Building openflow-dev - OK
Then, it should build ns-3.39 with openflow support. If you later clean
and reconfigure in that ns-3.39 directory, the ns3 script should find
the openflow files and report:
ns-3 OpenFlow Integration : ON
The process should be the same for Waf and ns-3.33.
- Tom
On 7/14/23 4:02 AM, Shilpi Mittal wrote:
> Hi
>
> When I tried to enable openflow through openflow-dev from git hub library.
> It was successful with configuration and build. but try to execute
> openflow.cc in scratch file, it was showing as below.
>
> Kindly suggest
>
> image.png
>
> On Thu, Jul 13, 2023 at 8:52 PM Tom Henderson <
to...@tomh.org
> <mailto:
to...@tomh.org>> wrote:
>
> The openflow library needs to be built to enable openflow examples
> to be
> built.
>
> The easiest way to do this is to build ns-3 using the 'allinone' module
> specified in the bake build tool, as described here:
>
>
https://www.nsnam.org/docs/release/3.39/tutorial/html/getting-started.html#downloading-ns-3-using-bake <
https://www.nsnam.org/docs/release/3.39/tutorial/html/getting-started.html#downloading-ns-3-using-bake>
> <mailto:
ns-3-users%2Bunsu...@googlegroups.com>
> > <mailto:
ns-3-users+...@googlegroups.com
> <mailto:
ns-3-users%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
>
https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com <
https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com> <
https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com?utm_medium=email&utm_source=footer <
https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> <mailto:
ns-3-users%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ns-3-users/97fe310c-81d0-4005-7e17-5ead8801b34b%40tomh.org <
https://groups.google.com/d/msgid/ns-3-users/97fe310c-81d0-4005-7e17-5ead8801b34b%40tomh.org>.
>
https://groups.google.com/d/msgid/ns-3-users/CADeTpUfxG-7-80by1Bidzr_aFkQUdFOyyN%3D_8ggopiMWu-QsFg%40mail.gmail.com <
https://groups.google.com/d/msgid/ns-3-users/CADeTpUfxG-7-80by1Bidzr_aFkQUdFOyyN%3D_8ggopiMWu-QsFg%40mail.gmail.com?utm_medium=email&utm_source=footer>.