+VLOG_DEFINE_THIS_MODULE(rtnetlink);
+
+COVERAGE_DEFINE(rtnetlink_changed);
+
+static void rtnetlink_report(struct rtnetlink *rtn, void *change);
+
+struct rtnetlink {
+ struct nl_sock *notify_sock; /* Rtnetlink socket. */
+ struct list all_notifiers; /* All rtnetlink notifiers. */
+
+ /* Passed in by rtnetlink_create(). */
+ int multicast_group; /* Multicast group we listen on. */
+ rtnetlink_parse_func *parse; /* Message parsing function. */
+ void *change; /* Change passed to parse. */
+};
+
+/* Creates an rtnetlink handle which may be used to manage change
+ * notifications. The created handle will listen for rtnetlink messages on
+ * 'multicast_group'. Incoming messages will be parsed with 'parse' which will
+ * be passed 'change' as an argument. */
+struct rtnetlink *
+rtnetlink_create(int multicast_group, rtnetlink_parse_func *parse,
+ void *change)
+{
+ struct rtnetlink *rtn;