interface-attach

Synopsis

(interface-attach specifier)

Parameters

  • specifier

Description

This procedure opens a network interface and prepares it for raw Ethernet access. On Linux, this is based on PF_PACKET sockets in promiscuous mode, on macOS on the BPF (Berkeley Packet Filter) API and functionality. When attaching (opening) an interface on Linux, ethtool is called externally in order to switch off unwanted receive and send offloading. This functionality may also be implemented natively, until then just make sure that ethtool is installed (it’s a good idea to have this available anyway).

Side Effects

Return Value

On success, an interface object ready for Layer 2 read/write-access is returned.

See Also

Example

> (define i (interface-attach "en1"))
i
>