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

int nl_addr_cmp ( struct nl_addr a,
struct nl_addr b 
)

Compares two abstract address objects.

  • a A abstract address object.
  • b Another abstract address object.
Returns:
Integer less than, equal to or greather than zero if is found, respectively to be less than, to, or be greater than b.

Definition at line 503 of file addr.c.

Referenced by rtnl_neigh_get().

{
      int d = a->a_family - b->a_family;

      if (d == 0) {
            d = a->a_len - b->a_len;

            if (a->a_len && d == 0)
                  return memcmp(a->a_addr, b->a_addr, a->a_len);
      }

      return d;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index