netlink(3) Library Functions Manual netlink(3) NOMBRE netlink - macros netlink BIBLIOTECA Biblioteca Estandar C (libc, -lc) SINOPSIS #include #include 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); DESCRIPCION define varias macros estandares para acceder o crear un datagrama netlink. En esencia son similares a las macros definidas en cmsg(3) para los datos auxiliares. Se deberia acceder al buffer pasado a y desde un conector netlink usando unicamente estas macros. NLMSG_ALIGN() Redondea la longitud de un mensaje netlink hasta alinearlo adecuadamente. NLMSG_LENGTH() Given the payload length, len, this macro returns the aligned length to store in the nlmsg_len field of the nlmsghdr. NLMSG_SPACE() Return the number of bytes that a netlink message with payload of len would occupy. NLMSG_DATA() Devuelve un puntero al contenido util asociado con el nlmsghdr pasado. NLMSG_NEXT() 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. NLMSG_OK() Return true if the netlink message is not truncated and is in a form suitable for parsing. NLMSG_PAYLOAD() Devuelve la longitud del contenido util asociado con nlmsghdr. VERSIONES Normalmente es mejor usar netlink a traves de libnetlink que mediante la interfaz de bajo nivel del nucleo. ESTANDARES Linux. VEASE TAMBIEN libnetlink(3), netlink(7) TRADUCCION La traduccion al espanol de esta pagina del manual fue creada por Juan Piernas Esta traduccion es documentacion libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algun error en la traduccion de esta pagina del manual, envie un correo electronico a . Paginas de manual de Linux 6.06 31 Octubre 2023 netlink(3)