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

uint32_t nl_object_diff ( struct nl_object *  a,
struct nl_object *  b 
)

Compute bitmask representing difference in attribute values

  • a an object
  • b another object of same type
The bitmask returned is specific to an object type, each bit set represents an attribute which mismatches in either of the two objects. Unavailability of an attribute in one object and presence in the other is regarded a mismatch as well.

Returns:
Bitmask describing differences or 0 if they are completely identical.

Definition at line 294 of file object.c.

References nl_object_ops::oo_compare.

{
      struct nl_object_ops *ops = obj_ops(a);

      if (ops != obj_ops(b) || ops->oo_compare == NULL)
            return UINT_MAX;

      return ops->oo_compare(a, b, ~0, 0);
}


Generated by  Doxygen 1.6.0   Back to index