# `NervesHubLink.NetworkInterface`
[🔗](https://github.com/nerves-hub/nerves_hub_link/blob/v2.12.0/lib/nerves_hub_link/network_interface.ex#L6)

Functions for determining the network interface when connecting to NervesHub and downloading firmware.

# `from_socket`

```elixir
@spec from_socket(
  :ssl.socket()
  | :inet.socket()
  | :socket.socket()
  | Mint.Types.socket()
) ::
  nil | binary()
```

Get the network interface from a Slipstream.Socket or Mint.HTTP struct. This is used to report the
network interface being used for the connection to NervesHub and for firmware downloads.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
