Linx.Netlink.Constants (Linx v0.1.0)

Copy Markdown View Source

Family-agnostic netlink constants — values from the core netlink ABI (include/uapi/linux/netlink.h) that every protocol family shares.

Each constant is a zero-arity macro that expands to a literal integer, so it can be used anywhere a literal can: building messages, in guards, and in binary pattern matches. import Linx.Netlink.Constants to use the bare names.

Protocol-family constants (RTM_*, IFLA_*, …) do not belong here; they live in their family's namespace, e.g. Linx.Netlink.Rtnl.

Summary

Functions

NLM_F_ACK — request an acknowledgement (NLMSG_ERROR with errno 0).

NLM_F_APPEND — append to the end of the object list.

NLM_F_ATOMIC — return an atomic snapshot of the table.

NLM_F_CREATE — create the object if it does not exist.

NLM_F_DUMP — dump the table (NLM_F_ROOT ||| NLM_F_MATCH).

NLM_F_DUMP_INTR — a dump was interrupted by a change and is inconsistent.

NLM_F_ECHO — echo this request back to the sender.

NLM_F_EXCL — fail if the object already exists.

NLM_F_MATCH — return all entries matching the request criteria.

NLM_F_MULTI — one of a multipart series, terminated by NLMSG_DONE.

NLM_F_REPLACE — replace an existing matching object.

NLM_F_REQUEST — the message is a request.

NLM_F_ROOT — return the whole table rather than a single entry.

NLMSG_DONE — terminates a multipart message series.

NLMSG_ERROR — an error report, or (errno 0) an acknowledgement.

NLMSG_MIN_TYPE — the first message type available to protocol families.

NLMSG_NOOP — no-op; the message should be skipped.

NLMSG_OVERRUN — data was lost; the socket is out of sync.

Functions

nlm_f_ack()

(macro)

NLM_F_ACK — request an acknowledgement (NLMSG_ERROR with errno 0).

nlm_f_append()

(macro)

NLM_F_APPEND — append to the end of the object list.

nlm_f_atomic()

(macro)

NLM_F_ATOMIC — return an atomic snapshot of the table.

nlm_f_create()

(macro)

NLM_F_CREATE — create the object if it does not exist.

nlm_f_dump()

(macro)

NLM_F_DUMP — dump the table (NLM_F_ROOT ||| NLM_F_MATCH).

nlm_f_dump_intr()

(macro)

NLM_F_DUMP_INTR — a dump was interrupted by a change and is inconsistent.

nlm_f_echo()

(macro)

NLM_F_ECHO — echo this request back to the sender.

nlm_f_excl()

(macro)

NLM_F_EXCL — fail if the object already exists.

nlm_f_match()

(macro)

NLM_F_MATCH — return all entries matching the request criteria.

nlm_f_multi()

(macro)

NLM_F_MULTI — one of a multipart series, terminated by NLMSG_DONE.

nlm_f_replace()

(macro)

NLM_F_REPLACE — replace an existing matching object.

nlm_f_request()

(macro)

NLM_F_REQUEST — the message is a request.

nlm_f_root()

(macro)

NLM_F_ROOT — return the whole table rather than a single entry.

nlmsg_done()

(macro)

NLMSG_DONE — terminates a multipart message series.

nlmsg_error()

(macro)

NLMSG_ERROR — an error report, or (errno 0) an acknowledgement.

nlmsg_min_type()

(macro)

NLMSG_MIN_TYPE — the first message type available to protocol families.

nlmsg_noop()

(macro)

NLMSG_NOOP — no-op; the message should be skipped.

nlmsg_overrun()

(macro)

NLMSG_OVERRUN — data was lost; the socket is out of sync.