openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/lib/socket.c
int nl_socket_set_msg_buf_size(struct nl_sock* sk, size_t bufsize)
{
    sk->s_bufsize = bufsize;

    return 0;
}
/**
 * Set default message buffer size of netlink socket.
 * @arg sk		Netlink socket.
 * @arg bufsize		Default message buffer size in bytes.
 *
 * Sets the default message buffer size to the specified length in bytes.
 * The default message buffer size limits the maximum message size the
 * socket will be able to receive. It is generally recommneded to specify
 * a buffer size no less than the size of a memory page.
 *
 * Setting the @bufsize to zero means to use a default of 4 times getpagesize().
 *
 * When MSG_PEEK is enabled, the buffer size is used for the initial choice
 * of the buffer while peeking. It still makes sense to choose an optimal value
 * to avoid realloc().
 *
 * When MSG_PEEK is disabled, the buffer size is important because a too small
 * size will lead to failure of receiving the message via nl_recvmsgs().
 *
 * By default, MSG_PEEK is enabled unless the user calls either
 * nl_socket_disable_msg_peek()/ nl_socket_enable_msg_peek() or sets the message
 * buffer size to a positive value. See capability
 * NL_CAPABILITY_NL_RECVMSGS_PEEK_BY_DEFAULT for that.
 *
 * @return 0 on success or a negative error code.
 */
Set default message buffer size of netlink socket.
@arg sk              Netlink socket.
@arg bufsize         Default message buffer size in bytes.

Sets the default message buffer size to the specified length in bytes.
The default message buffer size limits the maximum message size the
socket will be able to receive. It is generally recommneded to specify
a buffer size no less than the size of a memory page.

Setting the @bufsize to zero means to use a default of 4 times getpagesize().

When MSG_PEEK is enabled, the buffer size is used for the initial choice
of the buffer while peeking. It still makes sense to choose an optimal value
to avoid realloc().

When MSG_PEEK is disabled, the buffer size is important because a too small
size will lead to failure of receiving the message via nl_recvmsgs().

By default, MSG_PEEK is enabled unless the user calls either
nl_socket_disable_msg_peek()/ nl_socket_enable_msg_peek() or sets the message
buffer size to a positive value. See capability
NL_CAPABILITY_NL_RECVMSGS_PEEK_BY_DEFAULT for that.

@return 0 on success or a negative error code.
Set default message buffer size of netlink socket . @arg sk Netlink socket . @arg bufsize Default message buffer size in bytes . Sets the default message buffer size to the specified length in bytes . The default message buffer size limits the maximum message size the socket will be able to receive . It is generally recommneded to specify a buffer size no less than the size of a memory page . Setting the @bufsize to zero means to use a default of 4 times getpagesize () . When MSG_PEEK is enabled the buffer size is used for the initial choice of the buffer while peeking . It still makes sense to choose an optimal value to avoid realloc () . When MSG_PEEK is disabled the buffer size is important because a too small size will lead to failure of receiving the message via nl_recvmsgs () . By default MSG_PEEK is enabled unless the user calls either nl_socket_disable_msg_peek () / nl_socket_enable_msg_peek () or sets the message buffer size to a positive value . See capability NL_CAPABILITY_NL_RECVMSGS_PEEK_BY_DEFAULT for that . @return 0 on success or a negative error code .
int nl_socket_set_msg_buf_size(struct nl_sock* sk, size_t bufsize)
{
    sk->s_bufsize = bufsize;
    return 0;
}
int nl_socket_set_msg_buf_size ( struct nl_sock * sk , size_t bufsize ) { sk -> s_bufsize = bufsize ; return 0 ; }
Set default message buffer size of netlink socket.
Set default message buffer size of netlink socket .