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

int rtnl_rule_set_iif ( struct rtnl_rule *  rule,
const char *  dev 
)

Set incoming interface of routing rule object.

  • rule Routing rule object to be modified.
  • dev Name of incoming interface.
Returns:
0 on success or a negative error code.

Definition at line 845 of file rule.c.

{
      if (strlen(dev) > IFNAMSIZ-1)
            return nl_errno(ERANGE);

      strcpy(rule->r_iif, dev);
      rule->r_mask |= RULE_ATTR_IIF;
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index