test-ipv4ll.c revision e3dca0089b7b50e2ec21409d1292727921d06102
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright (C) 2014 Axis Communications AB. All rights reserved.
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 <assert.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include "util.h"
#include "socket-util.h"
#include "event-util.h"
#include "sd-ipv4ll.h"
#include "arp-util.h"
static bool verbose = false;
static bool extended = false;
static int test_fd[2];
static int basic_request_handler_bind = 0;
static int basic_request_handler_stop = 0;
static void* basic_request_handler_userdata = (void*)0xCABCAB;
switch(event) {
case IPV4LL_EVENT_STOP:
break;
case IPV4LL_EVENT_BIND:
break;
default:
assert_se(0);
break;
}
}
return -errno;
return 0;
}
}
}
return -errno;
return test_fd[0];
}
static void test_public_api_setters(sd_event *e) {
struct ether_addr mac_addr = {
if (verbose)
/* Cleanup */
}
static void test_basic_request(sd_event *e) {
struct ether_addr mac_addr = {
if (verbose)
basic_request_handler_userdata) == 0);
/* PROBE */
if (extended) {
/* PROBE */
/* PROBE */
}
/* Cleanup */
}
log_open();
assert_se(sd_event_new(&e) >= 0);
return 0;
}