bacure.network

create-mstp-network

(create-mstp-network {:keys [local-network-number mstp-config], :as device-config})
Return an MstpNetwork object, configured with either a slave or a master node
for the local-device. This class does not have a dedicated 'builder' like the
IP network does, so we'll call its constructor directly.

default-mstp-config

get-any-ip

(get-any-ip)
Return the first IPv4 found.

get-broadcast-address

(get-broadcast-address local-ip)
Given a local-ip, return the broadcast address

get-broadcast-address-of-interface

(get-broadcast-address-of-interface interface)

get-interface-from-ip

(get-interface-from-ip ip)
Given an IP address, return the interface.

get-interfaces

(get-interfaces)
Return the list of interfaces on this machine.

interfaces-and-ips

(interfaces-and-ips)
Return a list of interfaces and their IPs.
({:interface "wlan0", :ips ("192.168.0.2")})

ip-network-builder

(ip-network-builder {:keys [broadcast-address local-address local-network-number port reuse-address]})
Return an IP network object.

ipv4-from-interface

(ipv4-from-interface interface)
Return a list of available IPs from the interface. Remove any
loopback address.

As BACnet doesn't support IPv6 yet, just keep IPv4.

mstp-listener-network

(mstp-listener-network receive-npdu-fn node local-network-number)

resolve-dns

(resolve-dns IP-or-url)
Return the IP of a given url, or simply return the IP unchanged

to-bytes

(to-bytes IP-or-url)