Logo Search packages:      
Sourcecode: libnl 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 501 of file addr.c.

Referenced by flnl_request_cmp(), and 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;
}


Generated by  Doxygen 1.6.0   Back to index