/***
This file is part of systemd.
Copyright (C) 2014 Tom Gundersen <teg@jklm.no>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include "sd-event.h"
#include "sd-ipv4acd.h"
#include "sd-netlink.h"
#include "in-addr-util.h"
#include "netlink-util.h"
#include "util.h"
switch (event) {
case SD_IPV4ACD_EVENT_BIND:
log_info("bound");
break;
log_info("conflict");
break;
case SD_IPV4ACD_EVENT_STOP:
log_error("the client was stopped");
break;
default:
assert_not_reached("invalid ACD event");
}
}
static int client_run(int ifindex, const struct in_addr *pa, const struct ether_addr *ha, sd_event *e) {
log_info("starting IPv4ACD client");
assert_se(sd_event_loop(e) >= 0);
return EXIT_SUCCESS;
}
int ifindex;
assert_se(sd_event_new(&e) >= 0);
return EXIT_SUCCESS;
}
log_open();
if (argc == 3)
else {
log_error("This program takes two arguments.\n"
"\t %s <ifname> <IPv4 address>", program_invocation_short_name);
return EXIT_FAILURE;
}
}