dhcp.util

Interface and file I/O utility functions.

deep-merge

(deep-merge x & xs)

deep-merge'

(deep-merge' a b)

Eprintln

Eprn

existsSync

(existsSync path)

Return true if a file exists at path

fatal

(fatal code & msg)

get-if-ipv4

(get-if-ipv4 if-name)

Get interface information for the interface if-name

get-ifs-ipv4

(get-ifs-ipv4)

Get IPv4 information for all interfaces

get-mac-address

(get-mac-address if-name)

Return the MAC address for the interface if-name

load-config

(load-config config-file)

Load a config-file (JSON, YAML, or EDN based on filename extension)

set-ip-address

(set-ip-address if-name address netmask)

Set the address and netmask for the interface if-name

slurp

(slurp path)

Synchronously read file at path

spit

(spit path data)

Synchronously write data to path