The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

netlink (3)
  • netlink (3) ( Русские man: Библиотечные вызовы )
  • >> netlink (3) ( Linux man: Библиотечные вызовы )
  • netlink (4) ( Linux man: Специальные файлы /dev/* )
  • netlink (7) ( Русские man: Макропакеты и соглашения )
  • netlink (7) ( Linux man: Макропакеты и соглашения )
  •  

    NAME

    netlink - Netlink macros
     
    

    SYNOPSIS

    #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);
     

    DESCRIPTION

    <linux/netlink.h> defines several standard macros to access or create a netlink datagram. They are similar in spirit to the macros defined in cmsg(3) for auxiliary data. The buffer passed to and from a netlink socket should only be accessed using these macros.
    NLMSG_ALIGN()
    Round the length of a netlink message up to align it properly.
    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()
    Return a pointer to the payload associated with the passed nlmsghdr.
    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 ok to parse.
    NLMSG_PAYLOAD()
    Return the length of the payload associated with the nlmsghdr.
     

    CONFORMING TO

    These macros are non-standard Linux extensions.  

    NOTES

    It is often better to use netlink via libnetlink than via the low-level kernel interface.  

    SEE ALSO

    netlink(7)
    and ftp://ftp.inr.ac.ru/ip-routing/iproute2* for libnetlink  

    COLOPHON

    This page is part of release 3.14 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    CONFORMING TO
    NOTES
    SEE ALSO
    COLOPHON


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру