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_get_token(struct rtnl_link* link, struct nl_addr** addr)
{
    struct inet6_data* id;

    if (!(id = rtnl_link_af_data(link, &inet6_ops)))
        return -NLE_NOATTR;

    *addr = nl_addr_build(AF_INET6, &id->i6_token, sizeof(id->i6_token));
    if (!*addr)
        return -NLE_NOMEM;
    if (nl_addr_iszero(*addr))
    {
        nl_addr_put(*addr);
        *addr = NULL;
        return -NLE_NOADDR;
    }

    return 0;
}
/**
 * Get IPv6 tokenized interface identifier
 * @arg link		Link object
 * @arg token		Tokenized interface identifier on success
 *
 * Returns the link's IPv6 tokenized interface identifier.
 *
 * @return 0 on success
 * @return -NLE_NOMEM  failure to allocate struct nl_addr result
 * @return -NLE_NOATTR configuration setting not available
 * @return -NLE_NOADDR tokenized interface identifier is not set
 */
Get IPv6 tokenized interface identifier
@arg link            Link object
@arg token           Tokenized interface identifier on success

Returns the link's IPv6 tokenized interface identifier.

@return 0 on success
@return -NLE_NOMEM  failure to allocate struct nl_addr result
@return -NLE_NOATTR configuration setting not available
@return -NLE_NOADDR tokenized interface identifier is not set
Get IPv6 tokenized interface identifier @arg link Link object @arg token Tokenized interface identifier on success Returns the link ' s IPv6 tokenized interface identifier . @return 0 on success @return - NLE_NOMEM failure to allocate struct nl_addr result @return - NLE_NOATTR configuration setting not available @return - NLE_NOADDR tokenized interface identifier is not set
int rtnl_link_inet6_get_token(struct rtnl_link* link, struct nl_addr** addr)
{
    struct inet6_data* id;
    if (!(id = rtnl_link_af_data(link, &inet6_ops)))
        return -NLE_NOATTR;
    *addr = nl_addr_build(AF_INET6, &id->i6_token, sizeof(id->i6_token));
    if (!*addr)
        return -NLE_NOMEM;
    if (nl_addr_iszero(*addr))
    {
        nl_addr_put(*addr);
        *addr = NULL;
        return -NLE_NOADDR;
    }
    return 0;
}
int rtnl_link_inet6_get_token ( struct rtnl_link * link , struct nl_addr * * addr ) { struct inet6_data * id ; if ( ! ( id = rtnl_link_af_data ( link , & inet6_ops ) ) ) return - NLE_NOATTR ; * addr = nl_addr_build ( AF_INET6 , & id -> i6_token , sizeof ( id -> i6_token ) ) ; if ( ! * addr ) return - NLE_NOMEM ; if ( nl_addr_iszero ( * addr ) ) { nl_addr_put ( * addr ) ; * addr = NULL ; return - NLE_NOADDR ; } return 0 ; }
Get IPv6 tokenized interface identifier
 @arg link            Link object
 @arg token           Tokenized interface identifier on success
Get IPv6 tokenized interface identifier @arg link Link object @arg token Tokenized interface identifier on success