Next: , Up: Netlink API   [Contents]


2.2.1 Netlink Headers

The (netlink message) module defines the message structure that contains a netlink message. It is composed of a header and a body, and is the data structure to pass to send-msg (See Netlink Connections).

This module defines the following data structure:

Datatype: message
type

The type of data in the body of the message. For instance, RTM_GETLINK.

flags

The set of flags that are set in the header. For instance, (logior NLM_F_REQUEST NLM_F_DUMP).

seq

The sequence number of the message. If this message is an answer to a request, it must keep the same sequence number. Otherwise, you must generate a new and unique sequence number, to track the answers.

pid

The PID of the receiving process, or 0 for the kernel.

data

The actual body, as an nl-data structure.