networkd-ndisc.c revision fb84d8966e5ce49b0c705768bb4da4956c4e529a
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright (C) 2014 Intel Corporation. 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 "sd-ndisc.h"
#include "networkd-link.h"
int r;
link->ndisc_messages --;
r = sd_netlink_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
}
if (link->ndisc_messages == 0) {
link->ndisc_configured = true;
}
return 1;
}
static void ndisc_prefix_autonomous_handler(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen,
int r;
return;
r = address_new(&address);
if (r < 0) {
return;
}
else {
/* see RFC4291 section 2.5.1 */
}
if (r < 0) {
return;
}
link->ndisc_messages ++;
}
static void ndisc_prefix_onlink_handler(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen, unsigned lifetime, void *userdata) {
int r;
return;
if (r < 0) {
return;
}
if (r < 0) {
return;
}
link->ndisc_messages ++;
}
static void ndisc_router_handler(sd_ndisc *nd, uint8_t flags, const struct in6_addr *gateway, unsigned lifetime, int pref, void *userdata) {
int r;
return;
if (flags & ND_RA_FLAG_MANAGED)
if (r < 0 && r != -EBUSY)
}
if (!gateway)
return;
if (r < 0) {
return;
}
if (r < 0) {
return;
}
link->ndisc_messages ++;
}
int r;
return;
switch (event) {
case SD_NDISC_EVENT_TIMEOUT:
if (r < 0 && r != -EBUSY)
break;
case SD_NDISC_EVENT_STOP:
break;
default:
}
}
int r;
if (r < 0)
return r;
if (r < 0)
return r;
if (r < 0)
return r;
if (r < 0)
return r;
link);
return r;
}