[Ns-developers] Linking ns-3 with openflow

Josh Pelkey jpelkey at gatech.edu
Thu Mar 10 06:47:46 PST 2011


Mathieu, these functions are declared and defined outside of ns-3,
contained in the source of the "openflow-mpls" project. Blake created
a wscript within this project to build these functions into a library.
Within ns-3, there is an interface to this openflow-mpls project. It
includes the openflow.h header from the linked library and uses
several of those functions there to interface with openflow in ns-3.
I know there are details missing in this description, but I hope that
answers your questions ok.

Lalith, I always forget about build/config.log. I'm about to start
working on this again today and will look there for some ideas.
Thanks!

--
Josh

On Thu, Mar 10, 2011 at 5:37 AM, Lalith Suresh <suresh.lalith at gmail.com> wrote:
> Hello Josh,
>
> On Wed, Mar 9, 2011 at 10:06 PM, Josh Pelkey <jpelkey at gatech.edu> wrote:
>> Hi all,
>>
>> Blake's ns-3-openflow code links an outside static library called
>> libopenflow.a to ns-3. Everything seems to build just fine, including
>> ns-3 files and examples that use openflow specific functions, but at
>> the very end I get this:
>>
>> debug/libns3.so: undefined reference to `set_vlan_pcp'
>> debug/libns3.so: undefined reference to `set_dl_addr'
>> debug/libns3.so: undefined reference to `ofp_logdir'
>> debug/libns3.so: undefined reference to `retrieve_buffer'
>> debug/libns3.so: undefined reference to `discard_buffer'
>> debug/libns3.so: undefined reference to `set_tp_port'
>> debug/libns3.so: undefined reference to `set_mpls_exp'
>> debug/libns3.so: undefined reference to `strip_vlan'
>> debug/libns3.so: undefined reference to `set_mpls_label'
>> debug/libns3.so: undefined reference to `set_vlan_vid'
>> debug/libns3.so: undefined reference to `set_nw_addr'
>> debug/libns3.so: undefined reference to `ofp_rundir'
>> collect2: ld returned 1 exit status
>>
>> I thought this might be waf/wscript related, but I just spent hours
>> doing basically trial and error, and I didn't get any farther. I also
>> thought it might have to do with the fact that I'm trying to link a
>> static library, so I tried to build openflow as a shared library, but
>> then ./waf configure refused to see the library -- even though it was
>> there. So then I thought that might have to do with the
>> "conf.check(fragment=...)" within the openflow wscript, but I really
>> have no idea where to start with that. Obviously, I'm kind of lost
>> when it comes to this waf/wscript/libraries thing. Does anybody have
>> any thoughts or suggestions? Below is a link to the wscript used to
>> link openflow, as well as the wscript which is used outside of ns-3 to
>> create the static library in the stand-alone openflow source:
>>
>> http://code.nsnam.org/bhurd/ns-3-openflow/file/c8e9530fcbdb/src/devices/switch/wscript
>> <--- This basically follows what ns-3-click did for its wscript
>> http://code.nsnam.org/bhurd/ns-3-openflow/file/c8e9530fcbdb/src/devices/switch/openflow/wscript
>
> What does build/config.log tell you?
>
>>
>> Thanks for any help.
>>
>> --
>> Josh Pelkey
>>
>
>
>
> --
> Lalith Suresh
> Department of Computer Science and Engineering
> Instituto Superior Técnico
> www.lalith.in
>



More information about the Ns-developers mailing list