Document buffer size limitations of nl_recv()
This commit is contained in:
parent
bc7c822f54
commit
ceb8fb9e87
7
lib/nl.c
7
lib/nl.c
|
@ -416,9 +416,16 @@ errout:
|
||||||
* are handled by repeating the read. The input buffer size is determined
|
* are handled by repeating the read. The input buffer size is determined
|
||||||
* by peeking before the actual read is done.
|
* by peeking before the actual read is done.
|
||||||
*
|
*
|
||||||
|
* The buffer size used when reading from the netlink socket and thus limiting
|
||||||
|
* the maximum size of a netlink message that can be read defaults to the size
|
||||||
|
* of a memory page (getpagesize()). The buffer size can be modified on a per
|
||||||
|
* socket level using the function nl_socket_set_msg_buf_size().
|
||||||
|
*
|
||||||
* A non-blocking sockets causes the function to return immediately with
|
* A non-blocking sockets causes the function to return immediately with
|
||||||
* a return value of 0 if no data is available.
|
* a return value of 0 if no data is available.
|
||||||
*
|
*
|
||||||
|
* @see nl_socket_set_msg_buf_size()
|
||||||
|
*
|
||||||
* @return Number of octets read, 0 on EOF or a negative error code.
|
* @return Number of octets read, 0 on EOF or a negative error code.
|
||||||
*/
|
*/
|
||||||
int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla,
|
int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla,
|
||||||
|
|
Reference in New Issue