Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'dissector_add' was not declared in this scope #2

Open
wriedel opened this issue Jan 13, 2013 · 4 comments · May be fixed by #8
Open

error: 'dissector_add' was not declared in this scope #2

wriedel opened this issue Jan 13, 2013 · 4 comments · May be fixed by #8

Comments

@wriedel
Copy link

wriedel commented Jan 13, 2013

Hi Folks,

any idea where the problem might be?

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o openflow-common.os -c -fPIC -I. -I/usr/local/Cellar/wireshark/wireshark-1.9.0-SVN-47042 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include openflow-common.cpp
In file included from openflow-common.cpp:9:
./of13/openflow-130.hpp:12:1: warning: "PROTO_TAG_OPENFLOW_VER" redefined
In file included from openflow-common.cpp:8:
./of12/openflow-120.hpp:13:1: warning: this is the location of the previous definition
openflow-common.cpp: In function 'void proto_reg_handoff_openflow()':
openflow-common.cpp:59: error: 'dissector_add' was not declared in this scope
scons: *** [openflow-common.os] Error 1
scons: building terminated because of errors.

Thank you,
Wolfgang

@ghost
Copy link

ghost commented Jan 16, 2013

Hi Wolfgang,

I tried cloning the repository and building from the scratch here, and it's working.
Did you follow the instructions in the README, including installing the dependencies?

Please, provide us with more information about the SO and versions involved.

Allan

@wriedel
Copy link
Author

wriedel commented Jan 17, 2013

Hi Allan,

OK removed and updated all kind of stuff and checked for dependencies. Wireshark is compiling fine from source.
I am no longer building info a dedicated subdirectory to easier match the path but I still get this:

[23:36:28][wriedel@wriedel-mbp:/usr/local/wireshark/OpenFlow/ng-of-dissector/src]$ scons install
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o openflow-common.os -c -fPIC -I. -I/usr/local/wireshark/wireshark-1.9.0-SVN-47135 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include openflow-common.cpp
openflow-common.cpp: In function 'void proto_reg_handoff_openflow()':
openflow-common.cpp:60: error: 'dissector_add' was not declared in this scope
scons: *** [openflow-common.os] Error 1
scons: building terminated because of errors.

I using latest wireshark-1.9.0-SVN-47135 and barnstorm-ng-of-dissector-6ac464c9dc56.tar.gz

Thank you,
Wolfgang

@ghost
Copy link

ghost commented Jan 22, 2013

Hi Wolfgang,

You are using the ng-of-dissector. We sort of forked it a while ago and added support for OpenFlow 1.2 and 1.3.
I haven't been following their development, so I can't help you. It might be some recent change, or perhaps even your Wireshark version (I remember it working with Wireshark 1.4 and 1.6).

Allan

@farosas
Copy link

farosas commented Nov 14, 2013

In Wireshark 1.10.3 I was able to fix this issue by replacing dissector_add() with dissector_add_uint(). It seems that dissector_add() is just an alias that no longer exists in newer versions of Wireshark.

Reference: http://ask.wireshark.org/questions/6738/how-does-dissector_add-work

legoscia added a commit to legoscia/ofdissector that referenced this issue Nov 20, 2013
dissector_add_uint was introduced in Wireshark 1.6.0, with dissector_add
remaining as a compatibility macro.  dissector_add was finally removed
in 1.6.11.

This closes CPqD#2.
@legoscia legoscia linked a pull request Nov 20, 2013 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants