.\" -*- coding: UTF-8 -*- .\" This manpage copyright 1998 by Andi Kleen. .\" .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) .\" Subject to the GPL. .\" %%%LICENSE_END .\" .\" Based on the original comments from Alexey Kuznetsov .\" $Id: netlink.3,v 1.1 1999/05/14 17:17:24 freitag Exp $ .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH NETLINK 3 "20 Marzo 2014" GNU "Manual del Programador de Linux" .SH NOMBRE netlink \- macros netlink .SH SINOPSIS .nf \fB#include \fP \fB#include \fP .PP \fBint NLMSG_ALIGN(size_t \fP\fIlen\fP\fB);\fP \fBint NLMSG_LENGTH(size_t \fP\fIlen\fP\fB);\fP \fBint NLMSG_SPACE(size_t \fP\fIlen\fP\fB);\fP \fBvoid *NLMSG_DATA(struct nlmsghdr *\fP\fInlh\fP\fB);\fP \fBstruct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *\fP\fInlh\fP\fB, int \fP\fIlen\fP\fB);\fP \fBint NLMSG_OK(struct nlmsghdr *\fP\fInlh\fP\fB, int \fP\fIlen\fP\fB);\fP \fBint NLMSG_PAYLOAD(struct nlmsghdr *\fP\fInlh\fP\fB, int \fP\fIlen\fP\fB);\fP .fi .SH DESCRIPCIÓN \fI\fP define varias macros estándares para acceder o crear un datagrama netlink. En esencia son similares a las macros definidas en \fBcmsg\fP(3) para los datos auxiliares. Se debería acceder al buffer pasado a y desde un conector netlink usando únicamente estas macros. .TP \fBNLMSG_ALIGN\fP() Redondea la longitud de un mensaje netlink hasta alinearlo adecuadamente. .TP \fBNLMSG_LENGTH\fP() Given the payload length, \fIlen\fP, this macro returns the aligned length to store in the \fInlmsg_len\fP field of the \fInlmsghdr\fP. .TP \fBNLMSG_SPACE\fP() Return the number of bytes that a netlink message with payload of \fIlen\fP would occupy. .TP \fBNLMSG_DATA\fP() Devuelve un puntero al contenido útil asociado con el \fInlmsghdr\fP pasado. .TP .\" this is bizarre, maybe the interface should be fixed. \fBNLMSG_NEXT\fP() Get the next \fInlmsghdr\fP in a multipart message. The caller must check if the current \fInlmsghdr\fP didn't have the \fBNLMSG_DONE\fP set\(emthis function doesn't return NULL on end. The \fIlen\fP argument is an lvalue containing the remaining length of the message buffer. This macro decrements it by the length of the message header. .TP \fBNLMSG_OK\fP() Return true if the netlink message is not truncated and is in a form suitable for parsing. .TP \fBNLMSG_PAYLOAD\fP() Devuelve la longitud del contenido útil asociado con \fInlmsghdr\fP. .SH "CONFORME A" Estas macros son extensiones no estándar de Linux .SH NOTAS Normalmente es mejor usar netlink a través de \fIlibnetlink\fP que mediante la interfaz de bajo nivel del núcleo. .SH "VÉASE TAMBIÉN" \fBlibnetlink\fP(3), \fBnetlink\fP(7) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. 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/. .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Juan Piernas . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .