test-ipv4ll.c revision d9bf4f8c6c47b8620ffa1a056208eb15118b78d5
/*-*- 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 "sd-ipv4ll.h"
#include "ipv4ll-internal.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_user_data = (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_arp_probe(void) {
struct ether_addr mac_addr = {
if (verbose)
}
static void test_arp_announce(void) {
struct ether_addr mac_addr = {
if (verbose)
}
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_user_data) == 0);
/* PROBE */
if (extended) {
/* PROBE */
/* PROBE */
}
/* Cleanup */
}
sd_event *e;
assert_se(sd_event_new(&e) >= 0);
return 0;
}