Linx.Netlink.Rtnl.LinkInfo.Veth (Linx v0.1.0)

Copy Markdown View Source

IFLA_INFO_DATA for a veth link — the per-kind data inside IFLA_LINKINFO.

veth carries one attribute, VETH_INFO_PEER, whose payload is itself an entire RTM_*LINK message (an ifinfomsg plus IFLA_* attributes) describing the peer end of the pair. The codec captures that exactly by pointing the attribute at Linx.Netlink.Rtnl.Link — a %Link{} is the type of the peer.

Summary

Functions

Decodes a netlink message body into a t/0.

Encodes a t/0 into its netlink message body.

Types

t()

@type t() :: %Linx.Netlink.Rtnl.LinkInfo.Veth{peer: term()}

Functions

decode(body)

@spec decode(binary()) :: t()

Decodes a netlink message body into a t/0.

encode(message)

@spec encode(t()) :: binary()

Encodes a t/0 into its netlink message body.