test-ipv4ll-manual.c revision be19c5b5e0c0f78b8429b126936fa15856550a23
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
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 <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include "sd-event.h"
#include "sd-netlink.h"
#include "sd-ipv4ll.h"
#include "util.h"
#include "event-util.h"
#include "netlink-util.h"
#include "in-addr-util.h"
switch (event) {
case SD_IPV4LL_EVENT_BIND:
break;
case SD_IPV4LL_EVENT_CONFLICT:
break;
case SD_IPV4LL_EVENT_STOP:
break;
default:
assert_not_reached("invalid LL event");
}
}
static int client_run(int ifindex, const char *seed_str, const struct ether_addr *ha, sd_event *e) {
if (seed_str) {
unsigned seed;
}
log_info("starting IPv4LL client");
assert_se(sd_event_loop(e) >= 0);
return EXIT_SUCCESS;
}
struct ether_addr ha;
int ifindex;
assert_se(sd_event_new(&e) >= 0);
return EXIT_SUCCESS;
}
log_open();
if (argc == 2)
else if (argc == 3)
else {
log_error("This program takes one or two arguments.\n"
"\t %s <ifname> [<seed>]", program_invocation_short_name);
return EXIT_FAILURE;
}
}