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/idiag/idiag.c
int idiagnl_send_simple(struct nl_sock* sk, int flags, uint8_t family,
                        uint16_t states, uint16_t ext)
{
    struct inet_diag_req req;
    memset(&req, 0, sizeof(req));

    flags |= NLM_F_ROOT;

    req.idiag_family = family;
    req.idiag_states = states;
    req.idiag_ext = ext;

    return nl_send_simple(sk, TCPDIAG_GETSOCK, flags, &req, sizeof(req));
}
/**
 * Send trivial idiag netlink message
 * @arg sk	Netlink socket.
 * @arg flags	Message flags
 * @arg family	Address family
 * @arg states	Socket states to query
 * @arg ext	Inet Diag attribute extensions to query
 *
 * @return 0 on success or a negative error code. Due to a bug, this function
 * returns the number of bytes sent. Treat any non-negative number as success.
 */
Send trivial idiag netlink message
@arg sk      Netlink socket.
@arg flags   Message flags
@arg family  Address family
@arg states  Socket states to query
@arg ext     Inet Diag attribute extensions to query

@return 0 on success or a negative error code. Due to a bug, this function
returns the number of bytes sent. Treat any non-negative number as success.
Send trivial idiag netlink message @arg sk Netlink socket . @arg flags Message flags @arg family Address family @arg states Socket states to query @arg ext Inet Diag attribute extensions to query @return 0 on success or a negative error code . Due to a bug this function returns the number of bytes sent . Treat any non - negative number as success .
int idiagnl_send_simple(struct nl_sock* sk, int flags, uint8_t family,
                        uint16_t states, uint16_t ext)
{
    struct inet_diag_req req;
    memset(&req, 0, sizeof(req));
    flags |= NLM_F_ROOT;
    req.idiag_family = family;
    req.idiag_states = states;
    req.idiag_ext = ext;
    return nl_send_simple(sk, TCPDIAG_GETSOCK, flags, &req, sizeof(req));
}
int idiagnl_send_simple ( struct nl_sock * sk , int flags , uint8_t family , uint16_t states , uint16_t ext ) { struct inet_diag_req req ; memset ( & req , 0 , sizeof ( req ) ) ; flags |= NLM_F_ROOT ; req . idiag_family = family ; req . idiag_states = states ; req . idiag_ext = ext ; return nl_send_simple ( sk , TCPDIAG_GETSOCK , flags , & req , sizeof ( req ) ) ; }
Send trivial idiag netlink message
 @arg sk      Netlink socket.
Send trivial idiag netlink message @arg sk Netlink socket .