Wireshark-dev: [Wireshark-dev] Building OpenFlow 1.0 dissector for Wireshark 1.10.0 on Ubuntu 1
From: Phiho Hoang <[email protected]>
Date: Wed, 10 Jul 2013 17:18:02 -0400
Greetings,

Wireshark 1.10.0 was built from source on Ubuntu 13.04, (with gcc 4.7.3)

OpenFlow 1.0 dissector was also built from source using scons with this modification in 'Sconstruct' (copied from Sconstruct under Ubuntu 12.04):

# env = Environment(LINKFLAGS = '-flat_namespace')
env = Environment()

to work around this error:

$ scons install
...
scons: Building targets ...
gcc -o openflow.so -flat_namespace -shared packet-openflow.os plugin.os -L/usr/lib -L/usr/local/lib
gcc: error: unrecognized command line option '-flat_namespace'
scons: *** [openflow.so] Error 1
...

Would this '-flat_namespace' be required for the plugin to work properly on Ubuntu 13.04?

The share library 'openflow.so' was copied to '/usr/local/lib/wireshark/plugins/1.10.0/
The 'openflow.so' plugin does not show up in the About dialog box.

The modification to 'packet-openflow.c' was carried out as instructed here:

1/- Adding:

#define NO_STRINGS NULL

2/- Changing dissector_add() to dissector_add_uint() here:

void proto_reg_handoff_openflow()
{
    openflow_handle = create_dissector_handle(dissect_openflow, proto_openflow);
    dissector_add_uint(TCP_PORT_FILTER, global_openflow_proto, openflow_handle);
}

Did I miss something?

Thanks for your help.

Regards,

PhiHo