#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/wait.h>
#include <sys/stat.h>
#include <time.h>
#include <fcntl.h>
#include "leak-checker.h"
#include "netdev.h"
#include "netlink.h"
+#include "netlink-notifier.h"
#include "netlink-socket.h"
#include "ofpbuf.h"
#include "openvswitch/brcompat-netlink.h"
#include "packets.h"
#include "poll-loop.h"
#include "process.h"
-#include "rtnetlink.h"
#include "rtnetlink-link.h"
#include "signals.h"
#include "sset.h"
uint32_t seq;
int error;
- /* Parse the command received from brcompat_mod. */
+ /* Parse the command received from brcompat. */
error = parse_command(buffer, &seq, &linux_name, NULL, &count, &skip);
if (error) {
return error;
* (XenServer Tools 5.5.0 does not exhibit this behavior, and neither does
* a VM without Tools installed at all.)
*/
- rtnetlink_link_notifier_run();
+ rtnetlink_link_run();
switch (genlmsghdr->cmd) {
case BRC_GENL_C_DP_ADD:
port_name, br_name);
run_vsctl(vsctl_program, VSCTL_OPTIONS,
- "--", "--if-exists", "del-port", br_name, port_name,
+ "--", "--if-exists", "del-port", port_name,
"--", "comment", "ovs-brcompatd:", port_name, "disappeared",
(char *) NULL);
}
main(int argc, char *argv[])
{
extern struct vlog_module VLM_reconnect;
- struct rtnetlink_notifier link_notifier;
+ struct nln_notifier *link_notifier;
struct unixctl_server *unixctl;
int retval;
"\"brcompat\" kernel module.");
}
-
- rtnetlink_link_notifier_register(&link_notifier, netdev_changed_cb, NULL);
+ link_notifier = rtnetlink_link_notifier_create(netdev_changed_cb, NULL);
daemonize_complete();
for (;;) {
unixctl_server_run(unixctl);
- rtnetlink_link_notifier_run();
+ rtnetlink_link_run();
brc_recv_update();
netdev_run();
nl_sock_wait(brc_sock, POLLIN);
unixctl_server_wait(unixctl);
- rtnetlink_link_notifier_wait();
+ rtnetlink_link_wait();
netdev_wait();
poll_block();
}
- rtnetlink_link_notifier_unregister(&link_notifier);
+ rtnetlink_link_notifier_destroy(link_notifier);
return 0;
}
}
switch (c) {
- case 'H':
case 'h':
usage();