Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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;
            }
        }

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.

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;
            }
        }

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 add my own conversation-like functionality. For my specific application, I was to do so in a fairly light-weight manner.

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 add 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.