+static int
+addr_cmp(const void *k1, const void *k2, void *ptr)
+{
+ return memcmp(k1, k2, sizeof(struct device_addr) -
+ offsetof(struct device_addr, mask));
+}
+
+static int
+route_cmp(const void *k1, const void *k2, void *ptr)
+{
+ return memcmp(k1, k2, sizeof(struct device_route) -
+ offsetof(struct device_route, mask));
+}
+