7.3. Windows WinPcap - emllPcap
A Link Layer based on the WinPcap library is shipped with the EC-Monitor. This Link Layer is implemented using a network filter driver that enables the software to send and receive raw Ethernet frames. Using this Link Layer any Windows standard network drivers can be used. The Windows network adapter card has to be assigned a unique IP address (private IP address range). This IP address is used by the EtherCAT WinPcap Link Layer driver to select the appropriate adapter.
It is recommended to use a separate network adapter to connect EtherCAT devices. If the main network adapter is used for both EtherCAT devices and the local area network there may be a main impact on the local area network operation. The network adapter card used by EtherCAT has to be set to a fixed private IP address, e.g. 192.168.x.y.
The parameters to the WinPcap Link Layer are setup-specific. The function “CreateLinkParmsFromCmdLineWinPcap” in EcSelectLinkLayer.cpp
demonstrates how to initialize the Link Layer instance.
-
struct EC_T_LINK_PARMS_WINPCAP
Public Members
-
EC_T_LINK_PARMS linkParms
Common link parameters. Signature must be set to EC_LINK_PARMS_SIGNATURE_WINPCAP
-
EC_T_BYTE abyIpAddress[4]
IP address
-
EC_T_CHAR szAdapterId[MAX_LEN_WINPCAP_ADAPTER_ID]
Adapter ID, format: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
-
EC_T_BOOL bFilterInput
Filter input if EC_TRUE. This is needed on some system if the winpcap library notify the sent frames to the network adapter
-
EC_T_LINK_PARMS linkParms
7.3.1. WinPcap, Npcap support
At least WinPcap version 4.1.2 or Npcap 0.07 r17 must be used. WinPcap version 4.1.2 is the preferred library.
If using Npcap 0.07 r17, the WinPcap API-compatible mode must be chosen:
