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/link/inet6.c
int rtnl_link_inet6_set_token(struct rtnl_link* link, struct nl_addr* addr)
{
    struct inet6_data* id;

    if ((nl_addr_get_family(addr) != AF_INET6) ||
        (nl_addr_get_len(addr) != sizeof(id->i6_token)))
        return -NLE_INVAL;

    if (!(id = rtnl_link_af_alloc(link, &inet6_ops)))
        return -NLE_NOMEM;

    memcpy(&id->i6_token, nl_addr_get_binary_addr(addr), sizeof(id->i6_token));
    return 0;
}
/**
 * Set IPv6 tokenized interface identifier
 * @arg link		Link object
 * @arg token		Tokenized interface identifier
 *
 * Sets the link's IPv6 tokenized interface identifier.
 *
 * @return 0 on success
 * @return -NLE_NOMEM could not allocate inet6 data
 * @return -NLE_INVAL addr is not a valid inet6 address
 */
Set IPv6 tokenized interface identifier
@arg link            Link object
@arg token           Tokenized interface identifier

Sets the link's IPv6 tokenized interface identifier.

@return 0 on success
@return -NLE_NOMEM could not allocate inet6 data
@return -NLE_INVAL addr is not a valid inet6 address
Set IPv6 tokenized interface identifier @arg link Link object @arg token Tokenized interface identifier Sets the link ' s IPv6 tokenized interface identifier . @return 0 on success @return - NLE_NOMEM could not allocate inet6 data @return - NLE_INVAL addr is not a valid inet6 address
int rtnl_link_inet6_set_token(struct rtnl_link* link, struct nl_addr* addr)
{
    struct inet6_data* id;
    if ((nl_addr_get_family(addr) != AF_INET6) ||
        (nl_addr_get_len(addr) != sizeof(id->i6_token)))
        return -NLE_INVAL;
    if (!(id = rtnl_link_af_alloc(link, &inet6_ops)))
        return -NLE_NOMEM;
    memcpy(&id->i6_token, nl_addr_get_binary_addr(addr), sizeof(id->i6_token));
    return 0;
}
int rtnl_link_inet6_set_token ( struct rtnl_link * link , struct nl_addr * addr ) { struct inet6_data * id ; if ( ( nl_addr_get_family ( addr ) != AF_INET6 ) || ( nl_addr_get_len ( addr ) != sizeof ( id -> i6_token ) ) ) return - NLE_INVAL ; if ( ! ( id = rtnl_link_af_alloc ( link , & inet6_ops ) ) ) return - NLE_NOMEM ; memcpy ( & id -> i6_token , nl_addr_get_binary_addr ( addr ) , sizeof ( id -> i6_token ) ) ; return 0 ; }
Set IPv6 tokenized interface identifier
 @arg link            Link object
 @arg token           Tokenized interface identifier
Set IPv6 tokenized interface identifier @arg link Link object @arg token Tokenized interface identifier