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/qdisc/dsmark.c
int rtnl_qdisc_dsmark_set_set_tc_index(struct rtnl_qdisc* qdisc, int flag)
{
    struct rtnl_dsmark_qdisc* dsmark;

    if (!(dsmark = rtnl_tc_data(TC_CAST(qdisc))))
        return -NLE_NOMEM;

    dsmark->qdm_set_tc_index = !!flag;
    dsmark->qdm_mask |= SCH_DSMARK_ATTR_SET_TC_INDEX;

    return 0;
}
/**
 * Set set-tc-index flag of DSMARK qdisc.
 * @arg qdisc		DSMARK qdisc to be modified.
 * @arg flag		Flag indicating whether to enable or disable.
 * @return 0 on success or a negative error code.
 */
Set set-tc-index flag of DSMARK qdisc.
@arg qdisc           DSMARK qdisc to be modified.
@arg flag            Flag indicating whether to enable or disable.
@return 0 on success or a negative error code.
Set set - tc - index flag of DSMARK qdisc . @arg qdisc DSMARK qdisc to be modified . @arg flag Flag indicating whether to enable or disable . @return 0 on success or a negative error code .
int rtnl_qdisc_dsmark_set_set_tc_index(struct rtnl_qdisc* qdisc, int flag)
{
    struct rtnl_dsmark_qdisc* dsmark;
    if (!(dsmark = rtnl_tc_data(TC_CAST(qdisc))))
        return -NLE_NOMEM;
    dsmark->qdm_set_tc_index = !!flag;
    dsmark->qdm_mask |= SCH_DSMARK_ATTR_SET_TC_INDEX;
    return 0;
}
int rtnl_qdisc_dsmark_set_set_tc_index ( struct rtnl_qdisc * qdisc , int flag ) { struct rtnl_dsmark_qdisc * dsmark ; if ( ! ( dsmark = rtnl_tc_data ( TC_CAST ( qdisc ) ) ) ) return - NLE_NOMEM ; dsmark -> qdm_set_tc_index = ! ! flag ; dsmark -> qdm_mask |= SCH_DSMARK_ATTR_SET_TC_INDEX ; return 0 ; }
Set set-tc-index flag of DSMARK qdisc.
Set set - tc - index flag of DSMARK qdisc .