Scroll to navigation

netlink(3) Library Functions Manual netlink(3)

NOMBRE

netlink - macros netlink

BIBLIOTECA

Biblioteca Estándar C (libc, -lc)

SINOPSIS

#include <asm/types.h>
#include <linux/netlink.h>
int NLMSG_ALIGN(size_t len);
int NLMSG_LENGTH(size_t len);
int NLMSG_SPACE(size_t len);
void *NLMSG_DATA(struct nlmsghdr *nlh);
struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *nlh, int len);
int NLMSG_OK(struct nlmsghdr *nlh, int len);
int NLMSG_PAYLOAD(struct nlmsghdr *nlh, int len);

DESCRIPCIÓN

<linux/netlink.h> define varias macros estándares para acceder o crear un datagrama netlink. En esencia son similares a las macros definidas en cmsg(3) para los datos auxiliares. Se debería acceder al buffer pasado a y desde un conector netlink usando únicamente estas macros.

Redondea la longitud de un mensaje netlink hasta alinearlo adecuadamente.
Given the payload length, len, this macro returns the aligned length to store in the nlmsg_len field of the nlmsghdr.
Return the number of bytes that a netlink message with payload of len would occupy.
Devuelve un puntero al contenido útil asociado con el nlmsghdr pasado.
Get the next nlmsghdr in a multipart message. The caller must check if the current nlmsghdr didn't have the NLMSG_DONE set—this function doesn't return NULL on end. The len argument is an lvalue containing the remaining length of the message buffer. This macro decrements it by the length of the message header.
Return true if the netlink message is not truncated and is in a form suitable for parsing.
Devuelve la longitud del contenido útil asociado con nlmsghdr.

VERSIONES

Normalmente es mejor usar netlink a través de libnetlink que mediante la interfaz de bajo nivel del núcleo.

ESTÁNDARES

Linux.

VÉASE TAMBIÉN

libnetlink(3), netlink(7)

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Juan Piernas <piernas@ditec.um.es>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.

30 Marzo 2023 Páginas de manual de Linux 6.05.01