Ask Your Question

alexr's profile - activity

2018-08-02 16:32:26 +0000 commented answer compile plugin with call to conversation_set_port2()

Great, thank you for doing that. I'll update my code to use those exports. I'd prefer that over my own implementation (p

2018-07-31 15:17:30 +0000 edited question compile plugin with call to conversation_set_port2()

compile plugin with call to conversation_set_port2() Background: I am writing a plugin dissector for a protocol that re

2018-07-31 15:17:00 +0000 edited question compile plugin with call to conversation_set_port2()

compile plugin with call to conversation_set_port2() Background: I am writing a plugin dissector for a protocol that re

2018-07-31 15:13:19 +0000 marked best answer compile plugin with call to conversation_set_port2()

Background:

I am writing a plugin dissector for a protocol that requires the use of conversations. The port in the second port/address pair for the conversation is determined in an OACK response to an initial packet. It's functionally identical to TFTP. In epan/dissectors/tftp.c on line 665, the dissector makes a call to conversation_set_port2 to handle modifying the conversation with the second port. conversation_set_port2 is defined in epan/conversation.c and declared as an extern in epan/conversation.h

Compiling my plugin fails with the following:

Build FAILED.
   "C:\Development\wireshark-build\Wireshark.sln" (default target) (1) ->
   "C:\Development\wireshark-build\plugins\epan\a615a\arinc615a.vcxproj.metaproj" (default target) (4) ->
   "C:\Development\wireshark-build\plugins\epan\a615a\arinc615a.vcxproj" (default target) (108) ->
   (Link target) ->
     packet-arinc615a.obj : error LNK2019: unresolved external symbol conversation_set_port2 referenced in function
    dissect_a615a [C:\Development\wireshark-build\plugins\epan\a615a\arinc615a.vcxproj]
     C:\Development\wireshark-build\run\RelWithDebInfo\plugins\2.9\epan\arinc615a.dll : fatal error LNK1120: 1 unre
   solved externals [C:\Development\wireshark-build\plugins\epan\a615a\arinc615a.vcxproj]

0 Warning(s)
2 Error(s)

Question:

A. What do I need to do to fix the unresolved external error?

OR

B. Am I doing something wrong in the way I am trying to modify the second port of the conversation?

Here is the relevant code snippet:

 }else if (conversation->options & NO_PORT_B){
            if (pinfo->destport == conversation_key_port1(conversation->key_ptr)){
               //Figure this compilation error out
               conversation_set_port2(conversation, pinfo->srcport);
            }
            else{
                return 0;
            }
        }

----------------------------- Update --------------------------------------

Per Jaap's answer, I am unable to use the function in question. My solution was to work around the issue by adding my own conversation-like functionality. For my specific application, I was able to do so in a fairly light-weight manner.

2018-07-31 15:13:19 +0000 received badge  Scholar (source)
2018-07-28 18:57:43 +0000 commented question compile plugin with call to conversation_set_port2()

Anders yes, conversation.h is included, i'm using many other functions that are in it without problem.

2018-07-28 18:55:24 +0000 commented answer compile plugin with call to conversation_set_port2()

Ok, thanks for the info. I want to avoid modifying the rest of the code base so the plugin is more portable. Do you have

2018-07-28 00:32:05 +0000 received badge  Editor (source)
2018-07-28 00:32:05 +0000 edited question compile plugin with call to conversation_set_port2()

compile plugin with call to conversation_set_port2() Background: I am writing a plugin dissector for a protocol that re

2018-07-28 00:31:23 +0000 asked a question compile plugin with call to conversation_set_port2()

compile plugin with call to conversation_set_port2() Background: I am writing a plugin dissector for a protocol that re