Integration of an EDDS lower layer implementation into PN Device Driver - Manual - PROFINET Driver

How to port PROFINET Driver

Portfolio
PROFINET Development Kits
Product
PROFINET Driver
Software version
v3.1.0
Edition
03/2024
Language
en-US (original)

The software component Ethernet Device Driver for "Standard MAC" (EDDS) requires a lower layer implementation that implements its lower layer interface. EDDS controls the Ethernet controller calling this lower layer implementation.

In PN Driver delivery, four sets of lower layer implementations are provided:

  • AF_PACKET lower layer for access to any NIC over standard AF_PACKET interface.
  • Packet32 lower layer in combination with Npcap for standard Ethernet controllers.

Integration of the lower layer tables to PNDevDriver

Note

The PN device driver must provide this set of lower layer functions in the structure EPS_BOARD_EDDS_TYPE.

The Windows example of PN Driver uses Npcap and the Packet32 lower layer to access the network adapter.

In order to compile and run the enclosed Visual Studio project the include path for Npcap header files and library files needs to be adapted to the local installation of Npcap.

AF_PACKET interface is used for PN Driver Linux Native variant to support standard Ethernet adapters.

Source files to be included

Depending on the variant the following source files must be included in the build.

Table: Source files to be included in the build

PNDevDriver Lower layer Files
eps_wpcapdrv@PNDriver Windows Packet32 LL pn_run\src\source\pnboards\eps\epssys\src\eps_wpcapdrv.c
pn_run\src\source\edds\src\packet32\packet32_edd.c
pn_run\src\source\edds\src\packet32\packet32_inc.h
pn_run\src\source\edds\src\packet32\packet32_usr.h
Library files Packet.lib
wpcap.lib
_ _ _ _ Header files pcap.h
eps_afpacketdrv@PNDriver Linux AF_PACKET LL pn_run\src\edds\src\afpacket\afpacket_edd.c
pn_run\src\edds\src\afpacket\afpacket_func.c
pn_run\src\edds\src\afpacket\afpacket_func.h
pn_run\src\edds\src\afpacket\afpacket_inc.h
pn_run\src\edds\src\afpacket\afpacket_mmap_func.c
pn_run\src\edds\src\afpacket\afpacket_mmap_func.h
pn_run\src\edds\src\afpacket\afpacket_reg.h
pn_run\src\edds\src\afpacket\afpacket_shared_func.c
pn_run\src\edds\src\afpacket\afpacket_shared_func.h
_ _ _ _ pn_run\src\edds\src\afpacket\afpacket_usr.h