# Linux SockRaw - emllSockRaw emllSockRaw is part of EC-Simulator for Linux. emllSockRaw uses the network interface of the native driver, e.g., eth0, eth1, etc. The network adapter must be exclusively used for EtherCAT® and cannot be used for LAN (local area network) at the same time. Because the native Linux driver for the network adapter type is typically not fully real-time capable, it cannot be used for real time applications. If possible, an acontis Real-time Ethernet Driver, e.g. emllIntelGbe, should be used instead. emllSockRaw does not need the atemsys driver. #### NOTE Root privileges are required. A cycle time of 4 ms or higher may be needed. To run the application without root privileges, set the Linux capability ‘cap_net_raw’ to the application. : ```console $ sudo setcap 'cap_net_raw+pe' ./EcMasterDemo ``` To run python scripts without root privileges, create a Python environment and set the Linux capability ‘cap_net_raw’ to the python interpreter. : ```console $ cd Bin/Linux $ python3 -m venv --copies PyEnv/ $ source PyEnv/bin/activate $ sudo setcap 'cap_net_raw+pe' PyEnv/bin/python3 ``` The parameters to emllSockRaw are setup-specific. The function `CreateLinkParmsFromCmdLineSockRaw()` in [`EcSelectLinkLayer.cpp`](_downloads/bf62c71a4a7e317930818b9da4a9815c/EcSelectLinkLayer.cpp) demonstrates how to initialize the parameters. ### struct EC_T_LINK_PARMS_SOCKRAW ### Public Members ### [EC_T_LINK_PARMS](emll_init.html.md#_CPPv415EC_T_LINK_PARMS) linkParms Common link parameters. Signature must be set to EC_LINK_PARMS_SIGNATURE_SOCKRAW. ### [EC_T_CHAR](api.html.md#_CPPv49EC_T_CHAR) szAdapterName[EC_SOCKRAW_ADAPTER_NAME_SIZE] Native ETH device name, e.g. “eth0” (zero terminated) ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDisableForceBroadcast Don’t change target MAC address to FF:FF:FF:FF:FF:FF ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bReplacePaddingWithNopCmd Prevent adding Ethernet padding to work-around EtherCAT corruption bugs from native Linux driver(s) ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bUsePacketMmapRx Use PACKET_MMAP PACKET_RX_RING for receive ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bSetCoalescingParms Set Coalescing parameters to enhance the link layer performance ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bSetPromiscuousMode Enable promiscuous mode at network adapter