Modules

Using modules

Modules are higher-level features provided by BOF. They can rely on one or more layer, depending on what they do. Basically, each module is a collection of functions to call in a script.

List of modules:

  • Discovery: Functions to gather initial information on industrial devices on a network, using active and passive techniques. Rely on several protocols.

Discovery

Module: Discovery

Functions for passive and active discovery of industrial devices on a network.

bof.modules.discovery.knx_discovery(ip: str = '224.0.23.12', port=3671, **kwargs)

Search for KNX devices on an network using multicast.

Implementation in KNX layer.

bof.modules.discovery.lldp_discovery(iface: str = 'eth0', timeout: int = 20) → list

Search for devices on an network by listening to LLDP requests.

Converts back asynchronous to synchronous with sleep (silly I know). If you want to keep asynchrone, call directly start_listening and stop_listening in your code.

Implementation in LLDP layer.

bof.modules.discovery.passive_discovery(iface: str = 'eth0', pndcp_multicast: str = '01:0e:cf:00:00:00', knx_multicast: str = '224.0.23.12', verbose: bool = False)

Discover devices on an industrial network using passive methods.

Requests are sent to protocols’ multicast addresses or via broadcast. Currently, LLDP and KNX are supported.

Parameters:
  • lldp_multicast – Multicast MAC address for LLDP requests.
  • knx_multicast – Multicast IP address for KNXnet/IP requests.
bof.modules.discovery.profinet_discovery(iface: str = 'eth0', mac_addr: str = '01:0e:cf:00:00:00') → list

Search for devices on an network using multicast Profinet DCP requests.

Implementation in Profinet layer.