# `Linx.Netlink.Rtnl`
[🔗](https://github.com/oshlabs/linx/blob/v0.2.0/lib/linx/netlink/rtnl.ex#L1)

rtnetlink (`NETLINK_ROUTE`) — the kernel's networking-stack interface:
links, addresses, routes and neighbours.

This is the first `Linx.Netlink` protocol family. Each kind of object has
its own module. Open a socket for the family with `open/1` and pass it to
those modules' functions.

## Example

    {:ok, sock} = Linx.Netlink.Rtnl.open()
    {:ok, links} = Linx.Netlink.Rtnl.Link.list(sock)
    {:ok, addrs} = Linx.Netlink.Rtnl.Address.list(sock)
    :ok = Linx.Netlink.Socket.close(sock)

# `open`

```elixir
@spec open(Linx.Netlink.Socket.netns()) ::
  {:ok, Linx.Netlink.Socket.t()} | {:error, term()}
```

Opens an rtnetlink socket in network namespace `netns`.

See `Linx.Netlink.Socket.open/2` for the `netns` forms. Close the socket
with `Linx.Netlink.Socket.close/1`.

---

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