test-rtnl.c revision 5d3de3fe9cc452f1bfe3c2dcafecbd7f904da4dc
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering This file is part of systemd.
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering Copyright 2013 Tom Gundersen <teg@jklm.no>
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering systemd is free software; you can redistribute it and/or modify it
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering under the terms of the GNU Lesser General Public License as published by
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering (at your option) any later version.
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering systemd is distributed in the hope that it will be useful, but
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering Lesser General Public License for more details.
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering You should have received a copy of the GNU Lesser General Public License
d4205751d4643c272059a3728045929dd0e5e800Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
844ec79b3c2f246114ea316ebe1f36044bdb688eZbigniew Jędrzejewski-Szmekstatic void test_link_configure(sd_rtnl *rtnl, int ifindex) {
844ec79b3c2f246114ea316ebe1f36044bdb688eZbigniew Jędrzejewski-Szmek _cleanup_rtnl_message_unref_ sd_rtnl_message *message;
844ec79b3c2f246114ea316ebe1f36044bdb688eZbigniew Jędrzejewski-Szmek const char *mac = "98:fe:94:3f:c6:18", *name = "test";
844ec79b3c2f246114ea316ebe1f36044bdb688eZbigniew Jędrzejewski-Szmek unsigned int mtu = 1450, mtu_out;
char *name_out;
sd_rtnl_message *m;
sd_rtnl_message *r;
char *str_data;
assert_se(m);
sd_rtnl_message *m;
sd_rtnl_message *r;
char *label;
assert_se(m);
static void test_route(void) {
static void test_multiple(void) {
assert_se(m);
char *ifname;
(*counter) --;
r = sd_rtnl_message_get_errno(m);
assert_se(r >= 0);
char *ifname;
int counter = 0;
counter ++;
counter ++;
while (counter > 0) {
static void test_container(void) {
char *string_data;
static void test_match(void) {
sd_rtnl_message *m;
int ifindex;
int main(void) {
sd_rtnl_message *m;
sd_rtnl_message *r;
char *string_data;
int if_loopback;
test_match();
test_route();
assert_se(m);
return EXIT_SUCCESS;