OpcLabs.Pcap communication package: Difference between revisions

From OPC Labs Knowledge Base
(Created page with "(tbd)")
 
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
(tbd)
[[Category:Communication packages]] [[Category:OPC UA PubSub]] [[Category:Wireshark]]
= Introduction =
You need to use the OpcLabs.Pcap communication package (the OpcLabs.Pcap assembly and its dependencies) for following purposes:
* OPC UA PubSub Ethernet transport (the "opc.eth" scheme).
* OPC UA PubSub reading or writing Wireshark capture files.
{{Note|You do '''not''' need OpcLabs.Pcap if you are just using OPC UA PubSub UDP or MQTT (UADP or JSON message mapping) over physical network, even when the network itself is, as it is commonly the case, based on the Ethernet technology.}}
{{OpcCmd for PubSub}}
See also: [[Using communication packages]].
 
= Licensing =
OpcLabs.Pcap depends on SharpPcap and PacketDotNet libraries that are licensed under LGPL.
= Strong-naming =
The OpcLabs.Pcap assembly is not strong-named.
= Assembly Referencing =
<p>QuickOPC assemblies (such as OpcLabs.EasyOpcUA) do not reference the OpcLabs.Pcap assembly (they cannot - because they are strong-named but
OpcLabs.Pcap is not). This means that by default, OpcLabs.Pcap will not become part of your project output, even if your code&nbsp;uses the features for which
it is needed. It is your responsibility to make sure that&nbsp;a copy of OpcLabs.Pcap assembly and its dependencies is available to your app when it runs.</p>
 
<p>We recommend that you yourself put a reference to the OpcLabs.Pcap assembly to your project in such cases. When built by Visual Studio, the OpcLabs.Pcap
assembly and its assembly dependencies (transitively) will be copied to the project's output directory. In most hosting environments, this is sufficient for
the OpcLabs.Pcap assembly be found in runtime (at least when the current directory is the directory where the program binaries reside). In some cases, this
approach will not work, and you will need to take additional steps to make sure that the OpcLabs.Pcap assembly and its dependencies are copied to their
destination, and properly located in runtime when QuickOPC attempts to load them.</p>
 
= Assembly Dependencies =
OpcLabs.Pcap depends on SharpPcap and PacketDotNet assemblies; they, in turn, may depend on other assemblies as well.
 
= Library/Driver Dependencies =
<p>For live packet capture (OPC UA PubSub Ethernet mapping), OpcLabs.Pcap has (through SharpPcap) additional dependencies:</p>
 
<ul>
    <li>On Windows, it requires the <strong>WinPcap</strong>&nbsp;(old) or <strong>Npcap</strong> (new) driver.&nbsp;[https://nmap.org/download.html Npcap download page].</li>
 
    <li>On Linux, it requires the <strong>libpcap</strong> library. On some Linux systems, the library is preinstalled.&nbsp;[https://www.tcpdump.org/ Libpcap project page].</li>
</ul>
 
<p>Refer to the&nbsp;[https://github.com/chmorgan/sharppcap SharpPcap project page] for more information.</p>
= Troubleshooting =
[[OPC UA PubSub Common Traps And Pitfalls]]

Latest revision as of 10:35, 18 January 2021

Introduction

You need to use the OpcLabs.Pcap communication package (the OpcLabs.Pcap assembly and its dependencies) for following purposes:

  • OPC UA PubSub Ethernet transport (the "opc.eth" scheme).
  • OPC UA PubSub reading or writing Wireshark capture files.
Note2-icon.png

Note: You do not need OpcLabs.Pcap if you are just using OPC UA PubSub UDP or MQTT (UADP or JSON message mapping) over physical network, even when the network itself is, as it is commonly the case, based on the Ethernet technology.

Hint-icon.png

Hint: For quick tests and experiments with OPC UA PubSub, and especially if you do not want to lose time coding when you need to figure out the proper settings, you can use the OpcCmd Utility - see Using OpcCmd Utility as OPC UA PubSub Subscriber. The utility allows to specify all parameters of the dataset subscriptions that are accessible from code, but simply by entering them on the command line. It also has a built-in support for displaying the incoming datasets and their fields.

See also: Using communication packages.

Licensing

OpcLabs.Pcap depends on SharpPcap and PacketDotNet libraries that are licensed under LGPL.

Strong-naming

The OpcLabs.Pcap assembly is not strong-named.

Assembly Referencing

QuickOPC assemblies (such as OpcLabs.EasyOpcUA) do not reference the OpcLabs.Pcap assembly (they cannot - because they are strong-named but OpcLabs.Pcap is not). This means that by default, OpcLabs.Pcap will not become part of your project output, even if your code uses the features for which it is needed. It is your responsibility to make sure that a copy of OpcLabs.Pcap assembly and its dependencies is available to your app when it runs.

We recommend that you yourself put a reference to the OpcLabs.Pcap assembly to your project in such cases. When built by Visual Studio, the OpcLabs.Pcap assembly and its assembly dependencies (transitively) will be copied to the project's output directory. In most hosting environments, this is sufficient for the OpcLabs.Pcap assembly be found in runtime (at least when the current directory is the directory where the program binaries reside). In some cases, this approach will not work, and you will need to take additional steps to make sure that the OpcLabs.Pcap assembly and its dependencies are copied to their destination, and properly located in runtime when QuickOPC attempts to load them.

Assembly Dependencies

OpcLabs.Pcap depends on SharpPcap and PacketDotNet assemblies; they, in turn, may depend on other assemblies as well.

Library/Driver Dependencies

For live packet capture (OPC UA PubSub Ethernet mapping), OpcLabs.Pcap has (through SharpPcap) additional dependencies:

  • On Windows, it requires the WinPcap (old) or Npcap (new) driver. Npcap download page.
  • On Linux, it requires the libpcap library. On some Linux systems, the library is preinstalled. Libpcap project page.

Refer to the SharpPcap project page for more information.

Troubleshooting

OPC UA PubSub Common Traps And Pitfalls