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/route/addr.c
int rtnl_addr_build_add_request(struct rtnl_addr* addr, int flags,
                                struct nl_msg** result)
{
    uint32_t required = ADDR_ATTR_IFINDEX | ADDR_ATTR_FAMILY |
                        ADDR_ATTR_PREFIXLEN | ADDR_ATTR_LOCAL;

    if ((addr->ce_mask & required) != required)
        return -NLE_MISSING_ATTR;

    return build_addr_msg(addr, RTM_NEWADDR, NLM_F_CREATE | flags, result);
}
/**
 * Build netlink request message to request addition of new address
 * @arg addr		Address object representing the new address.
 * @arg flags		Additional netlink message flags.
 * @arg result		Pointer to store resulting message.
 *
 * Builds a new netlink message requesting the addition of a new
 * address. The netlink message header isn't fully equipped with
 * all relevant fields and must thus be sent out via nl_send_auto_complete()
 * or supplemented as needed.
 *
 * Minimal required attributes:
 *   - interface index (rtnl_addr_set_ifindex())
 *   - local address (rtnl_addr_set_local())
 *
 * The scope will default to universe except for loopback addresses in
 * which case a host scope is used if not specified otherwise.
 *
 * @note Free the memory after usage using nlmsg_free().
 *
 * @return 0 on success or a negative error code.
 */
Build netlink request message to request addition of new address
@arg addr            Address object representing the new address.
@arg flags           Additional netlink message flags.
@arg result          Pointer to store resulting message.

Builds a new netlink message requesting the addition of a new
address. The netlink message header isn't fully equipped with
all relevant fields and must thus be sent out via nl_send_auto_complete()
or supplemented as needed.

Minimal required attributes:
- interface index (rtnl_addr_set_ifindex())
- local address (rtnl_addr_set_local())

The scope will default to universe except for loopback addresses in
which case a host scope is used if not specified otherwise.

@note Free the memory after usage using nlmsg_free().

@return 0 on success or a negative error code.
Build netlink request message to request addition of new address @arg addr Address object representing the new address . @arg flags Additional netlink message flags . @arg result Pointer to store resulting message . Builds a new netlink message requesting the addition of a new address . The netlink message header isn ' t fully equipped with all relevant fields and must thus be sent out via nl_send_auto_complete () or supplemented as needed . Minimal required attributes : - interface index ( rtnl_addr_set_ifindex () ) - local address ( rtnl_addr_set_local () ) The scope will default to universe except for loopback addresses in which case a host scope is used if not specified otherwise . @note Free the memory after usage using nlmsg_free () . @return 0 on success or a negative error code .
int rtnl_addr_build_add_request(struct rtnl_addr* addr, int flags,
                                struct nl_msg** result)
{
    uint32_t required = ADDR_ATTR_IFINDEX | ADDR_ATTR_FAMILY |
                        ADDR_ATTR_PREFIXLEN | ADDR_ATTR_LOCAL;
    if ((addr->ce_mask & required) != required)
        return -NLE_MISSING_ATTR;
    return build_addr_msg(addr, RTM_NEWADDR, NLM_F_CREATE | flags, result);
}
int rtnl_addr_build_add_request ( struct rtnl_addr * addr , int flags , struct nl_msg * * result ) { uint32_t required = ADDR_ATTR_IFINDEX | ADDR_ATTR_FAMILY | ADDR_ATTR_PREFIXLEN | ADDR_ATTR_LOCAL ; if ( ( addr -> ce_mask & required ) != required ) return - NLE_MISSING_ATTR ; return build_addr_msg ( addr , RTM_NEWADDR , NLM_F_CREATE | flags , result ) ; }
Build netlink request message to request addition of new address
 @arg addr            Address object representing the new address.
Build netlink request message to request addition of new address @arg addr Address object representing the new address .