• Home
  • Raw
  • Download

Lines Matching refs:netlink

16 over netlink sockets. It deals with connecting and disconnectng of
20 of object based netlink protocols where objects are added, removed, or
21 modified using a netlink based protocol.
46 users may only be interested in the low level netlink messaging API while
49 In any case it is recommended to get familiar with the netlink protocol
86 The main header file is `<netlink/netlink.h>`. Additional headers may need to
92 #include <netlink/netlink.h>
93 #include <netlink/cache.h>
94 #include <netlink/route/link.h>
105 #include <netlink/version.h>
140 It is often useful to peek into the stream of netlink messages exchanged
143 netlink messages exchanged in a human readable format to to +stderr+:
188 The netlink protocol is a socket based IPC mechanism used for
190 userspace processes themselves. The netlink protocol is based on BSD
191 sockets and uses the +AF_NETLINK+ address family. Every netlink
200 The netlink address (port) consists of a 32bit integer. Port 0 (zero)
202 netlink protocol family. Other port numbers usually refer to user space
207 with the introduction of threaded netlink applications and
217 exposing two kernel side sockets. It shows the common netlink use
226 The most common form of netlink usage is for a user space application
250 be created for the same netlink protocol family.
264 This form of netlink communication is typically found in user space
266 typically maintain a netlink socket subscribed to a multicast group that
286 A netlink protocol is typically based on messages and consists of the
287 netlink message header (+struct nlmsghdr+) plus the payload attached
297 Total length of the message in bytes including the netlink message header.
301 Several standard message types are defined by the netlink protocol.
329 request with another netlink message. The sequence number of a reply
356 Every netlink protocol is free to define own message types. Note that
361 Suppose the goal of the netlink protocol you are implementing is allow
364 "netlink way" of doing this would be to define two message types
418 Although in theory a netlink message can be up to 4GiB in size. The socket
449 error code and the original netlink mesage header of the request.
526 Use of these flags is completely optional and many netlink protocols only
547 Behaviour of these flags may differ slightly between different netlink
572 In order to use the netlink protocol, a netlink socket is required.
580 The netlink socket and all related attributes including the actual file
585 #include <netlink/socket.h>
592 netlink socket it wishes to use.
610 #include <netlink/socket.h>
620 This behaviour can and must be disabled if the netlink protocol
626 #include <netlink/socket.h>
631 For more information on the theory behind netlink sequence numbers,
638 netlink protocol it is connected to. The socket will then receive a
649 #include <netlink/socket.h>
659 #include <netlink/socket.h>
669 #include <netlink/netlink.h>
670 #include <netlink/socket.h>
671 #include <netlink/msg.h>
674 * This function will be called for each valid netlink message received
699 /* Connect to routing netlink protocol */
707 * until one or more netlink messages (notification) are received which
730 #include <netlink/socket.h>
741 #include <netlink/socket.h>
750 #include <netlink/socket.h>
767 #include <netlink/socket.h>
785 netlink protocol family. It is common practice not to bind the socket
787 netlink protocol family.
791 #include <netlink/socket.h>
806 #include <netlink/socket.h>
817 #include <netlink/socket.h>
824 The socket buffer is used to queue netlink messages between sender and
826 will be able to write() to a netlink socket, i.e. it will indirectly
831 #include <netlink/socket.h>
843 #include <netlink/socket.h>
856 #include <netlink/socket.h>
871 #include <netlink/socket.h>
879 If enabled, each received netlink message from the kernel will include
885 #include <netlink/socket.h>
898 The standard method of sending a netlink message over a netlink socket
900 the netlink message by filling the missing bits and pieces in the
901 netlink message header and will deal with addressing based on the
902 options and address set in the netlink socket. The message is then
927 internal calls to nl_send_auto() by the library to send netlink
933 The purpose of nl_send() is to embed the netlink message into a iovec
946 nl_send_iovec() expects a finalized netlink message and fills out the
968 nl_sendmsg() expects a finalized netlink message and an optional
971 the netlink message header.
997 If you wish to send raw data over a netlink socket, the following
1002 #include <netlink/netlink.h>
1010 expects the netlink message type, optional netlink message flags, and an
1014 #include <netlink/netlink.h>
1020 The function will construct a netlink message header based on the message
1024 The following example will send a netlink request message causing the
1029 #include <netlink/netlink.h>
1045 The easiest method to receive netlink messages is to call nl_recvmsgs_default().
1051 it needs to receive and parse a netlink message.
1068 netlink message has been received unless the socket has been put into
1092 apply while receiving data from a netlink socket:
1115 netlink socket. This function may be overwritten by the application
1117 This may be useful if the netlink byte stream is in fact not received
1131 netlink messages from the parser and on how to control the behaviour
1137 The internal parser is invoked for each netlink message received from
1138 a netlink socket. It is typically fed by nl_recv() (see
1142 provided is sufficient to contain a netlink message header and that
1162 userspace netlink socket doing this, the application may want to send
1197 See <<core_netlink_fundamentals>> for an introduction to the netlink
1202 Most netlink protocols enforce a strict alignment policy for all
1204 fixed to 4 bytes. Therefore all netlink message headers, begin of
1210 #include <netlink/msg.h>
1218 the total size of a netlink message including the padding to ensure
1237 #include <netlink/msg.h>
1243 The library offers two different methods of parsing netlink messages.
1253 What you receive from a netlink socket is typically a stream of
1255 contain any number of netlink messages.
1263 #include <netlink/msg.h>
1278 netlink message contains at least a minimum of payload.
1282 #include <netlink/msg.h>
1292 #include <netlink/msg.h>
1313 #include <netlink/msg.h>
1332 #include <netlink/msg.h>
1352 and formatting rules depening on the actual netlink protocol.
1357 Most netlink protocols use netlink attributes. It not only makes the
1379 #include <netlink/msg.h>
1385 See <<core_attr>> for more information on how to use netlink attributes.
1389 The function nlmsg_parse() validate a complete netlink message in one
1417 See <<core_msg_format>> for information on the netlink message format
1421 buffer to store the actual netlink message. struct nl_msg +does not+
1422 point to the netlink message header. Use nlmsg_hdr() to retrieve a
1423 pointer to the netlink message header.
1442 The first step in constructing a new netlink message it to allocate a
1448 #include <netlink/msg.h>
1477 If the netlink message header is already known at allocation time, the
1488 Alternatively nlmsg_alloc_simple() takes a netlink message type and
1489 netlink message flags. It is equivalent to nlmsg_inherit() except that it
1495 #include <netlink/msg.h>
1500 .Appending the netlink message header
1502 After allocating struct nl_msg, the netlink message header needs to be
1505 netlink message header already in place.
1509 #include <netlink/msg.h>
1515 The function nlmsg_put() will build a netlink message header out of
1517 netlink message. +seqnr+ can be set to +NL_AUTO_SEQ+ to indiciate
1535 #include <netlink/msg.h>
1572 reserving room for the data that is added to the end of the netlink
1578 #include <netlink/msg.h>
1584 netlink message and returns a pointer to the start of the reserved area.
1594 #include <netlink/msg.h>
1610 #include <netlink/msg.h>
1630 Any form of payload should be encoded as netlink attributes whenever
1631 possible. Use of attributes allows to extend any netlink protocol in
1646 the netlink protocol was initially designed. Using attributes the new
1658 length to be attached to a netlink message. See <<core_msg_attr>>
1704 #include <netlink/attr.h>
1720 #include <netlink/attr.h>
1730 #include <netlink/msg.h>
1731 #include <netlink/attr.h>
1767 #include <netlink/attr.h>
1781 #include <netlink/attr.h>
1794 When receiving netlink attributes, the receiver has certain expections
1823 frequently done in netlink protocols and does not break
1835 #include <netlink/attr.h>
1867 #include <netlink/attr.h>
1884 The following example demonstrates how to parse a netlink message sent
1885 over a netlink protocol which does not use protocol headers. The example
1892 #include <netlink/msg.h>
1893 #include <netlink/attr.h>
1932 #include <netlink/attr.h>
1939 #include <netlink/msg.h>
1959 #include <netlink/attr.h>
1969 #include <netlink/attr.h>
1985 The interface to add attributes to a netlink message is based on the
2043 #include <netlink/msg.h>
2044 #include <netlink/attr.h>
2099 the netlink message. Their use is intended to limit the range of
2106 #include <netlink/attr.h>
2126 #include <netlink/attr.h>
2182 #include <netlink/attr.h>
2261 because some netlink protocols implicitely allow empty container
2331 based on netlink attributes which carry some form of network address.
2334 on how to allocate abstract data objects based on netlink attributes.
2355 /* Allocate a default sized netlink message */
2461 is attached to a netlink socket or passed on to functions directly.
2526 #include <netlink/handlers.h>
2540 #include <netlink/handlers.h>
2550 #include <netlink/handlers.h>
2568 When the library needs to send or receive netlink messages in high level
2580 #include <netlink/handlers.h>
2608 #include <netlink/handlers.h>
2626 - *MAY* fill out `*addr` with the netlink address of the peer the
2638 #include <netlink/handlers.h>
2644 Own implementations must send the netlink message and return 0 on success
2675 netlink socket assigned which limits the scope of each manager
2676 to exactly one netlink family. Therefore all caches committed
2677 to a manager must be part of the same netlink family. Due to the
2748 A few high level abstract data types which are used by a majority netlink
2754 Most netlink protocols deal with networking related topics and thus
2778 #include <netlink/addr.h>
2785 If the address is transported in a netlink attribute, the function
2792 #include <netlink/addr.h>
2804 #include <netlink/addr.h>
2839 #include <netlink/addr.h>
2857 #include <netlink/addr.h>
2873 #include <netlink/addr.h>
2885 #include <netlink/addr.h>
2902 #include <netlink/addr.h>
2920 #include <netlink/addr.h>
2935 #include <netlink/addr.h>
2950 #include <netlink/addr.h>
2964 #include <netlink/addr.h>
2972 to simplify usage of netlink attributes of arbitary length.
2978 but bases the data on the payload of a netlink attribute. New data