NetworkInterfaceControllers.jl

July 24, 2023 ยท View on GitHub

Extensions to Julia's LibUV to help with working with multiple NICs per node.

Methods

  1. get_interface_data(<:IPAddr; loopback=false) returns IP addresses, versions, and interface names of all connected interfaces. Eg:
julia> using NetworkInterfaceControllers, Sockets
julia> get_interface_data(IPv4)
1-element Vector{NetworkInterfaceControllers.Interface}:
 NetworkInterfaces.Interface("wlp114s0", :v4, ip"192.168.100.64")

Helpful when multiple NICs are connected to a node, and you want to find the IP address corresponding to a specific NIC