Scroll to navigation

NETLINK(3) Manual del Programador de Linux NETLINK(3)

NOMBRE

netlink - macros netlink

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.

CONFORME A

Estas macros son extensiones no estándar de Linux

NOTAS

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

VÉASE TAMBIÉN

libnetlink(3), netlink(7)

COLOFÓN

Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en https://www.kernel.org/doc/man-pages/.

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.

20 Marzo 2014 GNU