Logo Search packages:      
Sourcecode: libnl version File versions  Download package

int rtnl_rule_set_dst ( struct rtnl_rule *  rule,
struct nl_addr *  dst 
)

Set the destination address of a rule

  • rule rule to change
  • dst new destination address
Assigns the new destination address to the specified rule handle. The address is validated against the address family if set already via either rtnl_rule_set_family() or by setting one of the other addresses. The assignment fails if the address families mismatch. In case the address family has not been specified yet, the address family of this new address is elected to be the requirement.

Returns:
0 on success or a negative error code.

Definition at line 819 of file rule.c.

{
      return __assign_addr(rule, &rule->r_dst, dst, &rule->r_dst_len,
                       RULE_ATTR_DST | RULE_ATTR_DST_LEN);
}


Generated by  Doxygen 1.6.0   Back to index